The Jacobi method

Diagonalize a real symmetric matrix by following a sequence of plane rotations. Each step removes a symmetric pair of off-diagonal entries while preserving the eigenvalues.

From plane rotations to eigenvectors

The Jacobi method repeatedly chooses the largest off-diagonal entry and applies an orthogonal rotation in the corresponding coordinate plane. The transformed matrix stays symmetric, and its off-diagonal entries approach zero.

$$A_k=Q_k^T A_0 Q_k,\qquad A_0=Q_k A_k Q_k^T$$

The columns of $Q_k$ accumulate the rotations. When $A_k$ is nearly diagonal, its diagonal entries approximate the eigenvalues and the columns of $Q_k$ are the corresponding orthonormal eigenvectors.

  1. Find an off-diagonal entry $a_{pq}$ with largest absolute value.
  2. Choose a plane rotation that makes the $(p,q)$ and $(q,p)$ entries zero.
  3. Apply the same orthogonal change of coordinates to the matrix and accumulate it in $Q$.
  4. Repeat until the off-diagonal part is small; read the eigenvalues from the diagonal.

The off-diagonal Frobenius norm is used as a convergence measure. Rotations preserve the Frobenius norm and symmetry.

Explore the rotations

Dimension
Rotations
Off-diagonal Frobenius norm
Stopping tolerance

Highlighted cells show the pair selected for the next rotation. The diagonal entries of the current matrix are the eigenvalue estimates; values are rounded for display.

Check the result

These residuals measure how closely the computed vectors are orthonormal and how accurately they reconstruct the original matrix.

Orthogonality residual
Reconstruction residual

Both residuals are Frobenius norms. Small values indicate that $Q^TQ\approx I$ and $A_0\approx Q\Lambda Q^T$.

Export the current state to Maple