Quantum Mechanics

The Variational Method

Guess a wavefunction, get a rigorous upper bound on the ground-state energy — ⟨H⟩ ≥ E₀

The variational method is a technique for estimating the ground-state energy of a quantum system without solving the Schrödinger equation exactly: for any normalized trial wavefunction ψ, the expectation value of the Hamiltonian obeys ⟨ψ|H|ψ⟩ ≥ E₀, the true ground-state energy. You build a trial function with adjustable parameters, compute the energy functional, and minimize it — every improvement pushes the bound closer to E₀. This Rayleigh-Ritz principle (Lord Rayleigh, 1870s; Walther Ritz, 1908) is the workhorse behind the helium-atom energy estimate, Hartree-Fock theory, and essentially all of modern quantum chemistry.

  • Variational theorem⟨ψ|H|ψ⟩ / ⟨ψ|ψ⟩ ≥ E₀
  • Minimize overtrial parameters α, β, …
  • Equality whenψ = true ground state φ₀
  • Error scalingδE ∝ (δψ)² (second order)
  • Helium estimateZ_eff = 27/16 → −77.5 eV (2% error)
  • Named forRayleigh & Ritz

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Why it matters

The Schrödinger equation can be solved exactly for only a handful of systems — the particle in a box, the harmonic oscillator, and the hydrogen atom among them. The moment you add a second electron, as in the helium atom, the electron-electron repulsion term makes the equation analytically intractable. The variational method is the escape hatch: instead of solving H ψ = E ψ, you guess a plausible wavefunction and let the mathematics guarantee that your energy estimate is never too low.

That guarantee is what makes the method so powerful. Many approximation schemes give an answer without telling you which side of the truth you land on. The variational principle always errs on the high side: your computed energy is a rigorous upper bound on the true ground-state energy E₀. So if two different trial functions give −77 eV and −78 eV for helium, you know immediately that −78 eV is the better estimate — no external check required. The lower your bound, the closer you are to the truth.

This single fact scales all the way up to industrial computation. Every time a chemist runs a Hartree-Fock or density-functional calculation to predict a bond length, a reaction barrier, or a spectrum, they are — under the hood — minimizing ⟨H⟩ over a parametrized family of wavefunctions. The variational method is not a niche trick; it is the conceptual engine of computational chemistry and much of condensed-matter physics.

The variational theorem

The central statement is compact. For a Hamiltonian H with ground-state energy E₀ and any (not necessarily normalized) trial state ψ:

E[ψ] = ⟨ψ|H|ψ⟩ / ⟨ψ|ψ⟩ ≥ E₀

where:

  • E[ψ] — the energy functional (the Rayleigh quotient), in joules or, more commonly in atomic physics, in Hartree (1 Ha = 27.211 eV).
  • ⟨ψ|H|ψ⟩ — the expectation value of the Hamiltonian, ∫ ψ* H ψ dτ, integrated over all space.
  • ⟨ψ|ψ⟩ — the normalization integral, ∫ ψ* ψ dτ; dividing by it removes any dependence on the overall scale of ψ.
  • E₀ — the exact ground-state (lowest) eigenvalue of H.

Equality holds only when ψ is the true ground-state eigenfunction φ₀. Any other guess overestimates the energy.

How it works, step by step

1. Choose a trial wavefunction. Pick a function ψ(x; α, β, …) that satisfies the boundary conditions and captures the physics — it should decay where the potential is large, and have the right symmetry. Introduce one or more variational parameters (a width, an effective charge, mixing coefficients).

2. Build the energy functional. Compute the two integrals and form E(α, β, …) = ⟨ψ|H|ψ⟩ / ⟨ψ|ψ⟩. The parameters now appear as ordinary variables in a function you can differentiate.

3. Minimize. Set the gradient to zero:

∂E/∂α = 0,   ∂E/∂β = 0,   …

and solve for the optimal parameters. Substituting them back gives the lowest — and therefore best — upper bound your trial family can produce.

4. Improve (optional). Add more parameters or more basis functions. Because the family of accessible states grows, the minimum can only drop (or stay put), so the bound is monotonically improving. In the limit of a complete basis it converges to E₀ exactly.

Why the bound holds — the eigenbasis proof

The proof is a two-line argument that never uses the eigenstates explicitly, only their existence. Expand the trial state in the complete (unknown) energy eigenbasis {φₙ}, with H φₙ = Eₙ φₙ and E₀ ≤ E₁ ≤ E₂ ≤ …:

ψ = Σₙ cₙ φₙ     ⟹     ⟨H⟩ = Σₙ |cₙ|² Eₙ / Σₙ |cₙ|²

Now subtract E₀ from both sides. Because every Eₙ − E₀ ≥ 0 and every |cₙ|² ≥ 0:

