Quant Memo
Advanced

Power Iteration and Eigenvalue Algorithms

Finding a matrix's dominant eigenvector — its most important direction — not by solving equations directly but by repeatedly applying the matrix to a vector and watching it align itself, the engine behind PCA and dominant risk-factor extraction.

Prerequisites: Eigenvalues & Eigenvectors

Extracting the dominant risk factor from a covariance matrix — the single direction that explains the most variance, the basis of PCA-driven factor models — means finding that matrix's largest eigenvalue and its associated eigenvector. Solving for eigenvalues exactly by finding roots of the characteristic polynomial is impractical for anything bigger than a small matrix. Power iteration sidesteps this entirely: repeatedly multiply a starting vector by the matrix, and it naturally rotates to line up with the matrix's single most dominant direction, with no polynomial-solving required at all.

An analogy: a compass needle in a strong magnetic field

Imagine a compass needle placed in a complicated magnetic field, but one field direction is much stronger than all the others nearby. No matter which way the needle starts pointing, it will gradually swing around and settle pointing along that strongest direction, because every other component of the field it's exposed to is comparatively weak and gets "washed out" relative to the dominant pull. Power iteration works the same way: repeatedly applying a matrix to a vector amplifies the vector's component along the matrix's dominant eigen-direction far more than its components along weaker directions, so after enough repetitions, only the dominant direction survives in any noticeable proportion.

The math, one piece at a time

Starting from any vector v(0)v^{(0)} (not orthogonal to the dominant eigenvector, which is true for almost any random starting guess), power iteration repeats:

v(k+1)=Av(k)Av(k).v^{(k+1)} = \frac{A\,v^{(k)}}{\|A\,v^{(k)}\|} .

In words: multiply the current vector by the matrix, then rescale it back to unit length (purely to prevent the numbers from growing or shrinking without bound — the direction is what matters, not the size). Why this converges: write v(0)v^{(0)} as a combination of AA's eigenvectors, v(0)=c1e1+c2e2+v^{(0)} = c_1 e_1 + c_2 e_2 + \cdots, ordered so e1e_1 has the largest eigenvalue λ1\lambda_1 in absolute value. Applying AA once scales each term by its own eigenvalue: Av(0)=c1λ1e1+c2λ2e2+A v^{(0)} = c_1 \lambda_1 e_1 + c_2 \lambda_2 e_2 + \cdots. Applying AA again, kk total times, scales each term by λik\lambda_i^k:

Akv(0)=c1λ1ke1+c2λ2ke2+=λ1k(c1e1+c2(λ2λ1)ke2+).A^k v^{(0)} = c_1 \lambda_1^k e_1 + c_2 \lambda_2^k e_2 + \cdots = \lambda_1^k \left(c_1 e_1 + c_2 \left(\frac{\lambda_2}{\lambda_1}\right)^k e_2 + \cdots\right) .

In plain English: every non-dominant term shrinks relative to the dominant one by a factor of (λ2/λ1)k(\lambda_2/\lambda_1)^k, which vanishes as kk grows, since λ2/λ1<1|\lambda_2/\lambda_1| < 1 by assumption — so after normalizing, v(k)v^{(k)} converges to (a unit multiple of) e1e_1, the dominant eigenvector, and the corresponding eigenvalue is recovered as λ1v(k)Av(k)v(k)v(k)\lambda_1 \approx \frac{v^{(k)\top} A\, v^{(k)}}{v^{(k)\top}v^{(k)}} once the vector has converged. The convergence rate depends on the ratio λ2/λ1|\lambda_2/\lambda_1|: the closer the two largest eigenvalues are to each other, the slower this washing-out effect and the more iterations needed.

Worked example 1: power iteration by hand

