4.8.21Numerical Methods

Eigenvalue computation — power method, inverse iteration

1,839 words8 min readdifficulty · medium

1. The seed idea: why repeated multiplication finds the dominant eigenvector

WHAT we exploit: Suppose AA (n×nn\times n, real) has eigenvalues λ1>λ2λn|\lambda_1| > |\lambda_2| \ge \cdots \ge |\lambda_n| with eigenvectors v1,,vnv_1,\dots,v_n forming a basis. λ1|\lambda_1| strictly largest is the dominant eigenvalue.

HOW the derivation goes (from scratch): Write any start vector in the eigenbasis: x0=c1v1+c2v2++cnvn,c10.x_0 = c_1 v_1 + c_2 v_2 + \cdots + c_n v_n, \qquad c_1\neq 0. Apply AA once: Avi=λiviAv_i = \lambda_i v_i, so Ax0=c1λ1v1++cnλnvn.A x_0 = c_1\lambda_1 v_1 + \cdots + c_n\lambda_n v_n. Apply kk times (each AA multiplies viv_i by λi\lambda_i again): Akx0=c1λ1kv1+c2λ2kv2++cnλnkvn.A^k x_0 = c_1\lambda_1^k v_1 + c_2\lambda_2^k v_2 + \cdots + c_n\lambda_n^k v_n. Now factor out the dominant term λ1k\lambda_1^k — this is the crucial algebraic move: Akx0=λ1k[c1v1+c2(λ2λ1)kv2++cn(λnλ1)kvn].A^k x_0 = \lambda_1^k\left[ c_1 v_1 + c_2\left(\tfrac{\lambda_2}{\lambda_1}\right)^k v_2 + \cdots + c_n\left(\tfrac{\lambda_n}{\lambda_1}\right)^k v_n\right].

The error shrinks at rate λ2λ1k\left|\frac{\lambda_2}{\lambda_1}\right|^klinear convergence, governed by the gap between the two biggest eigenvalues.


2. Power Method — algorithm

We can't let the vector blow up (λ1k\lambda_1^k) or vanish, so we normalize each step.

WHY the Rayleigh quotient? If xkv1x_k\approx v_1 then Axkλ1xkAx_k\approx \lambda_1 x_k, so xkAxkxkxkxk(λ1xk)xkxk=λ1.\frac{x_k^\top A x_k}{x_k^\top x_k}\approx\frac{x_k^\top(\lambda_1 x_k)}{x_k^\top x_k}=\lambda_1. It also minimizes Axkμxk\|Ax_k - \mu x_k\| over μ\mu, i.e. it's the best least-squares eigenvalue for the current vector — hence accurate even when xkx_k is only approximate. (For symmetric AA it's accurate to O(error2)O(\text{error}^2).)

Figure — Eigenvalue computation — power method, inverse iteration

3. Getting the smallest eigenvalue: inverse iteration

HOW (derivation): From Avi=λiviAv_i=\lambda_i v_i, multiply by A1/λiA^{-1}/\lambda_i: A1vi=1λivi.A^{-1}v_i = \tfrac{1}{\lambda_i} v_i. So power method applied to A1A^{-1} converges to vnv_n (the eigenvector of minλ\min|\lambda|), at rate λnλn1k\left|\frac{\lambda_n}{\lambda_{n-1}}\right|^k.


4. Shifted inverse iteration — hunt any eigenvalue

WHY shift: the eigenvalue of (AσI)1(A-\sigma I)^{-1} is 1λiσ\dfrac{1}{\lambda_i-\sigma}. If we pick σ\sigma close to a target eigenvalue λj\lambda_j, then λjσ\lambda_j-\sigma is tiny, so 1λjσ\frac{1}{\lambda_j-\sigma} is huge — it dominates all others. Inverse iteration then converges to vjv_j explosively fast.


5. The 80/20 core


Recall Feynman: explain to a 12-year-old

Imagine a stretchy sheet of rubber. Push a dot on it and let go — the sheet pulls it along whatever direction stretches the most. Do this push again and again, and the dot always ends up sliding along that strongest stretch line. That's the power method: the strongest stretch is the "biggest eigenvalue" direction. Now flip the rubber's rule so the weakest stretch becomes strongest — that's inverse iteration, finding the small one. And if you want a specific stretch, you "tilt" the sheet (a shift) so your favourite direction becomes the strongest, and it pops out almost instantly.

Flashcards

