Rayleigh quotient (source code)

= Rayleigh quotient
{c}
{title2=$R_A(x)=\dfrac{x^*Ax}{x^*x}$}
{wiki}

The <Rayleigh quotient> measures the <quadratic form> of a <self-adjoint operator> per unit squared <norm>. For a nonzero <vector> $x$ and a finite-dimensional <Hermitian matrix> $A$,
$$
R_A(x)=\frac{x^*Ax}{x^*x}.
$$
For a real <symmetric matrix>, replace the <conjugate transpose> $x^*$ by $x^T$. More generally, for a <self-adjoint operator> $H$ on a <Hilbert space>, use $R_H(\psi)=\langle\psi,H\psi\rangle/\langle\psi,\psi\rangle$ for nonzero $\psi$ in its <operator domain>. On an <eigenvector> it returns the exact <eigenvalue>. Multiplying the <vector> by any nonzero <scalar> leaves the quotient unchanged, so it measures a direction rather than a chosen length.

For the <symmetric matrix> $A=\begin{pmatrix}2&1\\1&2\end{pmatrix}$ from the <finite-dimensional spectral theorem> example,
$$
R_A(1,0)=2,\qquad R_A(1,1)=3,\qquad R_A(-1,1)=1.
$$
The first value is not an <eigenvalue>: it is an average of the two directional responses. To see every direction, write the unit <vector> $q(\theta)=\cos\theta\,e_++\sin\theta\,e_-$ in the <orthonormal eigenbasis>. Then
$$
R_A(q(\theta))=3\cos^2\theta+\sin^2\theta=1+2\cos^2\theta.
$$
The largest value is $3$ along $e_+$; the smallest is $1$ along $e_-$. A direction halfway between them has quotient $2$. In the left panel, the color on the <unit circle> represents the quotient; in the right panel, the same values are plotted against the <angle> measured from $e_+$.

\Image[/rayleigh-quotient-direction.png]
{title=The <Rayleigh quotient> varies continuously between two <eigenvalues> as a unit <vector> turns}

The <Hermitian Rayleigh quotient range> explains why this is useful: evaluating one trial <vector> gives an upper bound on the smallest <eigenvalue> and a lower bound on the largest one, without solving a <characteristic polynomial>. At an extreme <eigenvector>, a small angular error changes the quotient only quadratically. Near $e_+$ in this example, $3-R_A(q(\theta))=2\sin^2\theta=2\theta^2+O(\theta^4)$. This is the geometric reason for <quadratic Rayleigh-quotient improvement for the power method> and motivates the <Rayleigh-Ritz method>.

There is a concrete historical link with <normal modes>. In \i[The Theory of Sound] (1877), Volume I, Sections 88–89, Lord Rayleigh studies the period of a constrained trial vibration. He shows that the period has a <stationary point> at a <normal mode> and that a trial type bounds the longest natural period. These <energy> ratios are a mechanical setting for the modern <Rayleigh quotient> and <generalized Rayleigh quotient>; the book describes the result through vibration periods, rather than today's matrix notation.https://archive.org/details/theorysound06raylgoog[Rayleigh, The Theory of Sound, Volume I, 1877, Sections 88–89, printed pp. 84–87]{ref}