Jacobi Symmetric Plane Diagonalization
Rotate a symmetric matrix on both sides to eliminate coupling while preserving its spectrum.
By Riano · Published · Updated · Report a correction
Jacobi Symmetric Plane Diagonalization
Rotate a symmetric matrix on both sides to eliminate coupling while preserving its spectrum.
Worked Example
Let us calculate the Jacobi symmetric plane diagonalization for a matrix A = [[2, 1], [1, 4]].
- Identify the matrix elements: First diagonal a = 2, Second diagonal d = 4, Off diagonal b = 1.
- Calculate the rotation angle θ:
θ = 0.5 * atan2(2b, d - a)
θ = 0.5 * atan2(2(1), 4 - 2) = 0.5 * atan2(2, 2) = 0.5 * (π / 4) ≈ 0.392699 - Compute the rotation matrix J:
c = cos(θ) ≈ 0.92388
s = sin(θ) ≈ 0.38268
J = [[c, s], [-s, c]] - Calculate the rotated matrix JT A J:
The new first diagonal a' = c(ac - bs) - s(bc - ds) ≈ 1.585786
The new second diagonal d' = s(as + bc) + c(bs + dc) ≈ 4.414214
The new off-diagonal b' = c(as + bc) - s(bs + dc) = 0 - Verify properties:
Trace = a' + d' = 1.585786 + 4.414214 = 6 (which equals a + d = 2 + 4)
Determinant = a' * d' = (1.585786)(4.414214) = 7 (which equals a*d - b*b = 8 - 1)
Experiment with the Controls
You can interact with the diagonalization model at https://riano.app/module/jacobi-symmetric-plane-diagonalization.
- Set First diagonal to 2, Second diagonal to 2, and Off diagonal to 1.
- Observe that the rotation radians become exactly π/4 (~0.785398) because the diagonals are equal, meaning the matrix needs a 45-degree rotation to decouple.
- Notice how the Off-diagonal energy after instantly becomes 0.
- Set the Off diagonal to 0. The angle becomes 0, and the initial matrix is already diagonal.
Limitations
When implementing the Jacobi rotation using floating-point arithmetic, the annihilated off-diagonal element b' may not be exactly zero but rather a very small number (e.g., 1e-16). Additionally, this module performs only a single local 2x2 rotation; a full Jacobi eigenvalue method for larger matrices requires repeatedly applying such rotations (sweeps) across all off-diagonal pairs until the entire off-diagonal energy falls below a threshold. Finally, the positions of the eigenvalues on the diagonal are not guaranteed to be sorted by magnitude when b ≠ 0.
References
Dongarra, J., et al. "The Jacobi Method". Templates for the Solution of Algebraic Eigenvalue Problems: A Practical Guide, SIAM, 2000. Provides the foundational formulas for the local 2x2 rotation and demonstrates how it forms the basis of the Jacobi eigenvalue method.
https://www.netlib.org/utk/people/JackDongarra/etemplates/node93.html
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Jacobi Symmetric Plane Diagonalization module.
Try Jacobi Symmetric Plane Diagonalization on Riano →