- categories: Linear algebra, Algorithm
Overview
The QR algorithm with shifts is an iterative method to compute the eigenvalues of a matrix . Shifts improve the convergence speed of the QR algorithm by accelerating the reduction of to an upper triangular (or nearly diagonal) form, from which eigenvalues can be directly extracted.
Algorithm Steps
1. Input
- Matrix (assume is real and square).
2. Shifting Strategy
- At each iteration, choose a shift , typically close to an eigenvalue of . Common choices:
- Rayleigh quotient shift: (last diagonal element of ).
- Wilkinson shift: A more sophisticated choice using eigenvalue approximation of a submatrix.
3. Iterative QR Factorization
-
Subtract the shift:
where is orthogonal and is upper triangular (QR factorization).
-
Update the matrix:
-
Repeat until converges to a nearly diagonal matrix.
4. Output
- The diagonal entries of the final matrix are the eigenvalues of .
Key Properties
-
Convergence:
- Shifts significantly accelerate convergence, especially for matrices with distinct eigenvalues.
- The Wilkinson shift is effective for matrices with clustered eigenvalues.
-
Complexity:
- Each QR iteration with shifts costs for dense matrices.
- The number of iterations depends on the separation of eigenvalues.
-
Reduction to Hessenberg Form:
- Before applying the QR algorithm, is typically reduced to Hessenberg form (upper triangular except for the first subdiagonal) in . This does not affect eigenvalues but improves computational efficiency.
Example
Matrix:
Wilkinson Shift (First Iteration):
-
Compute : Use the last submatrix:
Its eigenvalues are:
Choose (closer to the largest eigenvalue).
-
Perform QR factorization:
where is orthogonal, and is upper triangular.
-
Update:
-
Repeat with updated .