Skip to content
LumenaryAcademy
Quantum 80 min

Quantum mechanics for chemists

Why atoms need a new mechanics, the Schrödinger equation as an eigenvalue problem, and the particle in a box, conjugated dyes, the hydrogen atom and spin, solved and computed.

Code tested · 6AI-draftedAwaiting review by a chemist

Your guides: Chloe · The Chemist, Margaret · The Analyst, Gideon · The Sceptic

MotivationH

Why atoms need a new mechanics

In Atomic structure and the periodic table you met orbitals, shells and electron configurations, and in Chemical bonding you used them to explain why atoms share or transfer electrons. Those lessons asked you to accept the orbitals as given. This one shows where they come from.

By 1911 Ernest Rutherford's scattering experiments had shown that an atom is a tiny, heavy, positive nucleus with electrons somewhere around it. The obvious picture is a miniature solar system, and classical physics says at once that it cannot work:

  • Atoms would collapse. An electron going round a nucleus is accelerating, and Maxwell's electromagnetism says an accelerating charge radiates. A classical hydrogen atom would spiral inwards, giving off a continuous smear of light, and hit the nucleus in about 10−1110^{-11} seconds. Real hydrogen atoms last indefinitely.
  • Spectra are lines, not smears. Hot hydrogen glows at a few sharp wavelengths — red at 656 nm, blue-green at 486 nm, violet at 434 and 410 nm — and absorbs at exactly the same ones. Something lets the atom hold only certain energies.
  • All hydrogen atoms are identical. A classical orbit could have any size. Every hydrogen atom in the universe has the same size, the same spectrum and the same chemistry.

The fix, worked out between 1900 and 1928, is quantum mechanics. For chemists it is not an optional extra: the shapes of molecules, the colours of dyes, the strength of bonds and every spectrum in Spectroscopy come out of one equation. This lesson builds it up, solves it exactly where we can, and numerically — with a few lines of NumPy — where we cannot.

IntuitionH

Electrons as standing waves

In 1924 Louis de Broglie proposed that matter has a wavelength, λ=h/p\lambda = h/p, where pp is momentum and h=6.626×10−34h = 6.626 \times 10^{-34} J s is Planck's constant. For anything you can hold, the wavelength is absurdly small: a cricket ball of 0.16 kg bowled at 30 m/s has λ≈1.4×10−34\lambda \approx 1.4 \times 10^{-34} m. But an electron with a kinetic energy of 13.6 eV (a typical energy inside an atom) has λ≈333\lambda \approx 333 pm — a few times the size of an atom. When the wavelength is as big as the space available, wave behaviour stops being a detail and becomes the whole story. Electron diffraction, seen by Clinton Davisson and Lester Germer in the United States and by George Paget Thomson in Scotland in 1927, confirmed it.

Now think of what waves do when they are confined.

Analogy, not a formal construction

A guitar string is pinned at both ends. It can vibrate only in patterns that fit a whole number of half-wavelengths between the pins: the fundamental, the second harmonic, the third. Nothing in between is possible, not because a rule forbids it but because any other pattern would have to move at the pinned ends. An electron held near a nucleus is confined too, and its allowed patterns — orbitals — and their energies are discrete for the same reason. The analogy has limits: a string's wave is a displacement of something you can see, while an electron's wave is a probability amplitude.

That is the central idea of the whole lesson: quantisation comes from confinement plus boundary conditions. A free electron can have any energy. A confined one can have only the energies whose standing waves fit.

DefinitionsH

Wavefunctions and the Schrödinger equation

Definition— Wavefunction and the Born rule

The state of a particle is described by a wavefunction ψ(r)\psi(\mathbf{r}), a complex-valued function of position. The probability of finding the particle in a small volume dV\mathrm{d}V around r\mathbf{r} is ∣ψ(r)∣2 dV|\psi(\mathbf{r})|^2 \, \mathrm{d}V (Max Born, 1926). So a wavefunction must be normalised, ∫∣ψ∣2 dV=1\int |\psi|^2 \, \mathrm{d}V = 1, and it must be finite, single-valued and continuous.

Only ∣ψ∣2|\psi|^2 is measured directly; ψ\psi itself can be positive, negative or complex. Its relative sign or phase from place to place is still physical, because when two waves overlap their signs decide whether they add or cancel — the heart of the next lesson, Molecular orbitals.

Definition— Hamiltonian and the time-independent Schrödinger equation

The Hamiltonian H^\hat H is the operator for total energy: kinetic plus potential. For one particle of mass mm in a potential V(r)V(\mathbf r),

H^=−ℏ22m∇2+V(r),ℏ=h2π.\hat H = -\frac{\hbar^2}{2m}\nabla^2 + V(\mathbf r), \qquad \hbar = \frac{h}{2\pi}.

