Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Compute the Rayleigh quotient at a vector

Use when: you have a symmetric matrix A and a specific nonzero vector x, and need the single number R_A(x)

Goal: the value of R_A(x), plus whether it equals an eigenvalue exactly

Taught in The Rayleigh quotient

  1. 1

    Multiply A by x first, then look at the result: does it point the same way as x, just rescaled?

    Example

    For B=\begin{bmatrix}2&1\\1&2\end{bmatrix} and x=(1,-1), Bx=(1,-1), exactly 1 times x itself.

    • Ax is a scalar multiple \lambda x of x — x is an eigenvector, and R_A(x)=\lambda exactly; skip straight to that answer.
    • Ax is not a scalar multiple of x — continue to Step 2 and compute the quotient directly.

    ⚡ Shortcut

    At an eigenvector, don't bother forming the numerator and denominator at all: the scalar you already spotted in Ax=\lambda x IS R_A(x).

    Why: this section proves R_A(x)=\lambda exactly whenever Ax=\lambda x, so recognizing an eigenvector first can skip the rest of the computation.

  2. 2

    Take the dot product of x with the Ax you already computed.

    Example

    For A=\begin{bmatrix}3&1\\1&2\end{bmatrix} and x=(1,0), Ax=(3,1), so x^{\mathsf T}Ax=(1)(3)+(0)(1)=3.

    Why: R_A(x)'s definition starts from exactly this product, not from A and x separately.

  3. 3

    Take the dot product of x with itself, which is \|x\|^2.

    Example

    x^{\mathsf T}x=(1)(1)+(0)(0)=1.

    • x is already given as a unit vector — the denominator is exactly 1, so it can be skipped.
    • x is not a unit vector — compute x^{\mathsf T}x explicitly before dividing.

    Why: dividing by \|x\|^2 is exactly what makes R_A ignore x's length and depend only on its direction.

  4. 4

    Divide the Step 2 numerator by the Step 3 denominator.

    Example

    R_A(x)=3/1=3.

    Why: this ratio is the Rayleigh quotient's definition, and every earlier step exists only to build its two pieces.

Common mistakes

  • Dividing by x^{\mathsf T}x before checking whether x is already a unit vector, wasting a step.
  • Forgetting to check whether Ax is a scalar multiple of x first, and missing a free exact answer.
  • Computing Ax^{\mathsf T} or another mismatched product instead of the scalar x^{\mathsf T}Ax.
  • Assuming R_A(cx) must be recomputed from scratch for a new scalar c, instead of recognizing it equals R_A(x) by scale-invariance.