- Letβs see in more detail how the QR iteration with shift works.
- We need to use a different shift at each step.
- How do we do this practically?
Pseudo-algorithm:
Tk = A
while not_converged:
mu = Tk[n,n]
Uk, Rk = qr(Tk - mu * I)
Tk = Rk * Uk + mu * I
We can check that this is a valid similarity transformation using unitary matrices. Here is the sequence of steps to check that the iteration is correct and that the transformation is a unitarily similar transformation:
So all eigenvalues are preserved, and we are converging to the matrix from the Schur decomposition.