A Byte of PhysicsLogo

Atomic structure

An atom has a tiny, positively charged nucleus surrounded by electrons described by quantum states. It is not a miniature solar system. A classical electron in a circular Coulomb orbit would radiate energy and spiral inward, while actual atoms have stable stationary states and discrete spectra.

Atomic structure is a hierarchy of models. Nuclear charge sets the strongest attraction, quantum mechanics supplies orbitals and allowed quantum numbers, electron–electron repulsion modifies those orbitals, and the Pauli exclusion principle organizes multi-electron configurations.

Nucleus and electron cloud

The nucleus contains protons and neutrons. The atomic number \(Z\) is the number of protons and identifies the element. The mass number \(A\) is the total number of nucleons:

\[A=Z+N\]

where \(N\) is neutron number. Isotopes have the same \(Z\) but different \(N\). For ionic charge number \(q_{\mathrm{ion}}\), where a positive value means missing electrons, the electron count is

\[N_{\mathrm e}=Z-q_{\mathrm{ion}}\]

The nucleus is roughly tens of thousands of times smaller in radius than the atom, yet it contains nearly all the mass. Most atomic volume is the region in which electron probability density is appreciable—not empty space containing electrons on definite hidden tracks.

Evidence for the nuclear atom

Rutherford scattering showed that most alpha particles pass through thin foil with small deflections while a small fraction scatter through large angles. That pattern is consistent with positive charge and mass concentrated in a small nucleus. A diffuse positive charge could not readily produce the rare large deflections.

The Rutherford model alone did not explain atomic stability or discrete spectral lines. Bohr added quantized angular momentum for hydrogen as an early model. Modern quantum mechanics replaces circular orbits with wavefunctions and probability distributions.

The hydrogenic Coulomb problem

A one-electron ion with nuclear charge \(+Ze\) has potential energy

\[V(r)=-\frac{Ze^2}{4\pi\epsilon_0r}\]

Ignoring nuclear motion, relativity, spin coupling, and radiative corrections, the bound energies are

\[E_n=-\frac{13.6\,Z^2}{n^2}\ \mathrm{eV},\qquad n=1,2,3,\ldots\]

The zero of energy is a separated electron and nucleus at rest at infinite distance. Bound energies are negative. As \(n\to\infty\), the energy approaches zero from below, the ionization limit.

For hydrogen, the characteristic Bohr radius is

\[a_0=\frac{4\pi\epsilon_0\hbar^2}{m_ee^2}\approx5.29\times10^{-11}\ \mathrm m\]

The quantum ground-state probability density is spread over space. The Bohr radius is a characteristic length, not the radius of a hard spherical boundary or a measured circular path.

For a finite nuclear mass, replace the electron mass with the electron–nucleus reduced mass. Fine structure, hyperfine structure, and the Lamb shift add smaller corrections needed for precision spectroscopy.

Four quantum numbers

One-electron states in a central potential are labeled by four quantum numbers:

NameSymbolAllowed valuesMain meaning
Principal\(n\)\(1,2,3,\ldots\)Energy scale and shell
Orbital angular momentum\(\ell\)\(0,1,\ldots,n-1\)Orbital shape class
Magnetic\(m_\ell\)\(-\ell,\ldots,+\ell\)Angular-momentum projection
Spin projection\(m_s\)\(+\tfrac12,-\tfrac12\)Electron spin projection

The letters \(s,p,d,f\) correspond to \(\ell=0,1,2,3\). An orbital is specified by \(n,\ell,m_\ell\) and can hold two electrons with opposite spin projections.

def valid_quantum_state(n, ell, m_ell, m_spin):
    return (
        isinstance(n, int)
        and n >= 1
        and isinstance(ell, int)
        and 0 <= ell < n
        and isinstance(m_ell, int)
        and abs(m_ell) <= ell
        and m_spin in [-0.5, 0.5]
    )


assert valid_quantum_state(2, 1, 0, 0.5)
assert not valid_quantum_state(2, 2, 0, 0.5)
print("Quantum-number checks passed.")

Counting states in a shell

For one value of \(\ell\), there are

\(2\ell+1\)

possible magnetic quantum numbers. Including two spin projections gives

\(2(2\ell+1)\)

one-electron states in that subshell.

Summing over \(\ell=0\) through \(n-1\) gives

\[2\sum_{\ell=0}^{n-1}(2\ell+1)=2n^2\]

Thus ideal shell capacities are 2, 8, 18, and 32 for the first four values of \(n\). This count concerns available one-electron states, not the order in which subshells fill in a many-electron ground state.

Pauli exclusion and configurations

Electrons are indistinguishable spin-one-half fermions. The total electronic state is antisymmetric under exchange, leading to the Pauli exclusion principle: no two electrons in one atom can occupy the same one-electron state with all four quantum numbers equal.

