The QR method is a widely used algorithm in numerical linear algebra for determining the eigenvalues of a given square matrix. Unlike direct methods such as solving the characteristic polynomial, which can be complicated and unstable numerically for large matrices, the QR method leverages iterative transformations that preserve eigenvalues. Over repeated iterations, these transformations lead the matrix closer to a quasi-upper-triangular or upper-triangular form, from which the eigenvalues can be read directly.
Consider an
where
The QR method applies the following iterative scheme:
I. Initialization: Set
II. Iteration: For each iteration
Compute the QR factorization of
Form a new matrix:
Notice that:
As
The idea behind the QR method arises from the following observations:
I. Similarity and Eigenvalues:
Two matrices
II. QR Decomposition:
Every invertible (or at least full rank) matrix
III. Iterative Process:
By repeatedly factoring
In practice, to ensure rapid convergence and numerical stability, shifts are employed (the so-called "QR algorithm with shifts"). This modification chooses special shifts based on elements of
I. Initialization: Set
II. QR Factorization: Compute the QR factorization of
The QR factorization can be computed using:
- Gram-Schmidt orthogonalization,
- Householder transformations,
- or Givens rotations.
III. Form New Matrix:
Note that:
so
IV. Check for Convergence:
If
V. Output:
The diagonal elements of the nearly upper-triangular matrix
Given System:
I. First QR Factorization:
Perform the QR factorization on
Suppose we find:
II. Form
After multiplication, ideally, we move closer to an upper-triangular form. Repeating this process multiple times (depending on the complexity of the matrix) will yield a matrix whose off-diagonal elements approach zero.
III. Convergence:
After sufficient iterations, the matrix
For this simple
I. All Eigenvalues Simultaneously:
The QR method retrieves all eigenvalues of a matrix at once, rather than computing them individually.
II. Numerical Stability:
With proper implementation (especially using orthogonal transformations and shifts), the QR method is stable and widely considered the "gold standard" for eigenvalue computations in numerical libraries.
III. Broad Applicability:
The QR method works for both real and complex matrices and can be adapted to handle a variety of matrix types efficiently.
I. No Direct Eigenvectors:
The basic QR algorithm finds eigenvalues but does not directly produce eigenvectors. Additional steps or modifications are required to recover eigenvectors.
II. Computational Effort:
Although efficient algorithms exist, the QR method can be computationally intensive for very large matrices. Advanced techniques like the Hessenberg form and modern parallel algorithms are used to improve performance.
III. Convergence Speed for Certain Matrices:
While generally fast, convergence can be slow if the matrix has certain structures or if shifts are not chosen wisely, making it less practical without proper optimization.