next up previous
Next: Shift again Up: Assignment 7: QR iteration Previous: QR iteration

Shifted QR

1.
Use the upper-left element of the array as a shift, z, and form the shifted matrix A - z I.

2.
Perform a few QR iterations on the shifted matrix and comment on the rate of convergence. The off-diagonal element in the lower-right corner should be going to zero fast. If not, you are doing something wrong. Iterate until it is below 10-5.

3.
Extract the lower-right diagonal element and shift it back. Confirm that it is one of the eigenvalues of A.

4.
Extract the $3 \times 3$ matrix in the upper left using submatrix. Calculate its eigenvalues and confirm that they are the other three eigenvalues of A.

If either of the previous steps fails, do not proceed.



Allen B. Downey
1998-11-02