Ground-state configurations are commonly estimated with three rules:

atomic_number, ionic_charge = 10, 0  # Neon example.
remaining = atomic_number - ionic_charge
orbitals = [("1s", 2), ("2s", 2), ("2p", 6)]
for label, capacity in orbitals:
    occupied = min(remaining, capacity)
    print(label, occupied)
    remaining -= occupied
assert remaining == 0
# This short ordering is for the example, not every element's ground state.

This is bookkeeping, not a universal energy solver. Some transition metals and ions have configurations that differ from a simple memorized filling order because subshell energies are close and change with occupancy. Use measured or high-quality computed data for real species.

Why hydrogen is special

In a pure Coulomb potential with one electron, nonrelativistic energy depends only on \(n\). States with different \(\ell\) can be degenerate. In a multi-electron atom, electron–electron repulsion and shielding make the effective potential more complicated. Energies then depend strongly on both \(n\) and \(\ell\).

Inner electrons partially screen nuclear charge from outer electrons. Penetration differs between orbital shapes, and exchange correlations matter. Consequently, substituting the full atomic number into the one-electron

\(-13.6Z^2/n^2\)

formula for every electron is wrong.

Transitions and spectra

If an isolated atom changes from initial energy \(E_i\) to lower final energy \(E_f\), energy conservation gives

\[E_\gamma=E_i-E_f=hf=\frac{hc}{\lambda}>0\]

Absorption reverses the process: \(hf=E_f-E_i>0\). Not every energy difference corresponds to an equally probable single-photon transition. Angular-momentum, parity, spin, and other selection rules affect transition probabilities.

h, c, electronvolt = 6.62607015e-34, 299792458.0, 1.602176634e-19
initial_energy, final_energy = -13.6 / 3**2, -13.6 / 2**2
photon_energy = (initial_energy - final_energy) * electronvolt
assert photon_energy > 0
wavelength = h * c / photon_energy
print(f"Hydrogen n=3 to n=2 wavelength: {wavelength*1e9:.2f} nm")

For hydrogen, the \(n=3\to2\) energy gap is smaller than the \(n=2\to1\) gap, so the first transition emits a lower-frequency, longer-wavelength photon.

Reading atomic pictures carefully

Different diagrams encode different quantities:

Measured spectra also require the element, isotope when relevant, ionization stage, environmental conditions, wavelength medium, and data source. NIST data should replace the hydrogenic approximation when precision or a multi-electron species matters.

A worked Python notebook

Compare the leading one-electron ground-state energies for hydrogen-like ions. The question for this calculation is precise: how does hydrogenic ground-state energy change when we change nuclear charge number, while keeping the other choices fixed? The earlier sections explain the physical relationship. Here we turn one part of that relationship into a calculation that you can run, inspect, and change in Google Colab.

Physical nuclear charge numbers are integers, and this approximation omits fine structure and finite nuclear mass. Keep that sentence beside the results. A formula can return a number outside its useful range, and a plotting library will usually draw that number without asking whether the physical assumptions still hold. The selected interval is from 1 to 3 dimensionless. It gives us a specific domain to discuss instead of leaving the graph's range to a software default.

Use the notebook link above the lesson, run the setup cell, and then run the cells in order. The code below is also included there. NumPy handles the arrays of numerical values, SymPy keeps the equation symbolic, and Matplotlib draws the results. If these libraries or notebook cells are unfamiliar, start with Your first physics notebook.

State the relationship before choosing a graph

In this small example, q stands for nuclear charge number, expressed in dimensionless. The output is hydrogenic ground-state energy, expressed in eV. The equation below uses the numerical values in those units. Any fixed coefficients therefore carry the units needed to make the relation consistent. A value supplied in another unit must be converted before it enters this expression.

\[f(q) = - 13.6 q^{2}\]

This is a function of one changing input. It is not a statement that the physical system has only one variable. We deliberately hold the other inputs fixed so that one cause of variation is visible. Changing several inputs at once would make it harder to tell which change produced the output difference. Write down the held-fixed choices before trying a different experiment.

At 2 dimensionless, the expression gives -54.4 eV. This is our reference calculation. It is a prediction of the stated example, not a new measurement. Its displayed digits help us compare implementations. They should not be read as a claim that physical inputs are known to six significant figures.

import numpy as np
import sympy as sp
import matplotlib.pyplot as plt

q = sp.Symbol("q", real=True)
expression = sp.sympify("-13.6*q**2", locals={"q": q})
reference_input = 2.0
reference_output = float(expression.subs(q, reference_input))
print("Input:", reference_input, "dimensionless")
print("Predicted hydrogenic ground-state energy:", reference_output, "eV")

sp.Symbol declares a mathematical symbol. It does not assign a numerical measurement to that symbol. subs then replaces the symbol with our chosen input, and float converts the resulting symbolic number into a standard Python numerical value. Keeping these steps separate lets us inspect the equation before numerical substitution. It also prevents a later plot from becoming the only surviving record of the model.

