QR Iteration and Hessenberg Reduction
QR Iteration and Hessenberg Reduction
The QR algorithm is the workhorse method for computing all eigenvalues of a dense matrix without ever forming a characteristic polynomial. Start from A0=A. At each step, factor the current matrix as an orthogonal matrix times an upper triangular one, then multiply the two factors back together in the opposite order:
Why the iteration cannot lose the eigenvalues
Because Qk is orthogonal, QkTQk=I, and the factorization Ak=QkRk rearranges to Rk=QkTAk. Substituting that into the update gives
That is an orthogonal similarity transformation. Similar matrices have the same characteristic polynomial, so every iterate Ak carries exactly the eigenvalues of the original A, the algorithm only ever moves the eigenvalues around inside the matrix, never changes them. Nothing here requires A to be symmetric; orthogonality of Qk is the whole story.
Why the iterates flatten out
Under mild assumptions the sequence Ak drives its below-diagonal entries toward zero and converges to upper triangular form, whose diagonal then displays the eigenvalues.
The entry sitting between eigenvalues λi and λj shrinks roughly like ∣λi/λj∣k with ∣λi∣<∣λj∣, so well-separated eigenvalues are resolved quickly and close ones slowly. (When A is real with a complex-conjugate pair, the limit is quasi-triangular: a stubborn 2×2 block on the diagonal carries that pair.)
Worked example
Take A=(2113). Gram–Schmidt on the columns gives
and multiplying back in reverse order yields A1=RQ=(3112). Check the invariants: the trace is still 5 and the determinant is still 5, exactly as similarity requires, and the diagonal has begun to drift toward the true eigenvalues (5±5)/2≈3.618 and 1.382. One step is not convergence, but it already shows the mechanism.
Hessenberg reduction: the preprocessing step
A full QR factorization of a dense n×n matrix costs O(n3) flops, and the algorithm typically needs many iterations, so running it on a dense matrix is wasteful. Practical implementations first reduce A to upper Hessenberg form, almost triangular, with
so the only entries allowed below the main diagonal lie on the first subdiagonal. The reduction is carried out with Householder reflections, which are themselves orthogonal, so it is another similarity transformation and the eigenvalues survive it untouched.
The payoff comes from a structural fact: the Hessenberg pattern is preserved by a QR step. If H is upper Hessenberg and H=QR, then RQ is upper Hessenberg again.
Because a Hessenberg matrix has only n−1 nonzero entries to annihilate instead of a full lower triangle, each factorization and each reassembly costs O(n2) rather than O(n3), and the saving repeats on every one of the many iterations.
Before running the QR algorithm, practical implementations first use Householder reflections to reduce the input matrix A to upper Hessenberg form. What is the main reason for performing this reduction?
Mark Yourself Question
- Grab a piece of paper and try this problem yourself.
- When you're done, check the "I have answered this question" box below.
- View the solution and report whether you got it right or wrong.
Let H be a general 5×5 upper Hessenberg matrix, so hij=0 whenever i>j+1, and suppose H is not symmetric. Answer all three parts.
- How many of the 25 entries of H are forced to be zero by the Hessenberg condition?
- Exactly one of h32, h43, h51, h54 is forced to be zero. Which one, and what makes it different from the other three?
- One QR step is applied to H: factor H=QR and form H1=RQ. How many entries of H1 strictly below the main diagonal can be nonzero, and why?