The states of definite energy (stationary states) satisfy the time-independent Schrödinger equation

H^ψ=Eψ.\hat H \psi = E \psi .

It is an eigenvalue equation: the allowed energies EE are the eigenvalues of H^\hat H, and the stationary states are its eigenfunctions.

The kinetic-energy term −ℏ22m∇2ψ-\tfrac{\hbar^2}{2m}\nabla^2\psi measures curvature: a wavefunction that wiggles fast has high kinetic energy. So a confined electron faces a trade-off we will see again and again. Spreading out lowers its kinetic energy; staying close to attractive nuclei lowers its potential energy. Orbitals are the compromises.

If you have studied linear algebra, the eigenvalue language is not a metaphor. Sample ψ\psi at NN points and H^\hat H becomes an N×NN \times N matrix; the Schrödinger equation becomes Hc=EcH\mathbf{c} = E\mathbf{c}. That is how we will solve it on a computer, and it is how almost every quantum-chemistry program works (Computational chemistry). The mathematics of the infinite-dimensional case is in Mathematical foundations of quantum mechanics.

Theorem— Energies are real; different stationary states are orthogonal

The Hamiltonian is Hermitian: ∫ϕ∗(H^ψ) dV=∫(H^ϕ)∗ψ dV\int \phi^* (\hat H \psi)\, \mathrm{d}V = \int (\hat H\phi)^* \psi \, \mathrm{d}V for all well-behaved ϕ,ψ\phi, \psi. Consequently every eigenvalue of H^\hat H is real, and eigenfunctions with different eigenvalues are orthogonal: ∫ψm∗ψn dV=0\int \psi_m^* \psi_n \, \mathrm{d}V = 0 when Em≠EnE_m \neq E_n.

Proof

Write ⟨ϕ∣ψ⟩=∫ϕ∗ψ dV\langle \phi | \psi \rangle = \int \phi^* \psi \, \mathrm{d}V. If H^ψn=Enψn\hat H\psi_n = E_n \psi_n, Hermiticity gives ⟨ψm∣H^ψn⟩=⟨H^ψm∣ψn⟩\langle \psi_m | \hat H \psi_n \rangle = \langle \hat H \psi_m | \psi_n \rangle, that is, En⟨ψm∣ψn⟩=Em∗⟨ψm∣ψn⟩E_n \langle \psi_m | \psi_n\rangle = E_m^* \langle \psi_m | \psi_n \rangle. Taking m=nm = n and using ⟨ψn∣ψn⟩>0\langle \psi_n | \psi_n \rangle > 0 gives En=En∗E_n = E_n^*, so EnE_n is real. For m≠nm \neq n with Em≠EnE_m \neq E_n, (En−Em)⟨ψm∣ψn⟩=0(E_n - E_m)\langle \psi_m | \psi_n \rangle = 0 forces ⟨ψm∣ψn⟩=0\langle \psi_m|\psi_n\rangle = 0.

∎

On a grid the same theorem says that the matrix HH is real symmetric (or complex Hermitian), which is exactly what numpy.linalg.eigh is built for: it returns real eigenvalues in increasing order and orthonormal eigenvectors.

Worked examplesH

The particle in a box

The simplest confined system is a particle of mass mm free to move along a line between two impenetrable walls at x=0x = 0 and x=Lx = L: V=0V = 0 inside and V=∞V = \infty outside. The wavefunction must vanish outside the box and, being continuous, at the walls.

Example— Solving the box exactly

Inside, −ℏ22mψ′′=Eψ-\frac{\hbar^2}{2m}\psi'' = E\psi, whose general solution is ψ=Asin⁡kx+Bcos⁡kx\psi = A\sin kx + B\cos kx with E=ℏ2k2/2mE = \hbar^2k^2/2m.

  • ψ(0)=0\psi(0) = 0 forces B=0B = 0.
  • ψ(L)=0\psi(L) = 0 forces sin⁡kL=0\sin kL = 0, so kL=nπkL = n\pi with n=1,2,3,…n = 1, 2, 3, \ldots (n=0n = 0 would make ψ\psi zero everywhere: no particle).
  • Normalising, ∫0LA2sin⁡2(nπx/L) dx=A2L/2=1\int_0^L A^2 \sin^2(n\pi x/L)\,\mathrm{d}x = A^2 L/2 = 1, so A=2/LA = \sqrt{2/L}.
ψn(x)=2Lsin⁡nπxL,En=n2h28mL2,n=1,2,3,…\psi_n(x) = \sqrt{\frac{2}{L}} \sin\frac{n\pi x}{L}, \qquad E_n = \frac{n^2 h^2}{8 m L^2}, \qquad n = 1, 2, 3, \ldots

