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.
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.
The initial bottom-right entry is zero, so the chosen QR shift is . One valid QR factorization is , , using explicitly that . The update is
It repeats forever and never approaches a diagonal matrix. With the standard positive-diagonal convention for , this factorization is unique, so the Rayleigh-shift iteration is stationary and fails to diagonalize .
The failure is independent of harmless sign conventions. The columns of are already orthonormal, so another QR factorization can only replace by and by , where is diagonal with entries . Then still has zero diagonal and off-diagonal magnitudes one. Subsequent bottom-right shifts remain zero and the off-diagonal magnitude never decreases. The eigenvalues are , with equal absolute values, explaining the lack of separation in the unshifted QR algorithm.
Let the real QR shift be and put . A valid QR factorization, including the singular cases , is
Here , and multiplying verifies . Using this orthogonality in the shifted update gives
It is diagonal exactly when . Therefore all real shifts giving the eigenvalues in one iteration are
The resulting diagonal is or , respectively. Both QR shifts are exact eigenvalues. Sign changes in the QR factorization conjugate by a diagonal sign matrix and do not alter its zero pattern. This is Exact-shift diagonalization of a two-state swap matrix.
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.