Skip to content
AI360Xpert
Beta

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.

The quotient climbs from 4.0 toward 4.618 as the direction improves, because stationary points of the energy landscape sit exactly on eigenvectors
The quotient climbs from 4.0 toward 4.618 as the direction improves, because stationary points of the energy landscape sit exactly on eigenvectors

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

R(x)=xTAxxTxR(x) = \frac{x^T A x}{x^T x}

turns any nonzero direction into an eigenvalue estimate. Point near an eigenvector and R(x)R(x) 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 RR 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 xTAxx^T A x measures energy along xx, and xTx=∥x∥2x^T x = \lVert x \rVert^2 measures squared length. Their ratio is energy per unit length, independent of how long xx is: R(2x)=R(x)R(2x) = R(x). 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. xTAxx^T A x is the trip total (it grows when xx grows); dividing by xTxx^T x 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 R(x)R(x) and set the gradient to zero:

∇R=2Ax⋅(xTx)−2x⋅(xTAx)(xTx)2=0  ⟺  Ax=R(x) x\nabla R = \frac{2Ax \cdot (x^T x) - 2x \cdot (x^T A x)}{(x^T x)^2} = 0 \iff Ax = R(x)\, x

Stationarity says xx is an eigenvector with eigenvalue R(x)R(x). So every critical point of the quotient is an eigenpair, and the global max over unit vectors is λmax⁡\lambda_{\max} (attained at its eigenvector), the min λmin⁡\lambda_{\min}. Better direction, better estimate, monotonically under power iteration.

Worked example

For A=[4113]A = \begin{bmatrix} 4 & 1 \\ 1 & 3 \end{bmatrix} with λmax⁡≈4.618\lambda_{\max} \approx 4.618, feed three improving directions:

  • x0=[1,0]x_0 = [1, 0]: R=4/1=4.0R = 4 / 1 = 4.0
  • x1=[0.9701,0.2425]x_1 = [0.9701, 0.2425] (one power step, normalised): x1TAx1≈4.4118x_1^T A x_1 \approx 4.4118, so R≈4.4118R \approx 4.4118
  • x2=[0.9246,0.3807]x_2 = [0.9246, 0.3807] (two steps): R≈4.5587R \approx 4.5587

The climb 4.0→4.4118→4.5587→4.6184.0 \to 4.4118 \to 4.5587 \to 4.618 shows the mechanism: each step rotates toward the top eigenvector and the quotient tracks it from below. Reversing the iteration (or negating AA) climbs down to λmin⁡\lambda_{\min} 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 AA, R(x)R(x) 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 ATAA^T A quotient instead.

Maximising without the norm constraint

xTAxx^T A x alone is unbounded above whenever any eigenvalue is positive: scale xx 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 ∥x∥=1\lVert x \rVert = 1 explicitly.

The Quick Version

  • R(x)=xTAx/xTxR(x) = x^T A x / x^T x 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 4.0→4.4118→4.5587→4.6184.0 \to 4.4118 \to 4.5587 \to 4.618 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.