For an electron in a box 1 nm long, E1=0.376E_1 = 0.376 eV, E2=4E1E_2 = 4E_1 and E3=9E1E_3 = 9E_1.

n = 1, E₁n = 2, 4E₁n = 3, 9E₁V = ∞x = 0x = LV = 0 inside
The first three states of a particle in a box, each drawn at the height of its energy. The levels are at 1, 4 and 9 times E₁, so they spread apart as n grows. State n has n − 1 nodes inside the box, where the particle is never found.

Four features of this little model run through all of chemistry:

  1. Zero-point energy. The lowest energy is not zero. A confined particle can never be completely still; that is why molecules vibrate even at absolute zero.
  2. Nodes. State nn has n−1n - 1 interior nodes, points where ψ=0\psi = 0. More nodes means more curvature, so more kinetic energy.
  3. Smaller boxes, bigger gaps. En∝1/L2E_n \propto 1/L^2: halving the box quadruples every energy and every gap. Electrons in atoms and short molecules have gaps of electronvolts, matching ultraviolet and visible light; long conjugated molecules have smaller gaps and absorb at longer wavelengths.
  4. Lighter particles, bigger gaps. En∝1/mE_n \propto 1/m. Electrons are about 1800 times lighter than a hydrogen nucleus, which is why electronic energies are far larger than vibrational ones, and why nuclei can be treated almost classically when we build molecules.

Solving it numerically

For a box we found the answer with pencil and paper. For almost any other potential there is no formula, so chemists solve the equation numerically. The simplest method replaces the second derivative by a finite difference on a grid of spacing Δx\Delta x:

ψ′′(xi)≈ψi+1−2ψi+ψi−1Δx2.\psi''(x_i) \approx \frac{\psi_{i+1} - 2\psi_i + \psi_{i-1}}{\Delta x^2}.

With ψ=0\psi = 0 at the walls, H^ψ=Eψ\hat H\psi = E\psi becomes a matrix eigenvalue problem Hψ=EψH\boldsymbol{\psi} = E\boldsymbol{\psi}, where HH is tridiagonal: 2t+Vi2t + V_i on the diagonal and −t-t next to it, with t=ℏ2/(2mΔx2)t = \hbar^2/(2m\Delta x^2). The error of the approximation shrinks like Δx2\Delta x^2, so we can check the method against the exact energies and watch it converge.

python
import numpy as np

# SI constants (CODATA)
h = 6.62607015e-34       # J s
hbar = h / (2 * np.pi)
m_e = 9.1093837e-31      # kg
eV = 1.602176634e-19     # J

L = 1.0e-9               # a box 1 nm wide
n_inner = 500            # grid points strictly inside the box
dx = L / (n_inner + 1)

# -hbar^2/(2m) d2/dx2 with psi = 0 at both walls: a tridiagonal matrix
t = hbar**2 / (2 * m_e * dx**2)
H = (np.diag(np.full(n_inner, 2 * t))
     + np.diag(np.full(n_inner - 1, -t), 1)
     + np.diag(np.full(n_inner - 1, -t), -1))

E, psi = np.linalg.eigh(H)          # eigenvalues in increasing order

print(" n   finite differences (eV)   exact n^2 h^2/(8 m L^2) (eV)   rel. error")
for n in range(1, 6):
    exact = n**2 * h**2 / (8 * m_e * L**2)
    print(f"{n:2d}   {E[n-1]/eV:20.6f}   {exact/eV:24.6f}   {abs(E[n-1]-exact)/exact:12.2e}")

