The The Power Method finds one eigenvalue at a time. The QR algorithm, the method behind standard eigenvalue routines, finds all of them at once. It uses the QR factorization over and over: $$A_0 = A,\qquad A_k = Q_kR_k\ \ (\text{factor}),\qquad A_{k+1} = R_kQ_k\ \ (\text{multiply in reverse order}).$$
Key idea
Why it works
Worked example: One step
- The first column $(3, 4)$ has length $5$: $\mathbf{q}_1 = (0.6, 0.8)$, and $\mathbf{q}_2 = (-0.8, 0.6)$.
- $R_0 = Q_0^{T}A_0 = \begin{bmatrix} 5 & 2.2 \\ 0 & 0.4 \end{bmatrix}$.
- Multiply in reverse order, $A_1 = R_0Q_0$. Row 1: $5(0.6) + 2.2(0.8) = 4.76$ and $5(-0.8) + 2.2(0.6) = -2.68$. Row 2: $0.4(0.8) = 0.32$ and $0.4(0.6) = 0.24$.
- So $A_1 = \begin{bmatrix} 4.76 & -2.68 \\ 0.32 & 0.24 \end{bmatrix}$. Check: the trace is still $5$. The entry below the diagonal fell from $4$ to $0.32$.
Answer: $\begin{bmatrix} 4.76 & -2.68 \\ 0.32 & 0.24 \end{bmatrix}$
Worked example: Watching it converge
- $A_2$ has lower-left entry $0.0281$, $A_3$ has $0.00268$, $A_4$ has $0.000257$: about $\frac{1}{10}$ each step.
- The eigenvalues are $\frac{5 \pm \sqrt{17}}{2} \approx 4.5616$ and $0.4384$, and $\frac{0.4384}{4.5616} \approx 0.096$. That is the predicted rate.
- Meanwhile the diagonal of $A_4$ is $(4.5617, 0.4383)$: the eigenvalues, to about four digits.
Answer: by about $0.096$ per step
Worked example: Multiplying in the wrong order
- $Q_kR_k$ is the factorization of $A_k$ itself, so the "new" matrix is $A_k$ again (up to round-off).
- Nothing changes, step after step. The reversal of the order is the entire method.
Answer: nothing happens
Production codes add three ideas. They first reduce $A$ to Hessenberg form (zeros below the first subdiagonal), which makes each QR step cost $O(n^{2})$ instead of $O(n^{3})$. They use shifts, factoring $A_k - s_kI$ with $s_k$ near an eigenvalue, which turns the slow ratio into a tiny one, just as in Inverse and Shifted Power Methods. And they deflate: once a subdiagonal entry is negligible, the problem splits into smaller ones. All eigenvalues of an $n \times n$ matrix then cost roughly $10n^{3}$ operations.
Common mistake