Enter your matrix and generate guided steps
This page supports 2×2 and 3×3 square matrices, checks real diagonalization, and returns stepwise working suitable for study and verification.
Large screens use three columns, smaller screens use two, and mobile uses one column.
Example data table
Use these sample matrices to test the calculator and compare the reported decomposition details.
| Example | Matrix | Trace | Determinant | Expected real eigenvalues | Diagonalizable |
|---|---|---|---|---|---|
| 2×2 study case | [6 2; 2 3] | 9 | 14 | 7, 2 | Yes |
| 3×3 symmetric case | [4 1 1; 1 3 0; 1 0 2] | 9 | 19 | ≈ 4.879, 2.653, 1.468 | Yes |
| Upper triangular case | [5 2 0; 0 3 0; 0 0 1] | 9 | 15 | 5, 3, 1 | Yes |
Formula used
1. Characteristic polynomial
For a square matrix A, eigenvalues come from det(A − λI) = 0. For 2×2 matrices, this becomes λ² − tr(A)λ + det(A) = 0.
2. Three-by-three invariant form
For 3×3 matrices, the calculator uses λ³ − c₁λ² + c₂λ − c₃ = 0, where c₁ = tr(A), c₂ = 1/2[(tr(A))² − tr(A²)], and c₃ = det(A).
3. Eigenvectors
Each eigenvector v satisfies (A − λI)v = 0. The solver builds a null-space direction numerically and checks the residual norm ‖Av − λv‖.
4. Decomposition test
A real diagonal decomposition exists when enough linearly independent real eigenvectors are found. Then A = P D P-1, with eigenvectors in P and eigenvalues on D.
How to use this calculator
- Select a matrix size of 2×2 or 3×3.
- Enter each matrix element in the input grid.
- Choose the decimal precision you want in results.
- Enable normalization if you want unit-length eigenvectors.
- Click the calculate button to show results above the form.
- Review the characteristic polynomial, eigenpairs, and diagonalization test.
- Export the current results using the CSV or PDF buttons.
- Use the example matrix buttons when you want a quick demo.
FAQs
What does eigen decomposition mean?
It rewrites a matrix as A = P D P-1 when enough independent eigenvectors exist. The columns of P are eigenvectors, and D stores the matching eigenvalues.
Why can a matrix fail diagonalization?
A matrix fails when it does not have enough linearly independent eigenvectors. Repeated eigenvalues sometimes create this issue, especially in defective matrices.
Does this calculator support complex eigenvalues?
It reports real-valued decomposition steps. When a matrix produces complex eigenvalues, the page warns you that a real diagonal decomposition is unavailable.
Why are my eigenvectors different from a textbook?
Eigenvectors are not unique. Any nonzero scalar multiple of a valid eigenvector is also valid. Normalization changes length, not direction.
What is the residual norm?
The residual norm measures how closely Av matches λv. Smaller values indicate a more accurate eigenvector approximation for the displayed eigenvalue.
Why use trace and determinant here?
They help build the characteristic polynomial. For 2×2 matrices, trace and determinant directly determine the quadratic used to find eigenvalues.
Can I use decimals or negative values?
Yes. The matrix inputs accept decimals, integers, and negative values. Precision settings control how many digits appear in the final results.
When should I trust the reconstruction matrix?
Trust it when diagonalization is confirmed and the reconstruction error is very small. Large errors suggest numerical instability or missing independent eigenvectors.