= Solution
Let the real <QR shift> be $\mu$ and put $r=\sqrt{1+\mu^2}$. A valid <QR factorization>, including the singular cases $\mu=\pm1$, is
$$
Q=\frac1r\begin{pmatrix}-\mu&-1\\1&-\mu\end{pmatrix},\qquad R=\begin{pmatrix}r&-2\mu/r\\0&(\mu^2-1)/r\end{pmatrix}.
$$
Here $Q^TQ=I$, and multiplying verifies $QR=A-\mu I$. Using this <orthogonality> in the shifted update gives
$$
A_1=Q^TAQ=\frac1{1+\mu^2}\begin{pmatrix}-2\mu&\mu^2-1\\\mu^2-1&2\mu\end{pmatrix}.
$$
It is diagonal exactly when $\mu^2-1=0$. Therefore \b[all real shifts giving the eigenvalues in one iteration are]
$$
\boxed{\mu=+1\quad\text{or}\quad\mu=-1.}
$$
The resulting diagonal is $(-1,1)$ or $(1,-1)$, respectively. Both <QR shifts> are exact <eigenvalues>. Sign changes in the <QR factorization> conjugate $A_1$ by a diagonal sign <matrix> and do not alter its zero pattern. This is <Exact-shift diagonalization of a two-state swap matrix>.
Back to article page