Exact-shift diagonalization of a two-state swap matrix Created 2026-10-31 Updated 2026-11-05
For , one shifted QR algorithm step with real QR shift gives, with a consistent choice of factor signs,
To verify this, factor with . Its columns are orthonormal, and is upper triangular. Then . Thus is diagonal exactly when , the two eigenvalues. The bottom-right-entry shift is zero and leaves the matrix unchanged under the positive-diagonal factor convention. This illustrates why a poorly chosen QR shift can stall even a two-by-two symmetric eigenvalue computation.
Householder tridiagonalization Created 2026-09-24 Updated 2026-11-05
Householder tridiagonalization reduces a real symmetric matrix by an orthogonal similarity to a real symmetric tridiagonal matrix :
At column , a Householder reflection on coordinates eliminates entries below row . Apply the same reflection from the right, preserving symmetry. Since entries below the first subdiagonal become zero, symmetry also makes entries above the first superdiagonal zero. Earlier zeros are preserved by the restricted active coordinates.
The eigenvalues are unchanged by the similarity transformation; an eigenvector of gives the eigenvector of . Dense reduction costs arithmetic operations once, after which each structured QR algorithm step on the tridiagonal form is much cheaper than a new dense factorization. This is why eigensolvers separate reduction from iterative refinement of eigenvalues.
With , repeat the shifted QR algorithm:
The QR shift is chosen from , for example its bottom-right entry or an eigenvalue of a trailing two-by-two block. Explicitly using the orthogonality of gives
Thus each update is a matrix similarity preserving eigenvalues. Accumulate if eigenvectors or the full reduction are wanted. Once a subdiagonal entry is negligible, block deflation in the QR algorithm separates the corresponding blocks and iteration continues on the active block.
For an efficient QR algorithm, first reduce a general real matrix to upper Hessenberg matrix by orthogonal similarities. For a real symmetric matrix, use Householder tridiagonalization; the resulting symmetric tridiagonal matrix is the usual input in this setting. These structures are preserved by suitable QR algorithm implementations and greatly reduce the work per iteration.
The output is the eigenvalues, together with an orthogonal reduction when the factors are accumulated. In the symmetric case the target is a diagonal matrix, whose diagonal entries are the real eigenvalues; the accumulated orthogonal columns are eigenvectors. For a general real matrix, the target is the real form in a Schur decomposition: an upper block triangular matrix with diagonal blocks of size one or two. The two-by-two blocks represent complex conjugate eigenvalue pairs. An arbitrary unshifted iteration need not converge, so these describe the intended converged output, with appropriate shifts and block deflation in the QR algorithm.
With , write and . The Backward Euler method requires
or the monic quintic polynomial equation
Construct its companion matrix
Its characteristic polynomial is . Thus the polynomial roots needed for this update are exactly the eigenvalues of .
At each step, assemble , compute its eigenvalues, for example with the QR algorithm, and choose its unique positive real eigenvalue as . To justify this selection, let
If , then , , and
The intermediate value theorem and strict monotonicity prove there is exactly one positive polynomial root, located in . Starting at therefore makes every update well defined, positive and decreasing. In numerical arithmetic, select the nearly real eigenvalue in this interval and check the polynomial residual ; a final Newton root-finding iteration can refine it. This reduces each update to the requested eigenvalue problem.
A QR decomposition is a factorization with and upper triangular. An orthogonal transformation preserves the Euclidean norm because
For the basic QR algorithm, start with and repeatedly form
In a convergent diagonal form, the diagonal entries give the eigenvalues; practical symmetric-matrix implementations use shifts and deflation to obtain and isolate such convergence. The basic unshifted iteration alone need not converge diagonally for every symmetric input.
At every step, however,
Thus each iterate is orthogonally similar to its predecessor. Similar matrices have the same characteristic polynomial and eigenvalues, including multiplicities, so induction proves that every iterate has exactly the original eigenvalues. Orthogonal similarity also preserves symmetry.
For a nonzero real vector , a Householder reflection is
Writing gives and , so . Thus a Householder matrix is an orthogonal matrix, and it reflects across the hyperplane perpendicular to .
For , choose , taking the sign to be when , and put . This is nonzero. Since , direct expansion gives and , so
Apply this construction successively to the trailing part of each column of , extending each reflection by an identity on earlier coordinates. Previously created zeros are preserved. If a trailing column vector is zero, use the identity there. The resulting product is orthogonal and is upper triangular, yielding the QR factorization even when is singular.
To solve , multiply by and use back substitution on when is nonsingular. If is singular, ; an upper triangular determinant is its diagonal product, so at least one diagonal entry is zero. In that case consistency and free variables require separate treatment.
The unshifted QR algorithm starts from , factors , and forms
Every iterate is related by an orthogonal similarity transformation to the previous one and hence to , with the same eigenvalues. Symmetry is preserved. For symmetric matrices with appropriate spectral separation, the iterates approach diagonal form: the off-diagonal entries decrease and the diagonal exposes the eigenvalues. Practical shifted QR accelerates convergence and uses deflation when off-diagonal couplings become negligible. With a shift , factor and set ; the same similarity identity still holds.
Universal diagonal convergence of unshifted QR would be too strong. For example admits the standard factorization , , so the iteration remains at rather than becoming diagonal, although its eigenvalues are . Such equal-modulus cases require a convergence qualification or treatment of a retained block. Similarity is unconditional; convergence to a useful limiting form is an additional algorithmic property.
A QR decomposition is , with orthogonal and upper triangular. Orthogonality gives , and therefore , proving invariance of the Euclidean norm.
The unshifted QR algorithm starts with . At step , factor and set . Then
Thus consecutive matrices are related by orthogonal similarity, so they have the same characteristic polynomial and eigenvalues. Induction proves every iterate has the original eigenvalues. Symmetry is also preserved. When the iteration converges to diagonal form, its diagonal entries are the eigenvalues; practical implementations use shifts and deflation to improve convergence.
QR algorithm 2026-10-14
The QR algorithm computes eigenvalues through repeated QR decompositions and similarity updates. Shifted and unshifted forms have different convergence rates; the unshifted QR algorithm uses a zero shift at every step.
QR shift 2026-10-31
A QR shift is a scalar subtracted before the QR factorization in a QR algorithm step and restored after reversing the factors:
The final identity uses the orthogonality of , proving that the eigenvalues are preserved. Choosing a shift near an eigenvalue can accelerate block deflation in the QR algorithm. A common choice is the current bottom-right entry, but it can stall, as in Exact-shift diagonalization of a two-state swap matrix.
Unshifted QR algorithm Created 2026-09-24 Updated 2026-11-05
The unshifted QR algorithm starts at , factors , and forms
for real data with orthogonal . Each step is an orthogonal similarity, so it preserves eigenvalues. It is the zero-shift case of the QR algorithm; complex data use a unitary factor and conjugate transpose.
Convergence needs hypotheses. For a real symmetric matrix with suitably separated eigenvalue moduli and nondegenerate starting projections, the simultaneous iteration interpretation of the QR algorithm explains convergence toward diagonal form. Equal moduli can prevent that behavior: for , the valid factorization , leaves every iterate equal to . Its eigenvalues remain coupled.
For nonsymmetric matrices, the useful target is generally a triangular form or a real Schur form, rather than a diagonal matrix. Shifts and block deflation in the QR algorithm improve practical convergence. The similarity identity by itself is not a convergence theorem.