Ritz Variational Method and Excited States

The single-parameter variational method squeezes one number — the ground-state energy — out of a hand-built trial function. But almost every real calculation, from a molecule's orbitals to a solid's band structure, works differently: fix a set of basis functions once, let the wavefunction be an arbitrary linear combination of them, and let the algebra find the best mixture. That is the Ritz method, and this article derives its machinery from scratch. We show that making the Rayleigh quotient stationary over the mixing coefficients turns the variational problem into a single matrix equation — the generalized eigenvalue problem Hc=E Sc\mathbf{H}\mathbf{c}=E\,\mathbf{S}\mathbf{c}, where the overlap matrix S\mathbf{S} appears precisely because a convenient basis need not be orthonormal. We then prove the result that makes the method trustworthy for excited states, not just the ground state: the MacDonald–Hylleraas interlacing theorem. Each of the nn eigenvalues of the n×nn\times n Ritz problem is a rigorous upper bound to the corresponding exact level, the roots interlace the true spectrum, and enlarging the basis lowers every root monotonically toward the exact energies. One diagonalization bounds the whole low-lying spectrum at once. We close by showing how the single-state orthogonality bound is just a 2×22\times2 Ritz problem in disguise, and how a commuting symmetry block-diagonalizes the whole calculation for free. The variational theorem itself — why ⟨H⟩≥Egs\langle H\rangle\ge E_{\text{gs}} — is established in The Variational Principle and consumed here, not re-proved.

Key takeaways

Write the trial state as ∣ψ⟩=∑ici∣ϕi⟩|\psi\rangle=\sum_i c_i|\phi_i\rangle in a fixed basis. Stationarity of ⟨H⟩\langle H\rangle in the coefficients gives the generalized eigenvalue problem Hc=ESc\mathbf{H}\mathbf{c}=E\mathbf{S}\mathbf{c} (with overlap S\mathbf{S} because the basis is not orthonormal). Its kk-th lowest root is a rigorous upper bound to the exact kk-th level, the roots interlace the true spectrum, and adding a basis function lowers every root. This turns "guess a function" into "diagonalize a small matrix," and it bounds excited states, not just the ground state.

The core insight

Linear variation converts the search for a good wavefunction into a finite matrix diagonalization. The overlap matrix S\mathbf{S} is the price of a non-orthogonal basis; the interlacing theorem is the reward — every Ritz root sits above the exact level it approximates, and the whole ladder tightens as you enlarge the basis.

Where this lives today

The Ritz method is the computational backbone of quantum chemistry and materials science. Every basis-set electronic-structure code — Hartree–Fock, configuration interaction, coupled cluster's reference, density-functional theory's Kohn–Sham problem — reduces to a generalized eigenvalue problem Fc=εSc\mathbf{F}\mathbf{c}=\varepsilon\mathbf{S}\mathbf{c} (the Roothaan equations), with the overlap matrix of atom-centred Gaussian basis functions. Finite-element and spectral methods for the Schrödinger equation are Ritz with localized or global basis functions. The interlacing theorem is what lets these codes report excited-state energies as bounds, and it underlies convergence studies where one systematically enlarges the basis and watches every level settle from above. The full self-consistent-field machinery and the design of Gaussian basis sets belong to the many-body track.

Origins · 1 minRayleigh Quotient and how this was discovered
RQ
Rayleigh Quotient
1870–1933 · London, Zürich, Toronto

The quotient at the heart of the method is Lord Rayleigh's, introduced in the Theory of Sound (§88) to bound the frequencies of vibrating systems: the ratio of a potential-to-kinetic energy integral is stationary at the true modes and bounds the lowest from above. Walther Ritz turned Rayleigh's continuous quotient into a finite matrix problem in 1908–09, discretizing over a basis so that stationarity became a secular equation — the step that made the method computable. In 1933 J. K. L. MacDonald proved the interlacing theorem that certifies each matrix root as a rigorous bound. The term secular equation for det⁡(H−ES)=0\det(\mathbf{H}-E\mathbf{S})=0 predates all of them, inherited from celestial mechanics.

History
1870
— Rayleigh introduces the energy quotient for vibration frequencies in the Theory of Sound.
1908
— Ritz publishes the discretized variational method for eigenvalue problems.
1929
— the method is carried into quantum mechanics for atomic and molecular energies.
1933
— MacDonald proves that each Ritz root is a rigorous upper bound to the corresponding exact level.
1951
— Roothaan casts Hartree–Fock as a generalized matrix eigenvalue problem with an overlap matrix.

The physical picture

The variational principle you already know is a promise: pick any normalizable trial state, and its energy expectation can never dip below the true ground state. Single-parameter variation exploits that with one adjustable knob — a width aa, an effective charge Z′Z' — and slides it to the lowest energy. The Ritz method changes the strategy. Instead of one flexible function, you commit to a fixed toolkit of functions {ϕ1,ϕ2,…,ϕn}\{\phi_1,\phi_2,\dots,\phi_n\} and let the wavefunction be any linear combination of them. The knobs are now the mixing coefficients cic_i, and — this is the crucial point — the energy is a quadratic function of those coefficients. Quadratic minimization is linear algebra. The best mixture, and the best energy, come out of a matrix eigenvalue problem, not a nonlinear search.

Figure
Two ways to bound the ground-state energy: slide one knob, or diagonalize a fixed toolkit
Two ways to bound the ground-state energy energy ⟨H⟩ exact E₀ (floor) single knob: slide a → min one number out fixed basis {φ₁…φₙ} ψ = c₁φ₁ + c₂φ₂ + ⋯ ⟨H⟩ = c†Hc / c†Sc stationary → Hc = E Sc n roots = n bounds at once whole spectrum, one diagonalization Left: nonlinear slide of one parameter. Right: linear algebra over a fixed toolkit — the Ritz method.

Why does the overlap matrix appear? If your toolkit functions were mutually orthonormal, ⟨ϕi∣ϕj⟩=δij\langle\phi_i|\phi_j\rangle=\delta_{ij}, the energy would be the ordinary quadratic form c†Hc\mathbf{c}^\dagger\mathbf{H}\mathbf{c} over a unit sphere, and you would get an ordinary eigenvalue problem. But convenient basis functions — atomic orbitals on different atoms, Gaussians of different widths, powers of xx — are almost never orthogonal. The overlaps Sij=⟨ϕi∣ϕj⟩S_{ij}=\langle\phi_i|\phi_j\rangle bookkeep that non-orthogonality, and they turn the problem into a generalized eigenvalue problem. This is not a nuisance; it is what lets you throw physically motivated, redundant functions at a problem without first orthogonalizing them by hand.

Figure
Interlacing: every Ritz root sits above the exact level, and the whole ladder drops as the basis grows
Interlacing: every Ritz root sits above the exact level — and the whole ladder drops as the basis grows energy exact E₁ exact E₂ exact E₃ 3-function basis 4.935 21.00 51.07 +4th function 4.935 19.75 51.07 adding a function lowers the root Infinite square well (ℏ=m=1, L=1), polynomial basis. Blue roots bound the exact green levels from above; gold roots (bigger basis) sit lower.

From the Rayleigh quotient to the secular equation

The object to minimize is the Rayleigh quotient, the energy expectation of the trial state divided by its norm. Writing the trial state as a linear combination ∣ψ⟩=∑ici∣ϕi⟩|\psi\rangle=\sum_i c_i|\phi_i\rangle in a fixed basis, and collecting the coefficients into a column vector c\mathbf{c}, the numerator and denominator both become quadratic forms in c\mathbf{c}. Define the Hamiltonian matrix Hij=⟨ϕi∣H∣ϕj⟩H_{ij}=\langle\phi_i|H|\phi_j\rangle and the overlap matrix Sij=⟨ϕi∣ϕj⟩S_{ij}=\langle\phi_i|\phi_j\rangle. Then the energy functional reads

E[c]=c†Hcc†Sc.\mathcal{E}[\mathbf{c}]=\frac{\mathbf{c}^\dagger\mathbf{H}\mathbf{c}}{\mathbf{c}^\dagger\mathbf{S}\mathbf{c}}.

where: H\mathbf{H} and S\mathbf{S} are the n×nn\times n Hamiltonian and overlap matrices in the chosen basis, both Hermitian; S\mathbf{S} is also positive-definite because it is a Gram matrix of linearly independent functions. Physically E\mathcal{E} is just ⟨H⟩\langle H\rangle for the normalized version of ∣ψ⟩|\psi\rangle — the variational principle guarantees it never drops below EgsE_{\text{gs}}. The stationary points of this quotient — where its gradient with respect to the coefficients vanishes — are the best mixtures the basis can produce. Setting ∂E/∂c†=0\partial\mathcal{E}/\partial\mathbf{c}^\dagger=0 and clearing the denominator gives the central equation of the method.

Derivation AStationarity of the Rayleigh quotient gives Hc = ESc

The goal here is to show that the innocent act of minimizing an energy over mixing coefficients produces, with no further assumptions, a generalized matrix eigenvalue problem — and that the eigenvalue EE is exactly the stationary energy. We differentiate the quotient, set it to zero, and read off the equation. The overlap matrix survives on the right-hand side precisely because the basis is not orthonormal.

Step 1. Write E=N/D\mathcal{E}=N/D with numerator N=c†HcN=\mathbf{c}^\dagger\mathbf{H}\mathbf{c} and denominator D=c†ScD=\mathbf{c}^\dagger\mathbf{S}\mathbf{c}. Both are real (the matrices are Hermitian), and D>0D>0 for any nonzero c\mathbf{c}.

Step 2. Differentiate with respect to the (independent) conjugate coefficients. The quotient rule gives

∂E∂c†=1D(Hc−ND Sc)=1D(Hc−E Sc).\frac{\partial\mathcal{E}}{\partial\mathbf{c}^\dagger}=\frac{1}{D}\left(\mathbf{H}\mathbf{c}-\frac{N}{D}\,\mathbf{S}\mathbf{c}\right)=\frac{1}{D}\left(\mathbf{H}\mathbf{c}-\mathcal{E}\,\mathbf{S}\mathbf{c}\right).

Step 3. Stationarity means this vanishes for every component. Since D≠0D\ne0, the bracket must be zero:

 Hc=E Sc \boxed{\ \mathbf{H}\mathbf{c}=\mathcal{E}\,\mathbf{S}\mathbf{c}\ }

which is the generalized eigenvalue problem. Non-trivial solutions exist only when the secular equation det⁡(H−E S)=0\det(\mathbf{H}-E\,\mathbf{S})=0 holds — an nn-th degree polynomial in EE with nn real roots.

Step 4. At a stationary point, left-multiply Hc=ESc\mathbf{H}\mathbf{c}=\mathcal{E}\mathbf{S}\mathbf{c} by c†\mathbf{c}^\dagger: N=EDN=\mathcal{E}D, so E=N/D\mathcal{E}=N/D equals the eigenvalue. The stationary values of the Rayleigh quotient are exactly the roots of the secular equation. Why this matters. Every basis-set electronic-structure calculation ever run — Hartree–Fock, configuration interaction, tight-binding — is this equation with a particular basis. The same det⁡(H−ES)=0\det(\mathbf{H}-E\mathbf{S})=0 appears in Degenerate Perturbation Theory as the secular determinant that splits a degenerate level; here it is the master equation of an entire approximation method. Verified: the symbolic residual ∂E/∂c†⋅D−(Hc−ESc)\partial\mathcal{E}/\partial\mathbf{c}^\dagger\cdot D - (\mathbf{H}\mathbf{c}-\mathcal{E}\mathbf{S}\mathbf{c}) is identically zero for a general 2×22\times2 Hermitian H,S\mathbf{H},\mathbf{S} (verify script, sympy).

The single equation Hc=ESc\mathbf{H}\mathbf{c}=E\mathbf{S}\mathbf{c} carries the whole method. When the basis happens to be orthonormal, S=I\mathbf{S}=\mathbf{I} and it collapses to an ordinary eigenvalue problem; the general case is the honest one. The overlap grammar — the secular determinant det⁡(H−ES)=0\det(\mathbf{H}-E\mathbf{S})=0 — is the same object that Degenerate Perturbation Theory builds to diagonalize a perturbation within a degenerate subspace; there S=I\mathbf{S}=\mathbf{I} because the degenerate eigenstates are already orthonormal, so the two settings are the same algebra seen through different lenses.

Why the roots are trustworthy: interlacing

Getting a matrix equation is only useful if its eigenvalues mean something. The single-state variational principle already tells us the lowest Ritz root is an upper bound to the true ground energy. The far stronger — and less obvious — fact is that every root is an upper bound to the corresponding exact level, and that the roots interlace the true spectrum. This is the MacDonald–Hylleraas theorem, and it is what makes Ritz a method for excited states, not just a ground-state trick.

Go deeper · Derivation B · 1 minThe MacDonald-Hylleraas interlacing theorem
Derivation BThe MacDonald-Hylleraas interlacing theorem

The goal is to prove that the kk-th lowest Ritz root bounds the exact kk-th level from above, and that enlarging the basis can only push every root downward. The engine is the Courant–Fischer min-max characterization of eigenvalues, applied to the Hamiltonian restricted to the trial subspace. This is the structural result that separates a rigorous bound from a hopeful estimate.

Step 1. The Ritz problem is exactly the Hamiltonian HH restricted to the finite subspace Vn=span{ϕ1,…,ϕn}V_n=\text{span}\{\phi_1,\dots,\phi_n\}. Its roots E(1)≤E(2)≤⋯≤E(n)E^{(1)}\le E^{(2)}\le\dots\le E^{(n)} are the eigenvalues of the compression PnHPnP_nHP_n, where PnP_n projects onto VnV_n.

Step 2. The Courant–Fischer theorem writes the exact kk-th eigenvalue as a min-max over kk-dimensional subspaces of the full space,

Ek−1=min⁡dim⁡W=k max⁡ψ∈W ⟨ψ∣H∣ψ⟩⟨ψ∣ψ⟩,E_{k-1}=\min_{\dim W=k}\ \max_{\psi\in W}\ \frac{\langle\psi|H|\psi\rangle}{\langle\psi|\psi\rangle},

and the kk-th Ritz root as the same min-max but restricted to subspaces W⊆VnW\subseteq V_n.

Step 3. Restricting the search to a smaller collection of subspaces can only raise the minimum. Therefore

E(k) ≥ Ek−1for every k,E^{(k)}\ \ge\ E_{k-1}\qquad\text{for every }k,

the upper-bound half of the theorem: the kk-th Ritz root bounds the exact kk-th level (indexed from the ground state E0E_0).

Step 4. Now enlarge the basis, Vn⊂Vn+1V_n\subset V_{n+1}. The min-max search runs over a larger family of subspaces, so every root can only fall or hold: En+1(k)≤En(k)E^{(k)}_{n+1}\le E^{(k)}_n. Cauchy's interlacing theorem sharpens this to En+1(k)≤En(k)≤En+1(k+1)E^{(k)}_{n+1}\le E^{(k)}_n\le E^{(k+1)}_{n+1} — the smaller problem's roots interlace the larger's. Why this matters. One diagonalization of an n×nn\times n matrix yields nn certified upper bounds simultaneously. Enlarge the basis and every bound tightens monotonically — you can watch the whole low-lying spectrum converge from above. No excited-state calculation in quantum chemistry would be trustworthy without this theorem. Verified: on the infinite square well with a polynomial basis ϕk=xk+1(1−x)\phi_k=x^{k+1}(1-x), the 3-function roots {4.935,21.00,51.07}\{4.935, 21.00, 51.07\} each exceed the exact levels {4.935,19.74,44.41}\{4.935, 19.74, 44.41\}; adding a 4th function lowers them to {4.935,19.75,51.07}\{4.935, 19.75, 51.07\} (every shared root drops or holds), and the two sets interlace — verify script, scipy generalized eigensolver.

Limiting cases

SituationWhat the Ritz method givesReading
Orthonormal basis S=I\mathbf{S}=\mathbf{I}Ordinary eigenproblem Hc=Ec\mathbf{H}\mathbf{c}=E\mathbf{c}The overlap disappears; the special case textbooks start from
Single basis function (n=1n=1)E(1)=⟨ϕ1∣H∣ϕ1⟩/⟨ϕ1∣ϕ1⟩E^{(1)}=\langle\phi_1|H|\phi_1\rangle/\langle\phi_1|\phi_1\rangleThe Rayleigh quotient — ordinary one-shot variation
Basis contains the exact eigenstateThat root equals the exact level exactlyThe bound is saturated; the family "contained the answer"
Complete basis (n→∞n\to\infty)Every root →\to exact level from aboveConvergence governed by completeness of the set
Basis blind to a symmetry sectorBounds only the states it can representMissing a symmetry class means missing those levels

Worked examples

Example 1 — A two-state Ritz problem for hydrogen, and why one root is exact. Take the hydrogen atom (ℓ=0\ell=0, atomic units, exact ground −0.5-0.5 Ha) and the two-function basis {e−r, r e−r}\{e^{-r},\ r\,e^{-r}\}. These are not orthogonal, so we need the overlap matrix. We build the 2×22\times2 Hamiltonian and overlap matrices from the radial integrals and solve the secular equation.

Step 1. Compute the matrix elements with the radial measure r2 drr^2\,dr: Sij=∫0∞ϕiϕj r2drS_{ij}=\int_0^\infty \phi_i\phi_j\,r^2dr and Hij=12∫ϕi′ϕj′ r2dr−∫ϕiϕj r drH_{ij}=\tfrac12\int \phi_i'\phi_j'\,r^2dr-\int\phi_i\phi_j\,r\,dr (kinetic term integrated by parts).

Step 2. Solve det⁡(H−ES)=0\det(\mathbf{H}-E\mathbf{S})=0. The two roots come out at −0.5-0.5 Ha and +0.167+0.167 Ha.

Step 3. Read the result. The lower root is exactly −0.5-0.5 Ha — because the basis contains e−re^{-r}, which is the true 1s1s ground state, so the ground-state bound is saturated. The upper root, +0.167+0.167 Ha, is a legitimate but weak upper bound to the true 2s2s level at −0.125-0.125 Ha: this crude two-function basis simply has nothing resembling a node, so its "excited" root is far above the real one. The bound is honest; the basis is inadequate for the excited state. The lesson: the interlacing guarantee holds regardless of basis quality — the roots are always upper bounds — but the tightness of each bound is only as good as the basis's ability to represent that state.

Example 2 — Watching interlacing tighten in the infinite square well. Take the infinite square well (ℏ=m=1\hbar=m=1, width 11; exact levels En=n2π2/2E_n=n^2\pi^2/2, i.e. 4.935, 19.74, 44.41,…4.935,\ 19.74,\ 44.41,\dots) with the polynomial basis ϕk=xk+1(1−x)\phi_k=x^{k+1}(1-x), which vanishes at both walls.

Step 1. With n=2n=2 functions, the ground root is 5.0005.000, already 1.3%1.3\% above the exact 4.9354.935.

Step 2. With n=3n=3 functions, the roots are {4.935, 21.00, 51.07}\{4.935,\ 21.00,\ 51.07\} — the ground bound has tightened to 0.0015%0.0015\%, and each root exceeds the corresponding exact level.

Step 3. Add a 4th function. The roots drop to {4.935, 19.75, 51.07, 100.2}\{4.935,\ 19.75,\ 51.07,\ 100.2\}: every one of the first three roots fell or held (the second dropped from 21.0021.00 to 19.7519.75, toward the exact 19.7419.74), and the four-function roots interlace the three-function ones. This is the interlacing theorem made visible — a monotone descent toward the exact spectrum from above, one basis function at a time.

Check yourself

  • Why does the overlap matrix S\mathbf{S} appear, and when does it disappear?
  • If the kk-th Ritz root is a bound to the exact kk-th level, what does adding a basis function do to it?
  • When is a Ritz root equal to an exact level?
  • How is the single-state orthogonality bound a 2×22\times2 Ritz problem?

Going further

The linear-variational method sits between single-parameter variation (The Variational Principle, which supplies the upper-bound theorem this article consumes) and the full apparatus of quantum chemistry. Its secular-determinant grammar is shared with Degenerate Perturbation Theory; its symmetry block-diagonalization draws on Symmetries and Conservation in Quantum Dynamics and Good Quantum Numbers and Symmetry-Adapted Bases; its convergence rests on Completeness Relation and Resolution of Identity. For the self-consistent-field and correlation methods built on top of it, see the many-body track. Provenance. Variational principle and Rayleigh quotient bound: Griffiths Ch. 8; Shankar Ch. 16. Secular/generalized eigenvalue equation derivation: Cohen-Tannoudji Vol. II Complement E_XI; Szabo & Ostlund for the Roothaan form. MacDonald–Hylleraas interlacing: J. K. L. MacDonald, Phys. Rev. 43, 830 (1933), and the matrix Cauchy interlacing theorem (any linear-algebra text). A verifier should confirm: (1) stationarity of the Rayleigh quotient yields Hc=ESc\mathbf{H}\mathbf{c}=E\mathbf{S}\mathbf{c}; (2) the min-max proof of E(k)≥Ek−1E^{(k)}\ge E_{k-1}; (3) the orthogonality bound E[ψ]≥E1E[\psi]\ge E_1 for ⟨ψ∣0⟩=0\langle\psi|0\rangle=0; and (4) symmetry block-diagonalization when [H,A]=0[H,A]=0. No numerical atomic energies are quoted to avoid imprecision; cited results are qualitative and theorem-level.

Is the Ritz method the same as diagonalizing the Hamiltonian?

In a finite basis, yes — that is exactly what it is. The subtlety is that a finite basis can only capture the projection of the Hamiltonian onto its span, so the eigenvalues are bounds, not exact levels. "Diagonalizing the Hamiltonian" in an infinite complete basis would be exact; Ritz is the finite, tractable version with a rigorous error direction (always from above).

Why not just orthogonalize the basis first and avoid the overlap matrix?

You can — Löwdin (symmetric) orthogonalization or Gram–Schmidt turns S\mathbf{S} into the identity. But it is extra work, it mixes your physically transparent functions into less intuitive combinations, and modern eigensolvers handle the generalized problem Hc=ESc\mathbf{H}\mathbf{c}=E\mathbf{S}\mathbf{c} directly. Keeping S\mathbf{S} explicit is usually cleaner.

Can a Ritz root ever come out below the exact ground state?

No — that would violate the variational principle. If a computed root ever dips below the known exact ground energy, it is a numerical artifact: almost always a near-linear-dependent basis making S\mathbf{S} nearly singular, so the generalized eigensolver returns garbage. The fix is to prune redundant functions or regularize S\mathbf{S}.

How does the excited-state bound relate to the orthogonality method?

They are the same thing. The orthogonality bound — restrict the trial to be orthogonal to the ground state, then ⟨H⟩≥E1\langle H\rangle\ge E_1 — is precisely the second root of a 2×22\times2 Ritz problem whose first basis function is the (exact or approximate) ground state. Ritz generalizes it to any number of states at once.

What does symmetry buy me in a Ritz calculation?

If the Hamiltonian commutes with a symmetry operator A^\hat A (parity, angular momentum, a point-group operation), choosing basis functions of definite A^\hat A-eigenvalue makes both H\mathbf{H} and S\mathbf{S} block-diagonal. Each block is an independent, smaller Ritz problem, and its roots bound the levels within that symmetry sector. This is how large calculations are split into manageable pieces — the same block structure Good Quantum Numbers exploits.

Why does a first-order wavefunction error give only a second-order energy error?

Because the energy is stationary at an eigenstate: near a stationary point, the leading change is quadratic in the displacement. That is the quadratic-accuracy theorem proved in The Variational Principle, and it is why even a mediocre Ritz basis can give a very good ground-state energy while the wavefunction is visibly wrong.

Does the interlacing theorem require the basis functions to be linearly independent?

Yes. Linear independence is what makes the overlap matrix S\mathbf{S} positive-definite, which the min-max argument needs. Linearly dependent (or nearly dependent) functions make S\mathbf{S} singular (or ill-conditioned), and the theorem's guarantees degrade along with the numerics.

Before this

Where this leads