# The lowest eigenvector should be a half sine wave: compare its shape
x = np.linspace(dx, L - dx, n_inner)
ground = psi[:, 0] / np.sqrt(dx)                    # normalise so sum |psi|^2 dx = 1
ground *= np.sign(ground[n_inner // 2])             # eigenvectors come with an arbitrary sign
exact_ground = np.sqrt(2 / L) * np.sin(np.pi * x / L)
print("\nlargest difference from sqrt(2/L) sin(pi x/L):",
      f"{np.max(np.abs(ground - exact_ground)) / np.max(exact_ground):.1e} (relative)")

# Halving the grid spacing should cut the error by about four: the method is second order
for n_pts in [50, 100, 200, 400]:
    d = L / (n_pts + 1)
    tt = hbar**2 / (2 * m_e * d**2)
    Hs = np.diag(np.full(n_pts, 2 * tt)) - np.diag(np.full(n_pts - 1, tt), 1) - np.diag(np.full(n_pts - 1, tt), -1)
    E1 = np.linalg.eigvalsh(Hs)[0]
    exact1 = h**2 / (8 * m_e * L**2)
    print(f"{n_pts:4d} points: error in E1 = {abs(E1 - exact1)/exact1:.2e}")
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

With 500 points the ground-state energy agrees with h2/8mL2=0.376030h^2/8mL^2 = 0.376030 eV to about three parts in a million, and each doubling of the number of points cuts the error by a factor of four, as a second-order method should. The higher states are slightly less accurate, because they wiggle more and the grid samples each wiggle less finely.

The same thirty lines solve any one-dimensional potential: change the diagonal from 2t2t to 2t+Vi2t + V_i. You will do exactly that for a vibrating bond in the exercises.

ComputationC

Conjugated dyes as boxes

In 1949 the Swiss chemist Hans Kuhn noticed that the π electrons of certain dyes behave very much like particles in a box. The cyanine dyes are the cleanest case: two nitrogen atoms joined by an odd-numbered chain of carbon atoms. One drawing puts the positive charge on the left nitrogen and alternates single and double bonds along the chain; an equally good drawing puts it on the right and swaps them. The true molecule is the average of the two, so every bond along the chain has the same length, about 139 pm, and a π electron feels a nearly flat potential from one end to the other — a box. Cyanines were used to extend the colour sensitivity of photographic film, and descendants such as Cy3 and Cy5 are standard fluorescent labels in biology laboratories today.

The free-electron model, in four steps:

  1. Count the π electrons. For a chain of pp carbon atoms between the two nitrogens there are N=p+3N = p + 3: one from each carbon and three from the two nitrogens together.
  2. Fill the box levels two electrons at a time, lowest first (the Pauli principle, below). The highest occupied level (the HOMO) is n=N/2n = N/2, and the lowest empty one (the LUMO) is N/2+1N/2 + 1.
  3. The lowest-energy absorption lifts one electron from HOMO to LUMO:
ΔE=EN/2+1−EN/2=(N+1)h28meL2,λ=hcΔE=8mecL2h(N+1).\Delta E = E_{N/2+1} - E_{N/2} = \frac{(N+1)h^2}{8 m_e L^2}, \qquad \lambda = \frac{hc}{\Delta E} = \frac{8 m_e c L^2}{h (N+1)} .
  1. Estimate LL. Kuhn took the length of the chain plus one bond length beyond each nitrogen: L=(p+3)×139L = (p+3) \times 139 pm.

Below we apply it to the family of 2,2′-cyanine dyes, whose two nitrogens sit in quinoline rings, with p=3,5,7p = 3, 5, 7 carbon atoms between the nitrogens. Their measured absorption maxima are roughly 523, 604 and 707 nm (they vary by a few nanometres with the solvent; spectra for individual dyes are in PubChem).

python
import numpy as np

h = 6.62607015e-34     # J s
m_e = 9.1093837e-31    # kg
c = 2.99792458e8       # m/s
bond = 139e-12         # m, a typical C-C bond length in a conjugated chain

def box_lambda(n_electrons, L):
    """Wavelength (nm) of the HOMO -> LUMO jump for n_electrons in a box of length L (m)."""
    homo = n_electrons // 2                       # two electrons per level
    dE = (2 * homo + 1) * h**2 / (8 * m_e * L**2)  # E(homo+1) - E(homo)
    return h * c / dE * 1e9

# Symmetric cyanine dyes: p carbon atoms in the chain between the two nitrogens.
# pi electrons: p + 3. Box: the p + 2 atoms' bonds plus one bond length beyond each N.
measured = {3: 523, 5: 604, 7: 707}   # approximate absorption maxima (nm) of the 2,2'-cyanine series
print(" p   pi electrons   L (pm)   box model (nm)   measured (nm)")
for p in (3, 5, 7):
    N = p + 3
    L = (p + 3) * bond
    print(f"{p:2d}   {N:12d}   {L*1e12:6.0f}   {box_lambda(N, L):14.0f}   {measured[p]:13d}")

# The model is too short by a similar amount each time: the conjugation leaks into the rings.
# Fit one extra length, alpha bond lengths, to all three dyes (least squares on lambda).
alphas = np.linspace(0, 3, 3001)
def sq_error(a):
    return sum((box_lambda(p + 3, (p + 3 + a) * bond) - lam)**2 for p, lam in measured.items())
best = alphas[np.argmin([sq_error(a) for a in alphas])]
print(f"\nbest extra length: alpha = {best:.2f} bond lengths ({best*bond*1e12:.0f} pm)")
for p, lam in measured.items():
    print(f"p = {p}: fitted model {box_lambda(p + 3, (p + 3 + best) * bond):.0f} nm, measured {lam} nm")
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The bare model predicts 328, 453 and 579 nm: the right order of magnitude, the right trend (longer chain, longer wavelength), but 100 to 200 nm too short; the real dyes absorb green, orange and red light respectively. The reason is chemical: the "ends" of the box are not at the nitrogens, because the π system continues into the aromatic rings. Adding one fitted length of 1.29 bond lengths (180 pm) to every dye brings all three within 40 nm, under 8%. A one-parameter model with no computer and no quantum-chemistry program gets the colour of a dye that close; that is why it is still taught.

ExplanationH

The hydrogen atom

The hydrogen atom is the one real atom whose Schrödinger equation can be solved exactly, and its solutions are the orbitals that chemists use as a vocabulary for every other atom. One electron moves in the Coulomb attraction of one proton:

H^=−ℏ22μ∇2−e24πε0r,\hat H = -\frac{\hbar^2}{2\mu}\nabla^2 - \frac{e^2}{4\pi\varepsilon_0 r},

where μ=memp/(me+mp)\mu = m_e m_p/(m_e + m_p) is the reduced mass (the proton moves slightly too). Because the potential depends only on the distance rr, the equation separates in spherical polar coordinates: ψnlml(r,θ,ϕ)=Rnl(r) Ylml(θ,ϕ)\psi_{n l m_l}(r, \theta, \phi) = R_{nl}(r)\, Y_{l}^{m_l}(\theta, \phi), a radial function times a spherical harmonic. Boundary conditions — finite at the nucleus, vanishing far away, single-valued round the axis — quantise three numbers.

SymbolNameAllowed valuesWhat it fixes
nnprincipal1,2,3,…1, 2, 3, \ldotsthe energy (in hydrogen) and the size
llorbital angular momentum0,1,…,n−10, 1, \ldots, n-1 (s, p, d, f, …)the shape; ∣L∣=ℏl(l+1)\lvert \mathbf L \rvert = \hbar\sqrt{l(l+1)}
mlm_lmagnetic−l,…,+l-l, \ldots, +lthe orientation; Lz=mlℏL_z = m_l\hbar

The energies depend on nn alone:

En=−μe48ε02h2 1n2≈−13.6 eVn2.E_n = -\frac{\mu e^4}{8\varepsilon_0^2 h^2}\,\frac{1}{n^2} \approx -\frac{13.6\ \text{eV}}{n^2}.

So shell nn contains n2n^2 orbitals of the same energy (one 1s; one 2s and three 2p; one 3s, three 3p and five 3d). An orbital has n−1n - 1 nodes in all: ll of them are angular nodes (planes or cones through the nucleus, which give p and d orbitals their lobes) and n−l−1n - l - 1 are radial nodes (spheres). A 3s orbital has two spherical nodes; a 3p has one sphere and one plane; a 3d has two angular nodes and no radial one.

++−++−−1s: no nodes2p(z): one nodal plane3d(xy): two nodal planes
Three hydrogen orbitals, drawn as boundary surfaces with the sign of the wavefunction in each lobe. Dashed lines are nodal planes seen edge-on. The signs do not mean charge; they matter when orbitals overlap.

Computing the levels

Writing u(r)=rR(r)u(r) = rR(r) turns the radial part into a one-dimensional problem, a particle on the half-line r>0r > 0 in an effective potential:

−ℏ22μu′′+[ℏ2l(l+1)2μr2−e24πε0r]u=Eu,u(0)=0.-\frac{\hbar^2}{2\mu}u'' + \left[\frac{\hbar^2 l(l+1)}{2\mu r^2} - \frac{e^2}{4\pi\varepsilon_0 r}\right]u = E u, \qquad u(0) = 0.

The first term in the bracket is a centrifugal barrier that keeps electrons with l>0l > 0 away from the nucleus. This is our finite-difference box again, with a different VV. In atomic units (ℏ=me=e=4πε0=1\hbar = m_e = e = 4\pi\varepsilon_0 = 1; length in bohr, 52.9 pm; energy in hartree, 27.211 eV) the numbers are pleasant. The block also computes the visible Balmer lines, the jumps down to n=2n = 2, using the Rydberg constant corrected for the reduced mass.

python
import numpy as np

# Atomic units: hbar = m_e = e = 4 pi eps0 = 1. Lengths in bohr (52.9 pm), energies in hartree (27.211 eV).
hartree_eV = 27.211386

def radial_levels(l, r_max=60.0, n_pts=1200):
    """Energies of -1/2 u'' + [l(l+1)/(2 r^2) - 1/r] u = E u, with u(0) = u(r_max) = 0."""
    dr = r_max / (n_pts + 1)
    r = dr * np.arange(1, n_pts + 1)
    V = l * (l + 1) / (2 * r**2) - 1 / r          # centrifugal term + Coulomb attraction
    k = 1 / (2 * dr**2)
    H = np.diag(2 * k + V) - k * np.eye(n_pts, k=1) - k * np.eye(n_pts, k=-1)
    return np.linalg.eigvalsh(H)

print("orbital   computed (eV)   exact -13.606/n^2 (eV)")
for l, letter in [(0, "s"), (1, "p"), (2, "d")]:
    E = radial_levels(l)
    for n in range(l + 1, 5):                     # shells n = 1..4
        print(f"  {n}{letter}     {E[n - l - 1]*hartree_eV:10.4f}      {-hartree_eV/2/n**2:10.4f}")

# The Balmer lines: jumps down to n = 2, using the Rydberg constant for hydrogen
R_inf = 10973731.568          # m^-1
mass_ratio = 1836.15267       # proton mass / electron mass
R_H = R_inf / (1 + 1 / mass_ratio)   # reduced-mass correction: the nucleus moves a little too
print("\nBalmer line   wavelength in vacuum (nm)")
for n_upper, name in [(3, "H-alpha"), (4, "H-beta"), (5, "H-gamma"), (6, "H-delta")]:
    lam = 1 / (R_H * (1 / 2**2 - 1 / n_upper**2))
    print(f"{n_upper} -> 2  {name:8s} {lam*1e9:10.2f}")
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The grid reproduces −13.6/n2-13.6/n^2 eV to within 0.01 eV, and it shows something the formula hides: 2s and 2p come out with the same energy, as do 3s, 3p and 3d, even though they solve different equations. The computed Balmer lines, 656.47, 486.27, 434.17 and 410.29 nm, agree with the measured lines in the NIST Atomic Spectra Database to a few hundredths of a nanometre. (Most tables quote wavelengths in air, which are shorter by the refractive index of air: H-alpha is the famous 656.28 nm in air.)

0 eV (ionised)n = 3, −1.51 eVn = 4n = 2, −3.40 eVn = 1, −13.6 eVLyman series(ultraviolet)656 nm486 nmBalmer series (visible)
Energy levels of hydrogen drawn to scale (E = −13.6 eV/n²). Jumps down to n = 1 give the ultraviolet Lyman series; jumps down to n = 2 give the visible Balmer series, including the red 656 nm and blue-green 486 nm lines.

From hydrogen to everything else

For an atom with several electrons no exact solution exists, because each electron repels every other. Chemists keep hydrogen's vocabulary anyway: each electron is given an orbital with the same labels and shapes, in the average field of the nucleus and the other electrons. This orbital approximation is what an electron configuration such as 1s22s22p41s^2 2s^2 2p^4 means, and making it quantitative is the subject of Computational chemistry.

ExplanationH

Spin and the Pauli principle

In 1922 Otto Stern and Walther Gerlach, in Frankfurt, sent a beam of silver atoms through a non-uniform magnetic field. A classical magnet would be deflected by any amount; the beam split cleanly into two. In 1925 George Uhlenbeck and Samuel Goudsmit, in Leiden, explained this and the fine detail of atomic spectra by giving the electron an intrinsic angular momentum, spin, with quantum number s=12s = \tfrac12 and only two possible components along any axis, ms=+12m_s = +\tfrac12 ("up", α\alpha) or ms=−12m_s = -\tfrac12 ("down", β\beta). An electron's state is now an orbital and a spin state: four quantum numbers n,l,ml,msn, l, m_l, m_s.

In the same year Wolfgang Pauli, in Hamburg, stated the rule that organises the periodic table: no two electrons in an atom can have the same four quantum numbers. So an orbital holds at most two electrons, with opposite spins; a shell nn holds 2n22n^2.

Definition— Antisymmetry (the Pauli principle)

Electrons are identical: no experiment can tell which is "electron 1". The wavefunction of several electrons must change sign when the space and spin coordinates of any two of them are exchanged:

Ψ(…,xi,…,xj,…)=−Ψ(…,xj,…,xi,…),\Psi(\ldots, \mathbf x_i, \ldots, \mathbf x_j, \ldots) = -\Psi(\ldots, \mathbf x_j, \ldots, \mathbf x_i, \ldots),

where x\mathbf x stands for position and spin together. Particles with this property are fermions.

The "four quantum numbers" rule follows. Put two electrons in orbitals ϕa\phi_a and ϕb\phi_b and build the antisymmetric combination (a 2 × 2 Slater determinant, after John Slater's 1929 paper):

Ψ(x1,x2)=12[ϕa(x1)ϕb(x2)−ϕb(x1)ϕa(x2)].\Psi(\mathbf x_1, \mathbf x_2) = \frac{1}{\sqrt 2}\big[\phi_a(\mathbf x_1)\phi_b(\mathbf x_2) - \phi_b(\mathbf x_1)\phi_a(\mathbf x_2)\big].

If a=ba = b — same orbital and same spin — the bracket is identically zero. There is no such state. But antisymmetry does more than forbid; it shapes where electrons go. Two electrons with the same spin have an antisymmetric spatial wavefunction, which vanishes whenever they are at the same place, so they keep apart. Let us measure how much, for two electrons in a box, ignoring their repulsion so that only antisymmetry acts.

python
import numpy as np

# Two electrons in a box of length 1, ignoring their repulsion. One-electron orbitals:
def phi(n, x):
    return np.sqrt(2) * np.sin(n * np.pi * x)

x = np.linspace(0, 1, 401)
X1, X2 = np.meshgrid(x, x, indexing="ij")
dA = (x[1] - x[0])**2

def normalised(P):
    return P / (P.sum() * dA)

# Spatial parts of three two-electron states
both_in_1 = phi(1, X1) * phi(1, X2)                                         # opposite spins only
sym_12 = (phi(1, X1) * phi(2, X2) + phi(2, X1) * phi(1, X2)) / np.sqrt(2)   # opposite spins (singlet)
anti_12 = (phi(1, X1) * phi(2, X2) - phi(2, X1) * phi(1, X2)) / np.sqrt(2)  # same spin (triplet)

close = np.abs(X1 - X2) < 0.1          # the two electrons within a tenth of the box of each other
print("state                             P(|x1 - x2| < 0.1)   largest |psi| at x1 = x2")
for name, psi in [("(1,1), spins opposite", both_in_1), ("(1,2) symmetric, spins opposite", sym_12),
                  ("(1,2) antisymmetric, same spin", anti_12)]:
    P = normalised(psi**2)
    on_diagonal = np.max(np.abs(np.diag(psi)))
    print(f"{name:33s} {P[close].sum() * dA:12.3f}   {on_diagonal:18.3f}")

# Swapping the electrons: the antisymmetric state changes sign, the others do not
print("\nsymmetric under exchange:    ", np.allclose(sym_12, sym_12.T))
print("antisymmetric under exchange:", np.allclose(anti_12, -anti_12.T))
# A same-spin pair in the SAME orbital would be phi1*phi1 - phi1*phi1 = 0 everywhere: Pauli
same_orbital_same_spin = (phi(1, X1) * phi(1, X2) - phi(1, X1) * phi(1, X2)) / np.sqrt(2)
print("same orbital, same spin, largest |psi|:", np.max(np.abs(same_orbital_same_spin)))
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

With opposite spins, the two electrons are within a tenth of the box of each other 29% or 39% of the time; with the same spin, only 1.6% of the time, and never at exactly the same point. This exchange hole around every electron is purely a consequence of antisymmetry, not of any force. It is why, when electrons occupy orbitals of equal energy, they prefer to spread out with parallel spins (Hund's first rule): the nitrogen atom's three 2p electrons sit one in each 2p orbital, all with the same spin. And it is why two electrons can share a bonding orbital only if their spins are paired — the electron-pair bond of Chemical bonding.

ExplanationH

The professional view

Every first-principles calculation in chemistry starts from the Schrödinger equation and turns it into a matrix eigenvalue problem like the ones you have just solved. What changes in practice is scale and care:

  • Many electrons. A benzene molecule has 42 electrons, and its wavefunction depends on 126 spatial coordinates plus spins. A grid with even ten points per coordinate would need 1012610^{126} numbers, so practical methods expand orbitals in a modest set of well-chosen functions instead (Computational chemistry). The cost of doing this exactly grows exponentially with the number of electrons, which is the reason chemistry is one of the first hoped-for applications of quantum computers (Quantum computing for chemistry).
  • Nuclei and electrons separately. Because nuclei are so much heavier, chemists solve for the electrons with the nuclei held still, then move the nuclei on the resulting energy surface (the Born–Oppenheimer approximation, used throughout Molecular orbitals and Spectroscopy).
  • Relativity. In heavy atoms the inner electrons move at a sizeable fraction of the speed of light, and the Schrödinger equation must be replaced by Dirac's or corrected for it. Relativistic effects are why gold is yellow rather than silvery and a large part of why mercury is a liquid at room temperature (Pyykkö, 1988).
  • Data. Measured atomic energy levels and line wavelengths, the reference against which theory is tested, are compiled by NIST in the Atomic Spectra Database, and the constants themselves by CODATA (NIST).

The same equation, applied to electrons in solids, gives the band structures of electronic structure and bands in Lumenary Materials.

Common misconceptionsH

Common misconceptions

Misconception

"Electrons orbit the nucleus in circles" or "an orbital is the electron's container". Bohr's 1913 orbits got hydrogen's energies right for the wrong reason. A 1s electron has zero orbital angular momentum and no path at all, only a probability distribution, densest at the nucleus; the drawn orbital surface is a convention enclosing, say, 90% of that probability, not a wall.

Misconception

"How does an electron in a 2p orbital cross the node to get from one lobe to the other?" It does not travel between lobes. The orbital is a standing wave, like a vibrating string that has a node in its middle; a string does not need to "carry" its vibration across the still point. The question assumes a classical trajectory that does not exist.

Misconception

"The + and − on orbital lobes are charges." They are the sign of the wavefunction, a phase. Squaring removes it, so both lobes of a 2p orbital hold equal electron density. The signs matter only when two orbitals overlap, where like signs add and unlike signs cancel.

Misconception

"Spin means the electron is a tiny spinning ball." Spin is an intrinsic angular momentum with no classical picture: treating the electron as a spinning charged sphere of any plausible size would require its surface to move faster than light. Keep the word, not the image.

History & global context

A short history

Max Planck introduced the quantum of energy in 1900 and Niels Bohr quantised hydrogen's orbits by decree in 1913. Louis de Broglie's matter waves (1924) led Erwin Schrödinger, in Zürich, to his wave equation and the exact hydrogen atom in 1926, months after Werner Heisenberg, Max Born and Pascual Jordan in Göttingen had found the equivalent matrix mechanics. Paul Dirac in Cambridge unified the two and, in 1928, made the theory relativistic. Chemistry followed at once: Walter Heitler and Fritz London explained the bond in H₂ in 1927, and by 1931 Linus Pauling, Friedrich Hund and Robert Mulliken had laid the foundations of the valence-bond and molecular-orbital theories of the next lesson.

Exercises

Exercises

1. Quantum mechanics for chemists

Warm-upHuman

An electron is described by a normalised one-dimensional wavefunction ψ(x)\psi(x). What does ∣ψ(x)∣2 dx|\psi(x)|^2\,\mathrm{d}x tell you?

Choose one

2. Quantum mechanics for chemists

CoreHuman

An electron is confined in a one-dimensional box of length L=1.00L = 1.00 nm. What is the wavelength, in nanometres to the nearest whole number, of the photon absorbed when it jumps from n=1n = 1 to n=2n = 2?

Use h=6.626×10−34h = 6.626 \times 10^{-34} J s, me=9.109×10−31m_e = 9.109 \times 10^{-31} kg and c=2.998×108c = 2.998 \times 10^8 m/s.

3. Quantum mechanics for chemists

Warm-upHuman

How many radial (spherical) nodes does a hydrogen 5d orbital have?

4. Quantum mechanics for chemists

CoreHuman

Which set of quantum numbers (n,l,ml,ms)(n, l, m_l, m_s) is not allowed for an electron in an atom?

Choose one

5. Quantum mechanics for chemists

Warm-upHuman

How many electrons can the n=4n = 4 shell hold in total?

6. Quantum mechanics for chemists

CoreHuman

In the free-electron (box) model of a cyanine dye, the chain is lengthened by one CH=CH unit. This adds two π electrons and about two bond lengths to the box. What does the model predict?

Choose one

7. Quantum mechanics for chemists

CoreComputational

Write fd_levels(V, L, n_pts=800, k=3), which returns the lowest k energies (in eV, as a NumPy array in increasing order) of an electron confined to 0<x<L0 \lt x \lt L (in nm) with walls at both ends and a potential V(x) inside. V takes a NumPy array of positions in nm and returns energies in eV.

Use the finite-difference method of the lesson: n_pts interior grid points, spacing Δx=L/(npts+1)\Delta x = L/(n_\text{pts} + 1), diagonal 2t+Vi2t + V_i and off-diagonals −t-t with t=ℏ2/(2meΔx2)t = \hbar^2/(2m_e\Delta x^2). The constant ℏ2/(2me)=0.0380998\hbar^2/(2m_e) = 0.0380998 eV nm² is provided.

The tests check an empty box and a harmonic oscillator, V=12ks(x−L/2)2V = \tfrac12 k_s (x - L/2)^2, the model of a vibrating bond in Spectroscopy, whose exact levels are (v+12)ℏω(v + \tfrac12)\hbar\omega.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

8. Quantum mechanics for chemists

StretchComputational

A one-electron ion with nuclear charge ZZ (H, He⁺, Li²⁺, …) has energies En=−Z2hcR/n2E_n = -Z^2 h c R / n^2, where the Rydberg constant is corrected for the nucleus's motion: R=R∞/(1+me/M)R = R_\infty / (1 + m_e/M).

Write line_nm(Z, n_upper, n_lower, mass_ratio) returning the vacuum wavelength in nm of the nupper→nlowern_\text{upper} \to n_\text{lower} emission line, where mass_ratio is M/meM/m_e. Use R∞=10 973 731.568R_\infty = 10\,973\,731.568 m⁻¹ (provided).

The tests include hydrogen's red Balmer line and the He⁺ line from n=4n = 4 to n=3n = 3, which astronomers use to find very hot stars.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Further reading and resources