The Rayleigh Quotient
One division that estimates an eigenvalue from any guess direction: put a vector in, get the energy per unit length out. Power iteration runs on it.
Why Does This Exist?
Eigenvalues are usually computed, not guessed. But iterative methods cannot afford a full decomposition: they hold one direction at a time and need a number from it. The Rayleigh quotient
turns any nonzero direction into an eigenvalue estimate. Point near an eigenvector and lands near its eigenvalue; point at the eigenvector and it lands exactly. Power iteration, Rayleigh-quotient iteration and every variational eigenvalue argument run on this one division.
Its deeper content is stationary: the gradient of vanishes exactly at eigenvectors, so eigenvectors are the critical points of "energy per unit length" and eigenvalues are the critical values. The min-max theorem (Courant-Fischer) extends this to every eigenvalue, which is how eigenvalue bounds get proved.
The one idea you need first
The quadratic form measures energy along , and measures squared length. Their ratio is energy per unit length, independent of how long is: . Scale invariance is what makes the quotient a property of the direction, covered alongside sizes in norms.
Think of It Like This
Fuel efficiency of a route, not the fuel total
Two road trips burn different totals because one is longer. Divide by distance and you get litres per hundred kilometres: a property of the route and the car, comparable across trips of any length.
The Rayleigh quotient is litres-per-hundred for directions. is the trip total (it grows when grows); dividing by removes length and leaves the direction's intrinsic number. Eigenvectors are the routes with extremal efficiency, and the quotient ranks every other direction between them.
How It Actually Works
Differentiate and set the gradient to zero:
Stationarity says is an eigenvector with eigenvalue . So every critical point of the quotient is an eigenpair, and the global max over unit vectors is (attained at its eigenvector), the min . Better direction, better estimate, monotonically under power iteration.
Worked example
For with , feed three improving directions:
- :
- (one power step, normalised): , so
- (two steps):
The climb shows the mechanism: each step rotates toward the top eigenvector and the quotient tracks it from below. Reversing the iteration (or negating ) climbs down to the same way.
Code
The point is the check: iterate the power method and watch the quotient converge from below.
A = [[4.0, 1.0], [1.0, 3.0]]
def rayleigh(x: list[float]) -> float: ax = [A[0][0] * x[0] + A[0][1] * x[1], A[1][0] * x[0] + A[1][1] * x[1]] return (x[0] * ax[0] + x[1] * ax[1]) / (x[0] * x[0] + x[1] * x[1])
x = [1.0, 0.0]vals = []for _ in range(2): ax = [A[0][0] * x[0] + A[0][1] * x[1], A[1][0] * x[0] + A[1][1] * x[1]] n = (ax[0] ** 2 + ax[1] ** 2) ** 0.5 # renormalise each step x = [ax[0] / n, ax[1] / n] vals.append(round(rayleigh(x), 4))print([round(rayleigh([1.0, 0.0]), 4)] + vals) # -> [4.0, 4.4118, 4.5587]Watch Out For
Using the quotient on a non-symmetric matrix
For non-symmetric , can be complex-valued in effect and its stationary points need not be eigenvectors in any useful sense; the clean theory (real values, min-max, monotonicity) is symmetric-only. Check symmetry before variational arguments, or switch to singular values and the quotient instead.
Maximising without the norm constraint
alone is unbounded above whenever any eigenvalue is positive: scale up and the "estimate" explodes. The denominator is load-bearing, not decoration. Unconstrained maximisation of a quadratic form diverges; always optimise the ratio or fix explicitly.
The Quick Version
- is energy per unit length: an eigenvalue estimate from any direction.
- Stationary points sit exactly on eigenvectors, with the quotient equal to the eigenvalue.
- Power steps climb toward the top of the worked matrix.
- The clean theory is symmetric-only; non-symmetric matrices need singular values instead.
- Never maximise the numerator alone: without the denominator it diverges.