Unshifted QR algorithm (source code)

= Unshifted QR algorithm

The <unshifted QR algorithm> starts at $A_0=A$, factors $A_k=Q_kR_k$, and forms
$$
A_{k+1}=R_kQ_k=Q_k^TA_kQ_k
$$
for real data with <orthogonal> $Q_k$. 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 $A=\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)$, the valid factorization $Q=A$, $R=I$ leaves every iterate equal to $A$. Its eigenvalues $1,-1$ 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.