Compare a few cases you can explain

Before drawing hundreds of points, calculate three. The lower endpoint gives -13.6 eV. The midpoint, at 2 dimensionless, gives -54.4 eV. The upper endpoint gives -122.4 eV. Read these together with the assumptions: they describe different choices of nuclear charge number within the same example, with the other inputs held fixed.

These three values are a useful first check, but they do not establish the shape between them. Two endpoints can be equal even when the curve bends or oscillates in between. Likewise, a large change between endpoints does not tell us whether the relationship is linear. We need the equation and intermediate samples to answer those questions.

evaluate = sp.lambdify(q, expression, modules="numpy")
inputs = np.array([1.0, 2.0, 3.0])
outputs = np.asarray(evaluate(inputs), dtype=float)
outputs = np.broadcast_to(outputs, inputs.shape)
for input_value, output_value in zip(inputs, outputs):
    print(f"{input_value:.6g} dimensionless -> {output_value:.6g} eV")
assert np.all(np.isfinite(outputs))

lambdify turns the symbolic expression into a numerical function. We explicitly select NumPy as its numerical backend so it can accept an array. The same expression now has two useful forms: one for algebra and one for calculating many cases. The assertion checks that the chosen inputs produce finite outputs. It would catch an infinity or an undefined numerical result, but a finite value can still be physically inappropriate.

Make a graph that answers the question

The horizontal axis shows nuclear charge number; the vertical axis shows hydrogenic ground-state energy. Every plotted point is a prediction of the same expression. We mark the reference case separately so that a reader can connect the earlier printed value to its place on the curve. The axis labels include units because a shape without a scale cannot tell us the size of a physical effect.

input_grid = np.linspace(1.0, 3.0, 301)
output_grid = np.asarray(evaluate(input_grid), dtype=float)
output_grid = np.broadcast_to(output_grid, input_grid.shape)
fig, ax = plt.subplots(figsize=(7, 4))
ax.plot(input_grid, output_grid, label="Stated model")
ax.scatter([reference_input], [reference_output], label="Reference case", zorder=3)
ax.set_xlabel("Nuclear charge number (dimensionless)")
ax.set_ylabel("Hydrogenic ground-state energy (eV)")
ax.legend()
ax.grid(alpha=0.25)
fig.tight_layout()
plt.show()

Look for a sign change, a turning point, or a region where the curve becomes steep. Connect each feature to the expression rather than to the colour of the line. If the curve has a minimum or maximum, changing the input in opposite directions may have similar effects on the output near that point. If it is nearly straight over a short interval, a local linear approximation may be useful even when the complete expression is nonlinear.

Increasing the number of samples makes the line smoother and may reveal features that a coarse grid missed. It does not improve the physical inputs or enlarge the model's validity range. For quantities that can take only discrete values, use the line as a guide to the relationship and interpret only the allowed input values. A plotting function does not enforce such restrictions for you.

Measure the local sensitivity

A derivative asks a more specific question than the whole graph: how quickly does hydrogenic ground-state energy change near the reference input? Its units are the output unit divided by the input unit. For this calculation, the derivative at 2 dimensionless is -54.4 in those ratio units. Locally, the output decreases as the input increases. This statement is local; the sign or size of the slope can be different elsewhere on the curve.

