Hydrogen Orbitals: Spherical Harmonics
The lobed, ring-shaped clouds of the s/p/d/f orbitals you see on every chemistry textbook cover are not arbitrary shapes — they are the exact solutions of the hydrogen atom's Schrödinger equation, factored into a radial part and an angular part governed by the spherical harmonics Yₗᵐ (a family of functions, indexed by the quantum numbers l and m, that describe shapes on a sphere).
The hydrogen Hamiltonian in spherical coordinates
The hydrogen atom is a single electron of mass m bound to a proton by the Coulomb potential V(r) = −e²/(4πε₀r). Because the potential depends only on the distance r, not on direction, the problem has spherical symmetry, and the TISE is best written in spherical coordinates (r, θ, φ):
The angular part of this Laplacian is, up to a factor, the operator −L̂²/ℏ² for the total orbital angular momentum. This is the crucial observation that makes separation of variables possible: the spherical symmetry of V(r) means Ĥ commutes with L̂² and L̂z, so the three operators share a common eigenbasis.
Separation of variables: R(r)·Yₗᵐ(θ,φ)
Because Ĥ, L̂² and L̂z commute, we look for solutions of the product form ψ(r, θ, φ) = R(r) · Y(θ, φ). Substituting into the TISE splits it into two independent equations — one purely angular, one purely radial, coupled only through the separation constant l(l+1):
−ℏ²/(2m) (1/r²) d/dr(r² dR/dr) + [ V(r) + l(l+1)ℏ²/(2mr²) ] R = ER radial equation
The term l(l+1)ℏ²/(2mr²) in the radial equation is the centrifugal barrier — the same effective repulsion that appears in classical orbital mechanics, here quantised. It pushes states of higher angular momentum away from the origin, which is exactly why p, d, f orbitals have a node (zero probability) at r = 0 while s orbitals do not.
The angular part: spherical harmonics
The angular equation is solved by the spherical harmonics Yₗᵐ(θ, φ) — the same functions that describe multipole fields in electromagnetism and the modes of a vibrating sphere. They factor further into a φ-dependent phase and a θ-dependent associated Legendre polynomial:
| l | m | Yₗᵐ (unnormalised, real form) | Name |
|---|---|---|---|
| 0 | 0 | 1 | s |
| 1 | 0 | cos θ | pz |
| 1 | ±1 | sin θ cos φ, sin θ sin φ | px, py |
| 2 | 0 | 3cos²θ − 1 | dz² |
| 2 | ±1, ±2 | combinations of sin θ cos θ, sin²θ with cos/sin(mφ) | dxz, dyz, dxy, dx²−y² |
The quantum number l = 0, 1, 2, 3 … is conventionally labelled s, p, d, f (a historical spectroscopic notation), and m ranges over 2l+1 integer values from −l to +l for each l — the origin of the familiar "one s orbital, three p orbitals, five d orbitals" rule.
The radial part: Laguerre polynomials
Solving the radial equation with the Coulomb potential requires the substitution R(r) = e−r/na₀ · (r/a₀)l · L(r), where a₀ = 4πε₀ℏ²/(me²) is the Bohr radius. The remaining function L(r) must be a polynomial (for the wave function to stay finite as r → ∞) — this quantisation requirement forces the associated Laguerre polynomials Ln−l−12l+1, and, crucially, fixes the energy:
Remarkably, Eₙ depends only on the principal quantum number n, not on l or m — a special "accidental" degeneracy of the pure 1/r Coulomb potential (it disappears for any other central potential, and is lifted in real multi-electron atoms by electron-electron screening).
Quantum numbers n, l, m and their rules
| Quantum number | Range | Meaning |
|---|---|---|
| n (principal) | 1, 2, 3, … | Energy shell; sets Eₙ = −13.6 eV/n² |
| l (azimuthal) | 0 … n−1 | Orbital angular momentum L = √(l(l+1))ℏ; determines shape (s,p,d,f) |
| m (magnetic) | −l … +l | z-component of angular momentum Lz = mℏ; orbital orientation |
For a given n there are n² distinct orbitals (n choices of l times 2l+1 choices of m, summed = n²) — before accounting for the two spin states of the electron, which double this to 2n² and correctly reproduce the lengths of the periods of the periodic table.
Orbital shapes: s, p, d
- s orbitals (l=0): spherically symmetric, no angular dependence, non-zero probability density at the nucleus. The number of radial nodes is n−1.
- p orbitals (l=1): two lobes of opposite sign separated by a nodal plane through the nucleus; three orientations (px, py, pz) point along the Cartesian axes.
- d orbitals (l=2): four-lobed "cloverleaf" shapes (dxy, dxz, dyz, dx²−y²) or a two-lobe-plus-ring shape (dz²), with two angular nodal surfaces.
Rendering electron probability clouds
To visualise |ψ(r,θ,φ)|² in WebGL, sample points via rejection sampling in the radial and angular probability densities, then plot them as a point cloud — far cheaper than volumetric ray marching for the sparse, lobed hydrogen densities:
// Rejection-sample a hydrogen orbital point cloud (n, l, m)
function sampleOrbital(n, l, m, N, a0 = 1) {
const pts = [];
const rMax = a0 * n * n * 6; // generous cutoff radius
while (pts.length < N) {
const r = Math.random() * rMax;
const theta = Math.acos(2 * Math.random() - 1);
const phi = 2 * Math.PI * Math.random();
const psi2 = radialR(n, l, r, a0) ** 2 * sphericalHarmonicReal(l, m, theta, phi) ** 2;
if (Math.random() < psi2 / PSI2_MAX) {
const x = r * Math.sin(theta) * Math.cos(phi);
const y = r * Math.sin(theta) * Math.sin(phi);
const z = r * Math.cos(theta);
pts.push(x, y, z);
}
}
return new Float32Array(pts);
}
🔵 Run the hydrogen orbital simulation
3D probability clouds for s, p, d orbitals across n = 1–4