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 (not orthogonal to the dominant eigenvector, which is true for almost any random starting guess), power iteration repeats:
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 as a combination of 's eigenvectors, , ordered so has the largest eigenvalue in absolute value. Applying once scales each term by its own eigenvalue: . Applying again, total times, scales each term by :
In plain English: every non-dominant term shrinks relative to the dominant one by a factor of , which vanishes as grows, since by assumption — so after normalizing, converges to (a unit multiple of) , the dominant eigenvector, and the corresponding eigenvalue is recovered as once the vector has converged. The convergence rate depends on the ratio : 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
(true eigenvalues 5 and 2, dominant eigenvector direction ). Start . Step 1: , normalize by dividing by : . Step 2: , normalize by : . Step 3: , normalize by : . The ratio is moving from (step 0) toward 1, converging on the true dominant direction , i.e. ratio 1, within a handful more iterations.
Worked example 2: convergence speed and eigenvalue ratio
For this same matrix, , so after iterations the non-dominant contamination shrinks by roughly : after 5 iterations, — already well converged. Contrast a matrix with eigenvalues 5 and 4.9 (nearly tied): , and — after the same 5 iterations, 90% of the non-dominant component still remains.
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 , 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