Jacobi Rotation
The Jacobi rotation method is a classical iterative algorithm used to diagonalize symmetric matrices. It is particularly well-suited for small to medium-sized matrices and is known for its simplicity and robustness. The method works by systematically eliminating off-diagonal elements through a series of orthogonal transformations (rotations), eventually converging to a diagonal matrix whose elements are the eigenvalues of the original matrix.
The Jacobi method targets the largest off-diagonal element of the matrix and applies a rotation to zero it out. This process is repeated iteratively until all off-diagonal elements are sufficiently small, resulting in a diagonal matrix. The eigenvalues of the original matrix are then found on the diagonal, and the eigenvectors are obtained from the product of all the rotation matrices applied during the process.
Principles
For a symmetric matrix , the goal is to find an orthogonal matrix such that:
where is a diagonal matrix containing the eigenvalues of , and the columns of are the corresponding eigenvectors.
The Jacobi method achieves this by applying a sequence of orthogonal transformations (rotations) to . Each rotation targets a specific off-diagonal element and zeroes it out.
Rotation Matrix
A Jacobi rotation matrix is an orthogonal matrix that differs from the identity matrix only in four elements:
Here, and are placed at the intersections of the -th and -th rows and columns. The angle is chosen such that the off-diagonal element is zeroed out.
Algorithm
Identify the Largest Off-Diagonal Element:
- Find the largest off-diagonal element (in absolute value) in the matrix .
Compute the Rotation Angle :
- The angle is chosen to satisfy:
- From this, compute and .
Construct the Rotation Matrix :
- Build the rotation matrix using and .
Apply the Rotation:
- Update the matrix as:
- This transformation zeroes out and .
Accumulate the Transformations:
- Update the eigenvector matrix as:
- This accumulates the rotations to form the final eigenvector matrix.
Repeat Until Convergence:
- Repeat the process until all off-diagonal elements are smaller than a specified tolerance .
An Example
Consider a symmetric matrix :
Step 1: Initialize
Start with the matrix and an identity matrix to accumulate the rotations:
Step 2: Find the Largest Off-Diagonal Element
The largest off-diagonal element in is .
Step 3: Compute the Rotation Parameters
For the rotation in the plane:
Compute the angle :
Substituting the values:
Using single-precision arithmetic:
Compute and :
Step 4: Apply the Rotation
Construct the rotation matrix :
Update and :
After the rotation:
Step 5: Repeat for Other Off-Diagonal Elements
Repeat the process for the next largest off-diagonal element until all off-diagonal elements are sufficiently small (e.g., below a tolerance of ).
Step 6: Final Diagonalized Matrix
After convergence, the diagonalized matrix will be:
The corresponding eigenvector matrix will be:
Advantages
- Simplicity: The algorithm is straightforward to implement.
- Robustness: It is guaranteed to converge for symmetric matrices.
- Accuracy: Provides highly accurate eigenvalues and eigenvectors.
Limitations
- Slow Convergence: The method requires many iterations for large matrices.
- Inefficiency for Large Matrices: Not suitable for very large or sparse matrices.
- Computational Cost: Each rotation involves updating the entire matrix, which can be costly for large systems.