What does Akx0A^k x_0 converge to (in direction)?
The dominant eigenvector v1v_1 (largest λ|\lambda|), provided c10c_1\neq0 and λ1>λ2|\lambda_1|>|\lambda_2|.
Why factor out λ1k\lambda_1^k in the derivation?
To expose ratios (λi/λ1)k0(\lambda_i/\lambda_1)^k\to0, showing all non-dominant components decay.
Power method convergence rate?
Linear, governed by λ2/λ1k|\lambda_2/\lambda_1|^k.
What is the Rayleigh quotient and why use it?
μ=xAxxx\mu=\frac{x^\top Ax}{x^\top x}; best least-squares eigenvalue estimate for a given vector, accurate even for approximate xx (quadratically accurate if AA symmetric).
How do eigenvalues of A1A^{-1} relate to AA's?
Reciprocals 1/λi1/\lambda_i; eigenvectors unchanged.
What does inverse iteration find and why?
Smallest λ|\lambda| of AA, because it's the largest of A1=1/λA^{-1}=1/\lambda.
Why solve Ay=xAy=x instead of computing A1A^{-1}?
Cheaper & stabler; LU-factor once, back-substitute each step (O(n2)O(n^2) vs O(n3)O(n^3)).
Eigenvalues of AσIA-\sigma I?
λiσ\lambda_i-\sigma, same eigenvectors.
Why does a shift σλj\sigma\approx\lambda_j speed up inverse iteration?
1/(λjσ)1/(\lambda_j-\sigma) becomes huge, dominating all others → very fast convergence to vjv_j.
Convergence rate of shifted inverse iteration?
(λjσ)/(λmσ)k|(\lambda_j-\sigma)/(\lambda_m-\sigma)|^k, λm\lambda_m = next-closest eigenvalue to σ\sigma.
Condition for power method to start?
Seed must have nonzero component along dominant eigenvector (c10c_1\neq0).

Connections

  • LU Decomposition — used to solve (AσI)y=x(A-\sigma I)y=x cheaply each iteration.
  • Characteristic Polynomial — why direct eigenvalue formulas fail for n5n\ge5 (Abel–Ruffini).
  • Rayleigh Quotient Iteration — update σ\sigma to the current Rayleigh quotient each step → cubic convergence.
  • QR Algorithm — the industrial method computing all eigenvalues.
  • Spectral Decomposition — eigenbasis expansion x0=civix_0=\sum c_i v_i underpinning the derivation.
  • Convergence Rates — linear vs quadratic vs cubic.

Concept Map

motivates

scales not rotates

core trick

apply A k times

factor out lambda1^k

kills subdominant

found by

needs stability

estimates lambda via

best least-squares eigenvalue

error rate lambda2 over lambda1

redirect to any eigenvalue

Characteristic poly unsolvable n>=5

Iterative methods

Eigenpair Av equals lambda v

Dominant eigenvalue

Repeated multiplication A^k x0

Eigenbasis expansion of x0

Ratios lambda_i over lambda1 to 0

Power method

Normalize each step

Rayleigh quotient

Linear convergence

Inverse iteration

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, eigenvalue nikalna direct formula se possible nahi hota bade matrices ke liye (degree 5+ polynomial ka koi general solution nahi). Isliye hum iterative methods use karte hain. Power method ka core idea bilkul simple hai: agar tum kisi random vector ko AA se baar-baar multiply karte raho, to woh vector dheere-dheere us direction me mud jaata hai jisko AA sabse zyada stretch karta hai. Yehi direction dominant eigenvector hai, aur uska stretch factor sabse bada eigenvalue λ1\lambda_1. Maths me: Akx0A^k x_0 likho eigenbasis me, λ1k\lambda_1^k bahar nikaalo, to baaki saare terms me (λi/λ1)k(\lambda_i/\lambda_1)^k aata hai jo kk bada hone par zero ho jaata hai — sirf v1v_1 bachta hai.

Eigenvalue ki value padhne ke liye Rayleigh quotient μ=xAxxx\mu=\frac{x^\top Ax}{x^\top x} use karte hain — ye approximate vector ke liye bhi accha estimate deta hai. Har step me vector ko normalize karna zaroori hai warna λ1k\lambda_1^k ki wajah se number blow up ya zero ho jaayega.

Ab agar chhota eigenvalue chahiye? Trick: A1A^{-1} ke eigenvalues 1/λ1/\lambda hote hain, eigenvectors same. To AA ka smallest \to A1A^{-1} ka largest. Power method A1A^{-1} par chalao — bas A1A^{-1} compute mat karo, instead har step me Ay=xAy=x solve karo (LU ek baar factor karke). Ye fast bhi hai aur stable bhi.

Sabse powerful cheez: shift. AσIA-\sigma I ke eigenvalues λiσ\lambda_i-\sigma hote hain. Agar σ\sigma apne target eigenvalue ke paas rakho, to 1/(λjσ)1/(\lambda_j-\sigma) bahut bada ho jaata hai aur convergence rocket ki tarah fast — kabhi-kabhi ek hi step me answer aa jaata hai. Yaad rakho mantra: "Power se BIG, inverse se SMALL, shift se ANY", aur "solve karo, invert mat karo".

Go deeper — visual, from zero

Test yourself — Numerical Methods

Connections