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=AA_0=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:


Ak=QkRk,Ak+1=RkQk.A_k = Q_kR_k, \qquad A_{k+1} = R_kQ_k.

Why the iteration cannot lose the eigenvalues

Because QkQ_k is orthogonal, QkTQk=IQ_k^{T}Q_k=I, and the factorization Ak=QkRkA_k=Q_kR_k rearranges to Rk=QkTAkR_k=Q_k^{T}A_k. Substituting that into the update gives


Ak+1=RkQk=QkTAkQk.A_{k+1} = R_kQ_k = Q_k^{T}A_kQ_k.


That is an orthogonal similarity transformation. Similar matrices have the same characteristic polynomial, so every iterate AkA_k carries exactly the eigenvalues of the original AA, the algorithm only ever moves the eigenvalues around inside the matrix, never changes them. Nothing here requires AA to be symmetric; orthogonality of QkQ_k is the whole story.

Why the iterates flatten out

Under mild assumptions the sequence AkA_k 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\lambda_i and λj\lambda_j shrinks roughly like ∣λi/λj∣k|\lambda_i/\lambda_j|^{k} with ∣λi∣<∣λj∣|\lambda_i| \lt |\lambda_j|, so well-separated eigenvalues are resolved quickly and close ones slowly. (When AA is real with a complex-conjugate pair, the limit is quasi-triangular: a stubborn 2×22\times2 block on the diagonal carries that pair.)

Worked example

Take A=(2113)A=\begin{pmatrix}2&1\\1&3\end{pmatrix}. Gram–Schmidt on the columns gives


Q=15(2−112),R=5(1101),Q=\frac{1}{\sqrt5}\begin{pmatrix}2&-1\\1&2\end{pmatrix}, \qquad R=\sqrt5\begin{pmatrix}1&1\\0&1\end{pmatrix},


and multiplying back in reverse order yields A1=RQ=(3112)A_1=RQ=\begin{pmatrix}3&1\\1&2\end{pmatrix}. Check the invariants: the trace is still 55 and the determinant is still 55, exactly as similarity requires, and the diagonal has begun to drift toward the true eigenvalues (5±5)/2≈3.618(5\pm\sqrt5)/2\approx3.618 and 1.3821.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×nn\times n matrix costs O(n3)O(n^3) flops, and the algorithm typically needs many iterations, so running it on a dense matrix is wasteful. Practical implementations first reduce AA to upper Hessenberg form, almost triangular, with


hij=0whenever i>j+1,h_{ij}=0 \quad \text{whenever } i \gt j+1,


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 HH is upper Hessenberg and H=QRH=QR, then RQRQ is upper Hessenberg again.


Because a Hessenberg matrix has only n−1n-1 nonzero entries to annihilate instead of a full lower triangle, each factorization and each reassembly costs O(n2)O(n^2) rather than O(n3)O(n^3), and the saving repeats on every one of the many iterations.



The QR algorithm builds a sequence of matrices by factoring Ak=QkRkA_k=Q_kR_k with QkQ_k orthogonal and RkR_k upper triangular, then forming Ak+1=RkQkA_{k+1}=R_kQ_k. Which statement correctly describes how Ak+1A_{k+1} is related to AkA_k?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Before running the QR algorithm, practical implementations first use Householder reflections to reduce the input matrix AA to upper Hessenberg form. What is the main reason for performing this reduction?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

Let HH be a general 5×55\times5 upper Hessenberg matrix, so hij=0h_{ij}=0 whenever i>j+1i \gt j+1, and suppose HH is not symmetric. Answer all three parts.

  1. How many of the 25 entries of HH are forced to be zero by the Hessenberg condition?
  2. Exactly one of h32h_{32}, h43h_{43}, h51h_{51}, h54h_{54} is forced to be zero. Which one, and what makes it different from the other three?
  3. One QR step is applied to HH: factor H=QRH=QR and form H1=RQH_1=RQ. How many entries of H1H_1 strictly below the main diagonal can be nonzero, and why?

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors