Calculator Input
This page supports reliable real eigen decomposition for symmetric 2×2 to 5×5 matrices, plus exact real 2×2 general matrices.
Example Data Table
The default example uses a classic symmetric tridiagonal matrix, which guarantees real eigenvalues and an orthogonal eigenvector matrix.
| Example | Matrix | Recommended Mode | Approximate Eigenvalues | Why It Matters |
|---|---|---|---|---|
| 3 × 3 symmetric benchmark | [[2,1,0],[1,2,1],[0,1,2]] | Symmetric | 3.414214, 2.000000, 0.585786 | Shows clean orthogonal eigenvectors and low reconstruction error. |
| 2 × 2 general benchmark | [[4,1],[2,3]] | General 2×2 | 5.000000, 2.000000 | Highlights the exact closed-form polynomial solution. |
Formula Used
Characteristic Polynomial
Eigenvalues solve det(A - λI) = 0. For a 2 × 2 matrix [[a,b],[c,d]], the polynomial becomes λ² - (a+d)λ + (ad-bc) = 0.
Closed-Form 2 × 2 Eigenvalues
λ₁,₂ = (trace(A) ± √(trace(A)² - 4det(A))) / 2. Each eigenvector is found by solving (A - λI)v = 0.
Symmetric Matrix Decomposition
For symmetric matrices, the calculator computes A = QDQᵀ, where Q contains orthonormal eigenvectors and D contains eigenvalues on the diagonal.
Jacobi Rotation Step
The Jacobi solver repeatedly removes the largest off-diagonal term. The rotation angle follows θ = 0.5 × atan2(2aₚq, aqq - app).
Validation Metrics
The page checks trace(A) ≈ Σλ, det(A) ≈ Πλ, orthogonality error ||QᵀQ - I||∞, and reconstruction error ||A - QDQᵀ||∞.
How to Use This Calculator
- Select the matrix size from 2 × 2 up to 5 × 5.
- Choose Symmetric for robust real decomposition, or General 2×2 for the exact closed-form route.
- Enter the matrix entries. In symmetric mode, the page mirrors matching off-diagonal cells automatically.
- Set the tolerance, maximum iterations, sorting order, and eigenvector normalization preference.
- Click Compute Eigen Decomposition to show results above the form and below the header.
- Review the eigenvalues, eigenvectors, diagonal matrix, reconstruction check, and the Plotly graph.
- Use the CSV or PDF buttons to export a clean summary of the calculation.
Frequently Asked Questions
1. What does eigen decomposition show?
It rewrites a matrix using its eigenvectors and eigenvalues. This reveals invariant directions, growth or decay factors, and whether the matrix can be diagonalized cleanly for easier analysis.
2. Why is symmetric mode recommended?
Real symmetric matrices always have real eigenvalues and orthogonal eigenvectors. That makes the decomposition numerically stable, easier to validate, and more reliable for an in-browser standalone calculator.
3. Why does general mode only support 2 × 2?
Larger general matrices can require complex arithmetic, advanced QR routines, and extra stability controls. This page keeps general mode exact and transparent by solving only real 2 × 2 cases directly.
4. What does reconstruction error mean?
It measures the largest absolute difference between the original matrix and the rebuilt matrix from the decomposition. Smaller values indicate a more accurate numerical result.
5. Why can orthogonality error be nonzero?
Floating-point rounding introduces tiny deviations. Even an excellent decomposition may show a very small orthogonality error because computers store decimal values approximately.
6. What happens with repeated eigenvalues?
Repeated eigenvalues can still be diagonalizable, especially for symmetric matrices. In general matrices, a repeated eigenvalue may fail to produce enough independent eigenvectors for full diagonalization.
7. When should I change the tolerance?
Use a tighter tolerance for more refined symmetry checks and Jacobi convergence. Use a looser value when inputs are noisy or when you want faster stopping with acceptable approximation.
8. What do the export buttons include?
The CSV file includes key numeric outputs. The PDF summarizes the input matrix, eigenvalues, solver details, and validation metrics for reporting or classroom use.