⟨H⟩ − E₀ = Σₙ |cₙ|² (Eₙ − E₀) / Σₙ |cₙ|² ≥ 0

so ⟨H⟩ ≥ E₀. The excess energy is a weighted average of the positive gaps (Eₙ − E₀); it vanishes only when all the weight sits on n = 0, i.e. when ψ = φ₀. Crucially, the argument needs only that the eigenstates form a complete set — you never have to find them.

Worked example: the helium atom

Helium is the classic showcase. Its Hamiltonian (in atomic units, ℏ = mₑ = e = 4πε₀ = 1) is

H = −½∇₁² − ½∇₂² − 2/r₁ − 2/r₂ + 1/r₁₂

The first two terms are the electron kinetic energies, the next two are attraction to the Z = 2 nucleus, and the last is the electron-electron repulsion — the term that makes the problem unsolvable in closed form. A natural trial function is a product of two hydrogen-like 1s orbitals, but with the nuclear charge replaced by an effective charge Z that we treat as the variational parameter:

ψ(r₁, r₂) = (Z³/π) e^(−Z r₁) e^(−Z r₂)

Carrying out the integrals gives the energy as a function of Z:

E(Z) = Z² − (27/8) Z    (Hartree)

Minimizing, dE/dZ = 2Z − 27/8 = 0, yields Z = 27/16 = 1.6875. The value is less than the true nuclear charge of 2 because each electron partially screens the nucleus from the other — the variational method discovers screening from first principles. Plugging back in:

E_min = −(27/16)² = −729/256 ≈ −2.848 Ha ≈ −77.5 eV

The experimental ground-state energy of helium is −2.9037 Ha ≈ −79.0 eV, so this one-parameter estimate is within about 2 percent — and, as guaranteed, it lies above the true value. Hylleraas (1929) added terms in the inter-electron distance r₁₂ and drove the agreement to many decimal places; his approach still sets the standard for high-precision helium calculations.

Helium trial wavefunctionParametersEnergy (Ha)Error vs −2.9037 Ha
Bare Z = 2 hydrogenic product (no minimization)0−2.750+5.3%
Effective charge Z_eff = 27/161−2.848+1.9%
Hylleraas 3-term (includes r₁₂)3−2.9024+0.04%
Hylleraas / Pekeris many-term>1000−2.903724<10⁻⁶

Rayleigh-Ritz: the linear variational method

When the trial function is a linear combination of fixed basis functions, ψ = Σᵢ cᵢ χᵢ, the minimization becomes an eigenvalue problem. Substituting into E[ψ] and setting ∂E/∂cᵢ* = 0 gives the secular equation:

Σⱼ (Hᵢⱼ − E Sᵢⱼ) cⱼ = 0     ⟺     H c = E S c

where Hᵢⱼ = ⟨χᵢ|H|χⱼ⟩ is the Hamiltonian matrix and Sᵢⱼ = ⟨χᵢ|χⱼ⟩ is the overlap matrix (S = identity for an orthonormal basis). This is a generalized eigenvalue problem: its lowest root is the best variational bound on E₀. Remarkably, the higher roots are upper bounds on the excited-state energies too — the Hylleraas-Undheim-MacDonald theorem guarantees that an N-function basis brackets the lowest N eigenvalues from above. This is the exact structure that appears in Hartree-Fock's Roothaan-Hall equations and in configuration-interaction calculations.

AspectVariational methodPerturbation theory
Requires small parameter?NoYes (H = H₀ + λV, small λ)
Bound on energy?Rigorous upper bound on E₀None guaranteed (may over- or under-shoot)
Convergence guaranteed?Monotonic as basis growsSeries may diverge (asymptotic)
Best forGround state; lowest state of a symmetrySmall corrections to a solvable H₀
Energy error given wavefunction error δψSecond order, ∝ (δψ)²Order of the truncated term

Common misconceptions

  • "The variational method gives the exact energy." It gives an upper bound. It equals E₀ only if your trial function happens to be the exact ground state — which, for hard problems, you don't know.
  • "A lower energy means a better wavefunction for everything." Not necessarily. The energy error is second order in the wavefunction error, so a state can nail the energy while giving a poor density, dipole moment, or ⟨r²⟩. Judge the wavefunction by the observable you care about.
  • "It only works for the ground state." It works cleanly for the ground state, but with an orthogonality (or symmetry) constraint it bounds excited states too: a trial function orthogonal to φ₀ satisfies ⟨H⟩ ≥ E₁.
  • "You must normalize the trial function first." You don't — dividing by ⟨ψ|ψ⟩ in the Rayleigh quotient handles normalization automatically, and the bound is independent of the overall scale of ψ.
  • "More parameters can make the bound worse." Adding parameters (while keeping the old ones reachable) can only lower or keep the minimum, never raise it — the accessible family of states strictly grows.
  • "Getting E(Z) = Z² − (27/8)Z wrong means the method failed." A wrong energy from a sensible trial function is still a valid upper bound; the method never gives you a number below E₀. If you ever compute ⟨H⟩ < E₀, you have made an algebra or normalization error.

