Quantum Physics · Atomic Structure
📅 July 2026 ⏱ ≈ 15 min read 🎯 Intermediate–Advanced

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).

TL;DR: The hydrogen atom's Schrödinger equation splits neatly into a radial piece and an angular piece (the spherical harmonics), and this split is why electron orbitals come in the familiar s/p/d/f shapes labelled by the quantum numbers n, l, m. Energy depends only on n, giving the −13.6 eV/n² levels; l and m instead fix each orbital's shape and orientation.

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, θ, φ):

−ℏ²/(2m) [ (1/r²)∂/∂r(r²∂ψ/∂r) + (1/(r²sinθ))∂/∂θ(sinθ ∂ψ/∂θ) + (1/(r²sin²θ))∂²ψ/∂φ² ] + V(r)ψ = Eψ

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):

L̂² Y(θ,φ) = l(l+1)ℏ² Y(θ,φ) angular equation
−ℏ²/(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:

Yₗᵐ(θ, φ) = Nₗᵐ · Pₗᵐ(cos θ) · eimφ
lmYₗᵐ (unnormalised, real form)Name
001s
10cos θpz
1±1sin θ cos φ, sin θ sin φpx, py
203cos²θ − 1dz²
2±1, ±2combinations 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:

Eₙ = −(m e⁴) / (2(4πε₀)²ℏ²n²) = −13.6 eV / n²

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 numberRangeMeaning
n (principal)1, 2, 3, …Energy shell; sets Eₙ = −13.6 eV/n²
l (azimuthal)0 … n−1Orbital angular momentum L = √(l(l+1))ℏ; determines shape (s,p,d,f)
m (magnetic)−l … +lz-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

Real vs. complex orbitals: the eigenstates of L̂z (fixed m) are complex, eimφ, and have no fixed real shape — they are rings of constant |ψ| around the z-axis. The familiar "dumbbell" px/py pictures are real linear combinations Y₁¹ ± Y₁⁻¹ (both still valid eigenstates of Ĥ and L̂², since they share the same n, l — just not eigenstates of L̂z individually).

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);
}
PSI2_MAX: the acceptance threshold must be an upper bound of |ψ|² over the sampled region — for orbitals with a sharp peak near the nucleus (all s states), sampling r uniformly wastes most attempts; importance-sampling r ∝ r²e−2r/na₀ instead (matching the radial probability density) converges far faster.
▶ Live Demo

🔵 Run the hydrogen orbital simulation

3D probability clouds for s, p, d orbitals across n = 1–4

Open simulation →

🔗 Related Simulations

🔵Hydrogen Orbitals 🌊Schrödinger Equation 🧲Quantum Spin