\[f'(q) = - 27.2 q\]

For a small input change, multiply the derivative by that change to estimate the output change. Then compare that estimate with a fresh evaluation of the full expression. The distinction between these two calculations matters: the derivative gives a tangent approximation, while substitution evaluates the chosen expression at the new point.

slope_expression = sp.diff(expression, q)
slope_at_reference = float(slope_expression.subs(q, reference_input))
changed_input = 2.01
linear_prediction = reference_output + slope_at_reference * (
    changed_input - reference_input
)
full_prediction = float(evaluate(changed_input))
print("Symbolic derivative:", slope_expression)
print("Tangent prediction:", linear_prediction, "eV")
print("Full expression:", full_prediction, "eV")
print("Approximation difference:", full_prediction - linear_prediction, "eV")

Here the changed input is 2.01 dimensionless. The tangent estimate is -54.944 eV, while the full expression gives -54.9454 eV. If the two values are close, it means the chosen input change is small enough for this local approximation at this point. It does not mean the entire model is linear. If the slope is zero, a quadratic or higher-order term may supply the leading change instead.

This is also the beginning of uncertainty propagation. If the input has a small stated standard uncertainty, the magnitude of the slope times that uncertainty estimates one contribution to output uncertainty. Do not automatically use the same rule for a wide interval, a discontinuity, a turning point with zero first derivative, or several correlated uncertain inputs. Those situations need more of the model than one slope.

Check the derivative with numerical differences

We can estimate the same slope from values on either side of the reference point. Subtract the lower output from the upper output and divide by twice the input step. Parentheses are essential: the entire output difference must be divided by the entire input interval. Without them, Python can execute a different mathematical expression while still producing a plausible number.

The calculation below uses three decreasing step sizes. Each estimate is compared with the symbolic derivative, so the reference is independent of the numerical difference formula. Near an endpoint, it is acceptable here to evaluate a small extension only because the displayed mathematical expression is smooth there; such a check does not assert that extrapolated values describe additional physical cases.

input_span = 2.0
for fraction in [1e-2, 1e-3, 1e-4]:
    step = input_span * fraction
    upper = float(evaluate(reference_input + step))
    lower = float(evaluate(reference_input - step))
    numerical_slope = (upper - lower) / (2 * step)
    difference = numerical_slope - slope_at_reference
    print(f"step={step:.6g}: slope={numerical_slope:.6g}, difference={difference:.6g}")

For a smooth function, reducing the step often reduces the approximation error at first. Very small steps can eventually make subtraction of nearly equal floating-point values less reliable. Therefore “smaller” is not an unlimited guarantee of “better.” Compare the observed behaviour over a useful range of steps instead of choosing the smallest number the computer can represent.

An absolute slope difference is useful when the expected slope is near zero. A relative difference would divide by a very small reference and could look enormous even when the absolute discrepancy is tiny. Away from zero, a relative difference can help compare quantities with very different scales. The tolerance should reflect the question and the numerical method, rather than a universal decimal threshold copied into every test.

Change the example and preserve the reasoning

Make one copy of the reference calculation before editing it. Choose a second value of nuclear charge number inside the stated interval, predict whether hydrogenic ground-state energy will rise or fall, and then evaluate the expression. Place the prediction and the result in a text cell. If they disagree, identify whether the mistake was in the sign, the unit conversion, the algebra, or the assumption about how the curve behaves.

Next choose a shorter plotting interval around the reference point. Compare the local curve with its tangent approximation. Then widen the interval again. The difference shows why a useful local estimate need not describe the whole range. Keep the axis labels and numerical scale visible when comparing the plots; automatic axis limits can make two different effects appear equally large.

Finally, return to the physical limit stated at the start: Physical nuclear charge numbers are integers, and this approximation omits fine structure and finite nuclear mass. Describe one change to the setup that would violate that limit. State what new input, equation, or observation would be needed before trusting an answer in the changed situation. This last step connects the Python experiment to the physics instead of treating successful execution as the only criterion for a useful result.

Before saving, restart the runtime and run all cells in order. A result that depends on an earlier, now-deleted input cell is not reproducible from the saved notebook. Keep unrounded values for later calculations, round only the reported output, and label any new data as measured, assumed, or generated. The graph and printed values should remain traceable to the same expression and the same choices of inputs.

Recover the output change by integrating the slope

There is another way to check that the expression and its derivative describe the same relationship. Add up the small output changes predicted by the slope across the chosen input interval. In the continuous limit, this integral equals the output at the upper endpoint minus the output at the lower endpoint. The result has units of eV: the input unit in the integration cancels the input unit in the denominator of the slope.

This statement is about the mathematics of this particular relationship. It does not assign a new physical meaning to an arbitrary area under a graph. For example, an area under force versus distance represents work, while an area under a different pair of quantities may represent something else or have no standard name. Always carry the axis units through the calculation before naming an integral.

slope_function = sp.lambdify(q, slope_expression, modules="numpy")
endpoint_change = float(evaluate(3.0) - evaluate(1.0))
for points in [101, 201, 401]:
    grid = np.linspace(1.0, 3.0, points)
    slopes = np.asarray(slope_function(grid), dtype=float)
    slopes = np.broadcast_to(slopes, grid.shape)
    integrated_change = np.trapezoid(slopes, grid)
    print(
        points,
        "integrated change:",
        integrated_change,
        "endpoint change:",
        endpoint_change,
    )

The trapezoidal rule joins neighbouring slope samples with straight segments and adds their signed areas. A negative contribution remains negative; replacing every slope by its magnitude would calculate a different quantity. Increasing the sample count provides a practical refinement check. If the values do not settle toward the endpoint difference, first inspect the interval, singularities, and array ordering.

Do not conclude that two agreeing calculations prove the model is physically complete. Both use the same selected relationship, so an omitted effect would be omitted from both. Their agreement is evidence that the numerical tools implement that relationship consistently. Comparing with an independent experiment or a more appropriate physical model is a separate test.

Keep this comparison in the notebook when you change the expression. It is particularly useful after adding a coefficient, changing a sign convention, or converting an input unit. A code cell that produces a smooth graph can conceal these mistakes; a second calculation of the same output change gives you another place to notice them.

Sources


Share to: