The Rayleigh-Ritz Method
A great many physical laws are stated not as equations of motion but as principles of extremization: a soap film minimizes area, a ray of light minimizes optical path, a quantum ground state minimizes energy. The calculus of variations turns each such principle into an Euler-Lagrange differential equation — the exact condition for stationarity — but that equation is very often one nobody can solve in closed form. The Rayleigh-Ritz method is the escape hatch. Rather than solve the differential equation, it works directly on the functional, and rather than search the whole infinite-dimensional space of admissible functions it searches only a finite-parameter family of trial functions chosen by hand. Within that family the functional is no longer a machine that eats functions; it is an ordinary function of a few numbers, and stationarity is enforced by ordinary partial derivatives. That single move — restrict, then differentiate — converts a hard variational problem into a solvable algebraic one. For a linear trial expansion the algebra is a matrix eigenproblem, and when the functional is the Rayleigh quotient of a self-adjoint operator the method acquires its most celebrated property: the lowest computed value can never fall below the true ground-state eigenvalue. The estimate is not merely approximate but controlled, with a known direction of error, and enlarging the trial family can only push it downward toward the truth. This is why the same recipe reappears wherever physics meets computation — as the finite element method in engineering, as LCAO and Hartree-Fock in quantum chemistry, as spectral methods in fluid dynamics, and most recently as the variational quantum eigensolver on quantum hardware.
- The Rayleigh-Ritz method approximates the extremum of a functional by replacing the infinite-dimensional search over all admissible functions with a finite one over a trial family u(x) = Σ cₖ φₖ(x).
- Stationarity collapses from the Euler-Lagrange differential equation to the algebraic system ∂J/∂cₖ = 0 — a finite set of equations for the coefficients.
- For the Rayleigh-quotient (eigenvalue) form the conditions become a generalized matrix eigenproblem Hc = λSc, whose lowest root is a rigorous upper bound on the true smallest eigenvalue.
- Accuracy is set by the trial functions: they must be admissible (satisfy the essential boundary conditions) and, for guaranteed convergence, complete as N → ∞.
- It is the conceptual ancestor of the finite element method and the working engine of computational quantum chemistry, and it complements the Euler-Lagrange equation exactly when no closed-form solution exists.
- Key idea: Restrict the functional to a finite-dimensional trial space; stationarity then collapses from a differential equation to the algebraic system ∂J/∂cₖ = 0, and for self-adjoint eigenvalue problems the lowest Ritz value bounds the true eigenvalue from above.
Where this lives today
The Rayleigh-Ritz recipe runs inside a staggering fraction of modern computation. Its direct descendant, the finite element method, is the dominant tool for stress analysis, heat transfer, and electromagnetics: every aircraft wing, bridge, and chip package is validated by Ritz-type minimization over piecewise-polynomial trial functions on a mesh, the variational origin guaranteeing the stability engineers rely on. In quantum chemistry the whole edifice is variational — Hartree-Fock, configuration interaction, and coupled-cluster methods all expand molecular orbitals in fixed atomic-orbital bases and solve a secular equation. Hylleraas's explicitly correlated trial functions push the helium bound of a.u. shown above to the experimental a.u. and beyond, to microhartree agreement, using thousands of parameters. Most strikingly, the idea has migrated onto quantum hardware: the variational quantum eigensolver (VQE) prepares a parameterized trial state on a quantum processor, measures its energy, and classically minimizes over the parameters — a Rayleigh-Ritz calculation whose "trial function" is a physical quantum circuit, and where the upper-bound theorem still fixes the sign of the error.
The physical picture
Imagine hunting for the lowest point of a vast, smooth landscape — the functional over every admissible function — but you may walk only along a handful of prescribed roads, the trial family. You find the lowest point reachable from those roads. It can never lie below the true valley floor, but it comes as close as the roads allow, and paving one more road can only lower where you end up. That is the whole method: trade the freedom to go anywhere for a search you can actually finish, and accept an answer whose error you can at least sign. For energy-like functionals the error always points the same way — the estimate sits above the truth — so you know which side of the answer you are on before you know how close.
For an eigenvalue problem the landscape is exactly the Rayleigh quotient of a self-adjoint operator, and the "roads" are the span of the trial functions. Any trial function returns a weighted average of the true eigenvalues, so the value can never undershoot the smallest one; minimizing over the trial space squeezes that average toward the true minimum. This is the variational principle underlying essentially all of quantum chemistry, and it is quantitative: a single well-chosen parameter can capture 98% of the binding energy of the helium atom. The second figure is that calculation — the trial energy of helium against one variational parameter, the effective nuclear charge.
The core equations
The method begins with a single modelling choice: expand the unknown extremal in a finite set of chosen functions. Everything downstream follows from this expansion and the linear algebra it induces.
where: — trial function approximating the true extremal; — chosen basis (trial) functions, admissible and ideally complete; — adjustable coefficients; — dimension of the trial space. Reading it: the unknown function collapses to a finite list of numbers , and the answer's quality is fixed the moment the are chosen. Substituting the expansion turns the functional into an ordinary function , whose stationary points obey the Ritz conditions — the step that demotes a variational problem to a calculus problem.
where: — the functional after substitution, now a function of the coefficients; — an ordinary partial derivative. Reading it: the condition has become scalar equations in unknowns. For eigenvalue problems the functional is the Rayleigh quotient of a self-adjoint operator. Its value on any trial function is a weighted average of the operator's eigenvalues — the source of the bounding property.
where: — the Rayleigh quotient; — a self-adjoint (Hermitian) linear operator; — the inner product. Reading it: stationary points of are exactly the eigenfunctions of , and the stationary values its eigenvalues. Inserting the linear expansion into the Rayleigh quotient and applying the Ritz conditions produces a generalized matrix eigenproblem — the computational heart of the method.
where: — Hamiltonian (or stiffness) matrix elements; — overlap (or mass) matrix, the identity for an orthonormal basis; — the Ritz eigenvalue estimate. Reading it: the operator problem has become the finite matrix problem , solvable by standard linear algebra. The Ritz eigenvalues are the roots of the secular equation, the determinant that makes the eigenproblem nontrivially solvable.
where: — the determinant; its roots are the Ritz values. Reading it: this is the LCAO secular equation of quantum chemistry and the eigenfrequency condition of structural mechanics — one object. The lowest Ritz value obeys the variational upper-bound principle — the single fact that elevates the method from an approximation to a controlled one.
where: — the smallest exact eigenvalue of . Reading it: no trial function, however crude, can push the Rayleigh quotient below the true ground state — the error has a guaranteed sign. Many mechanics and quantum problems arrive as a Sturm-Liouville energy functional, whose stationarity is the eigenvalue problem the method attacks.
where: — Sturm-Liouville coefficient functions with ; — the eigenvalue, a Lagrange multiplier enforcing the -weighted normalization. Reading it: the first integral is the "stiffness" energy, the second the "mass" normalization, and their ratio is the Rayleigh quotient (3).
The goal is to show how the exact stationarity condition over an infinite-dimensional function space degenerates, once the search is restricted to a finite trial family, into the finite algebraic system , and how for the Rayleigh quotient that system becomes the generalized matrix eigenproblem . We follow the chain from the variation, through the linear expansion, to the secular determinant, so the recipe is justified rather than merely asserted.
Step 1. On the trial manifold every admissible variation is built from the coefficients alone: , because the are fixed and only the are free. Why: this restriction shrinks an uncountable freedom (any ) down to real knobs, and it is the only modelling assumption in the whole method.
Step 2. The first variation therefore contracts by the chain rule to . Since the are independent and arbitrary, forces each to vanish, giving the Ritz conditions . Why: the fundamental lemma of the calculus of variations, which needed an arbitrary function in the Euler-Lagrange case, here needs only arbitrary numbers — the same logic, finite-dimensional.
Step 3. Specialize to the Rayleigh quotient and insert the expansion. With and , the quotient becomes a ratio of quadratic forms, . Why: the matrices and absorb every integral once and for all, so the rest is pure linear algebra in the coefficient vector .
Step 4. Differentiate the ratio and set . By the quotient rule the numerator gradient must be parallel to the denominator gradient, with proportionality constant itself; this yields , that is with . Why: stationarity of a Rayleigh quotient is algebraically identical to an eigenvalue condition — stationary values are eigenvalues, stationary vectors eigenvectors, which is why Ritz values approximate the true spectrum.
Step 5. A nonzero exists only when , the secular equation, whose roots are the Ritz eigenvalues. Why: this determinant is the practical output — the same secular equation solved in LCAO molecular-orbital theory and in the modal analysis of a vibrating structure.
Go deeper · Derivation B · 1 minThe variational upper bound on the ground state
The aim here is to prove the theorem that makes Rayleigh-Ritz trustworthy: for any self-adjoint operator with a discrete spectrum bounded below, the Rayleigh quotient of every admissible trial function is greater than or equal to the smallest eigenvalue, with equality only for the exact ground state. This guarantees that the method returns an upper bound and that improving the trial space can only lower — never raise — the estimate, turning approximation into a controlled, one-sided statement.
Step 1. Let be the complete orthonormal eigenbasis of with and ordered eigenvalues . Expand any admissible trial function as . Why: completeness of the eigenbasis is what lets an arbitrary trial function be analysed in terms of the very eigenvalues we are trying to bound.
Step 2. Because is self-adjoint the cross terms diagonalize, and the Rayleigh quotient becomes — a convex weighted average of the eigenvalues with non-negative weights . Why: writing as a genuine weighted mean is the crux; a mean of numbers can never be smaller than the smallest number entering it.
Step 3. Replace every in the numerator by the smallest, : since , we get . Equality holds only if for every , i.e. is exactly a ground state. Why: this is the upper-bound theorem in one line, and it shows the error is second order — a first-order-wrong wavefunction still gives a second-order-accurate energy, the reason one-parameter estimates work so well.
Step 4. Within a trial subspace the lowest Ritz value is the minimum of over that subspace, hence still ; enlarging the subspace can only lower it, giving monotone convergence from above. The Hylleraas-Undheim-MacDonald theorem extends this: the -th Ritz value bounds the -th true eigenvalue, all moving down monotonically as the basis grows. Why: this promotes the single-state bound to the whole computed spectrum, justifying excited-state estimates from a Ritz calculation.
Go deeper · Derivation C · 1 minEssential and natural boundary conditions in the Ritz reduction
The purpose of this derivation is to settle a question that trips up every newcomer: which boundary conditions the trial functions must satisfy and which they may ignore. Integrating the Sturm-Liouville energy functional by parts exposes an explicit boundary term, and shows that essential (Dirichlet) conditions must be imposed by hand, whereas natural (Neumann-type) conditions are delivered for free by stationarity as the trial space is enlarged.
Step 1. Vary the energy functional (7). The first variation contains , with alongside . Why: the derivative of the variation forces an integration by parts, and integration by parts always generates a boundary term.
Step 2. Integrate the term by parts: . The interior integral reassembles the Sturm-Liouville operator; the bracket is the boundary term. Why: the bulk term recovers the differential equation, so the whole boundary-condition question sits in the surviving bracket .
Step 3. For the variation to be stationary the boundary term must vanish. There are two ways to kill it at each endpoint: pin the value so there (an essential condition, e.g. ), or leave free and let stationarity enforce there (a natural condition). Why: essential conditions constrain the trial space in advance because is not free at a pinned end, so the trial functions must already satisfy them to be admissible.
Step 4. Consequently the must satisfy the essential conditions exactly but not the natural ones, which are approached automatically as grows because the extra freedom drives at the free ends. Why: this is the practical rule — impose Dirichlet-type conditions on the ansatz and trust the machinery to supply the Neumann-type ones; forgetting the first half silently invalidates the bound.
Limiting cases
The method's behaviour is dictated by the trial space and by whether the operator is self-adjoint:
| Case | Result | Meaning |
|---|---|---|
| Complete basis, | A complete trial set makes the Ritz estimate converge monotonically from above to the true extremum. | |
| Exact solution inside the family | If the true extremal already lives in the trial space, the method returns it exactly. | |
| Single parameter, | Reduces to one-variable minimization — the crudest but most transparent estimate, e.g. the helium -scaling. | |
| Self-adjoint eigenvalue problem | The lowest Ritz value is a strict upper bound, with equality only if the trial space contains the ground state. | |
| Non-self-adjoint / indefinite functional | no one-sided bound | Without self-adjointness the Rayleigh quotient is not a weighted average, so stationary values need not bound the spectrum. |
Worked examples
1 · Infinite square well by a quadratic ansatz (fully worked)
A particle lives in the infinite well on , with . Estimate the ground-state energy with a single parameter-free polynomial trial function. Use .
Step 1. Choose the simplest admissible ansatz — a quadratic vanishing at both walls: . It satisfies the essential conditions with no free parameters, so no minimization is needed.
Step 2. Kinetic numerator. With , integrate by parts to . Here and , so the numerator is .
Step 3. Normalization denominator: , a standard beta-function integral .
Step 4. Form the quotient: . The exact ground state is , so the estimate exceeds it by and lies above it, as the upper-bound theorem demands. E_Ritz = 5/a² ≥ 4.9348/a² = E₁, a 1.3% overestimate.
2 · Fundamental frequency of a vibrating string (Rayleigh's original method)
A uniform string of length , tension , and linear density is fixed at both ends. Estimate its fundamental angular frequency from a trial shape.
Step 1. For the wave equation the Rayleigh quotient is , an upper bound on for any admissible shape .
Step 2. Reuse the admissible parabola , pinning both ends. The integrals are the ones already evaluated: and .
Step 3. Hence , giving .
Step 4. The exact fundamental is , so the estimate is high by only , again an upper bound — the same one-parameter shape that estimated a quantum energy now estimates a classical frequency. ω_Ritz = √10/L·√(T/ρ), just 0.65% above the exact π/L·√(T/ρ).
3 · Helium ground state by scaled nuclear charge (fully worked)
Two electrons orbit a nucleus of true charge . Estimate the ground-state energy using a product of hydrogen-like 1s orbitals whose effective charge is a single variational parameter. Atomic units.
Step 1. Trial state: , a normalized product of 1s orbitals with adjustable . Screening should push below the bare .
Step 2. Energy expectation. Kinetic plus electron-nucleus pieces give (kinetic from two electrons, attraction with true charge ), and the electron-electron repulsion integral contributes , so .
Step 3. Minimize: . Each electron screens about of a charge from the other.
Step 4. Evaluate: a.u. Experiment is a.u.; the estimate lies above it, capturing about of the binding energy from one number. E_min = −(27/16)² ≈ −2.848 a.u. ≥ −2.9037 a.u. (experiment), 98% captured.
Physics of the portrait
The method carries two names because it was invented twice — once as a physicist's shortcut for bounding frequencies, once as a general theory of variational problems — and the join between them is one of the more poignant episodes in mathematical physics.
Origins · 1 minWalther Ritz and how this was discovered
Walther Ritz was a Swiss theoretical physicist whose short life produced a method used by millions of computers every day. Born in Sion in 1878, he studied at Göttingen under Woldemar Voigt and was first known for the Rydberg-Ritz combination principle in spectroscopy. His lasting monument is the 1908–1909 work setting out a general procedure for the "problems of mathematical physics" that reduce to minimizing a functional: expand the unknown in a finite series of chosen functions, substitute into the energy integral, and minimize over the coefficients — the method now taught as Rayleigh-Ritz. He demonstrated it triumphantly on the vibrating clamped plate, reproducing the intricate nodal patterns of Chladni's sand figures that had defeated exact analysis for a century. Lord Rayleigh, who had used trial shapes to bound fundamental frequencies in his 1877 Theory of Sound, noted in 1911 that the essential variational idea was already his; historians credit Rayleigh with the bounding principle and Ritz with the systematic multi-parameter method, and the hyphenated name honours both. Ritz did not live to see the argument: gravely ill with tuberculosis, he died in Göttingen in July 1909, months after his landmark papers, at the age of 31. His finite-series idea, later fused with piecewise-polynomial trial functions by Richard Courant, grew into the finite element method — arguably the most widely used numerical technique in all of engineering.
Going further
Texts. Stone & Goldbart, Mathematics for Physics (2009), Ch. 1 (calculus of variations) · Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed., Ch. 22 · Hassani, Mathematical Physics, 2nd ed., Ch. on variational methods · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 22 · Gelfand & Fomin, Calculus of Variations (1963), Ch. 8 · Courant & Hilbert, Methods of Mathematical Physics, Vol. 1, Ch. VI. The key numerical checks across the worked examples are: (1) the square-well integrals and , giving versus exact (1.3% high); (2) the string frequency , i.e. versus exact (0.65% high); (3) the helium energy , minimum at , a.u. versus experiment a.u.; (4) the upper-bound theorem follows from expanding any trial function in the eigenbasis of , as shown in the derivation above.
Prerequisites. Functionals and Function Spaces · First Variation and Stationarity · Euler-Lagrange Equation · Natural and Essential Boundary Conditions. Leads to. Constrained Variation and Lagrange Multipliers · Isoperimetric Problems · Hamilton's Principle of Stationary Action.
Ask the tutor: Ask me to run a two-term Ritz calculation on the square well and watch the estimate drop monotonically toward the exact answer, always from above.
How is the Rayleigh-Ritz method different from just solving the Euler-Lagrange equation?
They are two routes to the same stationary point, taken from opposite directions. The Euler-Lagrange equation is the exact condition over the whole function space; it is a differential equation, and if you can solve it you have the exact extremal. Rayleigh-Ritz never forms that differential equation — it restricts the search to a finite trial family and imposes stationarity there, producing algebra instead. When the Euler-Lagrange equation is unsolvable in closed form, which is the usual situation for real geometries and potentials, the Ritz route still delivers a controlled numerical answer, and as the trial space is completed the two solutions coincide.
Why is the estimate always an upper bound rather than sometimes too high and sometimes too low?
Because for a self-adjoint operator the Rayleigh quotient of any trial function is a genuine weighted average of the true eigenvalues, with non-negative weights given by the squared expansion coefficients. A weighted average can never be smaller than the smallest number entering it, so the quotient can never fall below the lowest eigenvalue and the error has a fixed sign. This one-sidedness is what makes the method a bound rather than merely an approximation: even a poor trial function gives a rigorous ceiling on the ground-state energy, and improving the trial space can only lower that ceiling.
Why can a crude one-parameter trial function give such an accurate energy?
Because the energy error is second order in the wavefunction error. If your trial function differs from the true ground state by a small first-order amount, the Rayleigh quotient differs from the true energy only at second order — the linear term vanishes precisely because you sit at a stationary point. This is why the quadratic square-well ansatz lands within 1.3% and one screening parameter captures 98% of helium's binding energy: the wavefunction can be visibly wrong in detail while the energy it predicts is remarkably close, which is what makes variational estimates so useful.
What is the overlap matrix S, and when is it just the identity?
The overlap matrix records how non-orthogonal the trial functions are. For an orthonormal basis is the identity and the problem collapses to . But the physically natural choices — atomic orbitals on different atoms, or overlapping tent functions — are not orthogonal, so has off-diagonal entries and you solve the generalized problem . It is the "mass matrix" of mechanics and the "overlap integrals" of quantum chemistry, and keeping it prevents the double-counting a non-orthogonal basis would introduce.
Does the method give excited states as well as the ground state?
Yes, through the higher roots of the secular equation. Solving for an -dimensional trial space returns Ritz values, and the Hylleraas-Undheim-MacDonald theorem guarantees that the -th Ritz value is an upper bound to the -th true eigenvalue, all of them decreasing monotonically as the basis grows, with orthogonality to the lower states enforced automatically by diagonalizing the full matrix. The catch, flagged in the warning above, is that this clean interlacing holds only with the full self-adjoint matrix structure; a single excited-state estimate computed ad hoc is not automatically a bound.
How does Rayleigh-Ritz become the finite element method?
By choosing the trial functions to be local instead of global. In the classical method the are smooth functions spanning the whole domain; in the finite element method they are little "tent" functions, each nonzero only on a few cells of a mesh. Substituting these into the same energy functional produces the same matrices and — now the stiffness and mass matrices — except sparse, because distant tent functions do not overlap. That sparsity makes enormous problems tractable, and the variational origin guarantees stability and energy-bounding properties. Courant's 1943 paper is the recognized bridge between the two.