A=(4123)A = \begin{pmatrix}4&1\\2&3\end{pmatrix} (true eigenvalues 5 and 2, dominant eigenvector direction (1,1)(1,1)). Start v(0)=(1,0)v^{(0)}=(1,0). Step 1: Av(0)=(4,2)Av^{(0)} = (4,2), normalize by dividing by (4,2)4.47\|(4,2)\|\approx4.47: v(1)(0.894,0.447)v^{(1)}\approx(0.894, 0.447). Step 2: Av(1)=(4(0.894)+1(0.447),2(0.894)+3(0.447))=(4.024,3.129)Av^{(1)} = (4(0.894)+1(0.447),\, 2(0.894)+3(0.447)) = (4.024, 3.129), normalize by 5.10\|\cdot\|\approx5.10: v(2)(0.789,0.613)v^{(2)}\approx(0.789, 0.613). Step 3: Av(2)=(4(0.789)+0.613,2(0.789)+3(0.613))=(3.769,3.417)Av^{(2)}=(4(0.789)+0.613,\, 2(0.789)+3(0.613))=(3.769,3.417), normalize by 5.086\approx 5.086: v(3)(0.741,0.672)v^{(3)}\approx(0.741,0.672). The ratio v1/v2v_1/v_2 is moving from \infty (step 0) toward 1, converging on the true dominant direction (1,1)(1,1), i.e. ratio 1, within a handful more iterations.

Worked example 2: convergence speed and eigenvalue ratio

For this same matrix, λ2/λ1=2/5=0.4\lambda_2/\lambda_1 = 2/5 = 0.4, so after kk iterations the non-dominant contamination shrinks by roughly 0.4k0.4^k: after 5 iterations, 0.450.010.4^5 \approx 0.01 — already well converged. Contrast a matrix with eigenvalues 5 and 4.9 (nearly tied): λ2/λ1=0.98\lambda_2/\lambda_1 = 0.98, and 0.9850.900.98^5 \approx 0.90 — after the same 5 iterations, 90% of the non-dominant component still remains.

iteration k λ₂/λ₁ = 0.4: fast λ₂/λ₁ = 0.98: slow
Both curves show non-dominant contamination decaying toward zero, but a near-tied eigenvalue gap makes that decay far slower — many more iterations are needed for the same accuracy.
dominant eigenvector direction v⁰ v³ ≈ aligned
Starting from an arbitrary direction, repeated multiplication by the matrix rotates the vector progressively toward alignment with the dominant eigenvector — each application washes out the non-dominant components a little more.

What this means in practice

Power iteration (and its refinements, like the QR algorithm, which effectively runs power iteration on multiple directions simultaneously to extract several eigenvalues at once) is the workhorse behind PCA on covariance matrices, extracting dominant risk factors, PageRank-style network centrality, and any "find the single most important direction of a large matrix" problem where computing the full eigendecomposition would be unnecessary and expensive. It's efficient precisely because it only ever needs matrix-vector products, never a full matrix decomposition, making it viable on very large sparse matrices.

Power iteration finds a matrix's dominant eigenvector by repeatedly multiplying a vector by the matrix and renormalizing — each multiplication amplifies the dominant eigen-direction relative to all others by the ratio of eigenvalues, so the vector converges toward the dominant eigenvector at a rate governed entirely by how separated the top two eigenvalues are.

The classic mistake is assuming power iteration always converges at a reliably fast, predictable rate. Its speed depends entirely on λ2/λ1|\lambda_2/\lambda_1|, the ratio of the second-largest to largest eigenvalue — when the top two eigenvalues are close together (common in real covariance matrices with correlated factors), convergence can be extremely slow, and a fixed small iteration count that worked fine on a well-separated toy example can leave a badly under-converged, unreliable eigenvector estimate on real data. Check the eigenvalue gap, not just the iteration count, before trusting a power-iteration result.

Related concepts

Practice in interviews

Further reading

  • Golub & Van Loan, Matrix Computations, ch. 8
  • Trefethen & Bau, Numerical Linear Algebra, lecture 27
ShareTwitterLinkedIn