Solution (source code)

= Solution

The initial bottom-right entry is zero, so the chosen <QR shift> is $\mu_0=0$. One valid <QR factorization> is $Q_0=A$, $R_0=I$, using explicitly that $A^TA=I$. The update is
$$
A_1=R_0Q_0=A.
$$
It repeats forever and never approaches a diagonal <matrix>. With the standard positive-diagonal convention for $R$, this factorization is unique, so \b[the Rayleigh-shift iteration is stationary and fails to diagonalize $A$].

The failure is independent of harmless sign conventions. The columns of $A$ are already orthonormal, so another <QR factorization> can only replace $Q_0$ by $AD$ and $R_0$ by $D$, where $D$ is diagonal with entries $\pm1$. Then $A_1=DAD$ 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 $+1,-1$, with equal absolute values, explaining the lack of separation in the <unshifted QR algorithm>.