QR shift (source code)

= QR shift
{c}
{title2=$A_k-\mu_kI=Q_kR_k$}

A <QR shift> is a scalar $\mu_k$ subtracted before the <QR factorization> in a <QR algorithm> step and restored after reversing the factors:
$$
A_k-\mu_kI=Q_kR_k,\qquad A_{k+1}=R_kQ_k+\mu_kI=Q_k^TA_kQ_k.
$$
The final identity uses the <orthogonality> of $Q_k$, 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>.