A little history

The Rayleigh quotient dates to Lord Rayleigh's Theory of Sound (1877), where he bounded the frequencies of vibrating systems. Walther Ritz turned it into a systematic computational recipe in 1908, expanding trial functions in a basis and minimizing — the linear variational method now universally called Rayleigh-Ritz. When quantum mechanics arrived, the principle transferred immediately: the eigenvalue problem for a vibrating membrane and for the Schrödinger equation are mathematically identical. Egil Hylleraas's 1929 helium calculation was an early triumph, and by the 1950s the Roothaan-Hall formulation had made variational optimization the backbone of quantum chemistry. Today the largest supercomputers on Earth still spend much of their time doing exactly what Ritz proposed: minimizing ⟨H⟩.

Frequently asked questions

Why is ⟨H⟩ always greater than or equal to the ground-state energy?

Expand any trial state in the (unknown) energy eigenbasis: ψ = Σ cₙ φₙ, where H φₙ = Eₙ φₙ and E₀ ≤ E₁ ≤ E₂ … Then ⟨H⟩ = Σ |cₙ|² Eₙ divided by Σ |cₙ|². Since every Eₙ ≥ E₀, replacing each Eₙ by E₀ can only lower the sum, so ⟨H⟩ ≥ E₀ Σ|cₙ|² / Σ|cₙ|² = E₀. Equality holds only when the trial function IS the true ground state (all weight on c₀). You never need to know the eigenstates to use this — that is the whole point.

How do you actually minimize the trial energy?

Pick a trial wavefunction ψ(x; α, β, …) with adjustable parameters, compute the energy functional E(α, β, …) = ⟨ψ|H|ψ⟩ / ⟨ψ|ψ⟩, then set the partial derivatives to zero: ∂E/∂α = 0, ∂E/∂β = 0, and solve for the parameter values. The minimizing energy is your best upper bound. For a linear trial expansion ψ = Σ cᵢ χᵢ over fixed basis functions, minimization becomes the generalized eigenvalue problem H c = E S c (the secular equation), which is the Rayleigh-Ritz method.

How accurate is the variational estimate for the helium atom?

Using two hydrogen-like 1s orbitals with an effective nuclear charge Z_eff as the single variational parameter, minimization gives Z_eff = 27/16 = 1.6875 (less than 2 because each electron partly screens the nucleus from the other). The predicted ground-state energy is −(729/256) Hartree ≈ −77.5 eV, versus the experimental −79.0 eV — an error of only about 2 percent. Richer trial functions (Hylleraas included the inter-electron distance r₁₂) reach the experimental value to many decimal places.

What is the difference between the variational method and perturbation theory?

Perturbation theory needs a solvable H₀ and a small correction, and it gives a series that is not guaranteed to bound the true energy from above (or even to converge). The variational method needs no small parameter and always yields a rigorous upper bound on E₀ for any trial state. The trade-off is that variation only handles the ground state cleanly (excited states need orthogonality constraints), and the error in the energy is second order in the trial-state error, so a mediocre wavefunction can still give a decent energy.

Can the variational method find excited states?

Yes, with care. If you restrict the trial function to be orthogonal to the exact ground state, then ⟨H⟩ ≥ E₁, the first excited-state energy. In practice you exploit symmetry: a trial function of definite parity or angular momentum that differs from the ground state automatically stays orthogonal, so its minimized ⟨H⟩ bounds the lowest energy in that symmetry sector. The Rayleigh-Ritz secular equation with an N-function basis gives upper bounds to the lowest N energy levels simultaneously (the Hylleraas-Undheim / MacDonald theorem).

Why is the variational method the foundation of quantum chemistry?

Because it turns solving the Schrödinger equation into an optimization problem you can hand to a computer. Hartree-Fock writes the many-electron wavefunction as a single Slater determinant and variationally optimizes the orbitals, giving self-consistent-field equations; expanding those orbitals in a fixed basis set reduces everything to matrix eigenvalue problems (Roothaan-Hall). Configuration interaction, coupled cluster, and modern basis-set methods all descend from the Rayleigh-Ritz idea of minimizing ⟨H⟩ over a parametrized family of wavefunctions.

Does a better energy always mean a better wavefunction?

No — this is a famous subtlety. Because the energy error is second order in the wavefunction error, a trial state can give an excellent energy while being a poor approximation to the true ground state (and thus giving poor predictions for other observables like the dipole moment or ⟨r²⟩). Two different trial functions can give nearly identical energies but quite different densities. Always judge a wavefunction by the property you care about, not by energy alone.