Eigenvalue Calculator
Type or paste a real matrix from 2 x 2 to 6 x 6 to find its numerical eigenvalues and eigenvectors. Each pair carries a residual check, and the trace and determinant are compared with the eigenvalues' sum and product. Repeated values and missing independent vectors remain visible, so a defective matrix is identified.
A blank cell counts as 0. Paste a whole matrix into any cell and it fills the grid.
characteristic polynomial λ² - 7λ + 10
- λ₁5residual 0v = (1, 1)
- λ₂2residual 2.2e-16v = (1, -2)
trace 7 = 5 + 2 det 10 = 5 x 2
2 eigenvalues and two independent eigenvectors.
- λ₁
- λ₂
- Trace / det
- Max residual
A residual is the length of A v minus lambda v, with the vector scaled to length 1: it is how far this pair is from being exact, and 0 means the substitution came back exact in double precision. Vectors are printed divided through by their first entry, which is why a vector reads as (1, -2) rather than (-0.4472, 0.8944).
Three cases, worked
Each line below is computed by the same code that answers the calculator above, so the examples and the tool can never disagree.
Common questions
- How are the eigenvalues found, if not from the characteristic polynomial?
- The tool balances the matrix, reduces it to Hessenberg form and applies a shifted QR iteration. A real matrix can have real eigenvalues or complex conjugate pairs. Eigenvectors are found from the null space of A minus lambda I, with a numerical refinement when needed. The characteristic polynomial is also printed for 2 x 2 and 3 x 3 matrices; it is not used to compute the eigenvalues. Larger supported matrices show eigenvalues and checks without a polynomial.
- What is the residual shown next to each eigenvalue?
- It is the length of A v minus lambda v, with the eigenvector scaled to length 1. If lambda and v were exact, that would be zero, so the number is a direct measure of how far the pair is from exact, and it is comparable between pairs and between matrices because the vector always has the same length. For [[4, 1], [2, 3]] the tool returns 5 and 2 with vectors (1, 1) and (1, -2), and the residuals come back at 0 and 2.2e-16, so these are small residuals in double precision, not a promise of exact symbolic arithmetic. A residual near 1e-8 rather than 1e-16 is not a bug: it is what a repeated or nearly repeated eigenvalue can support, and seeing it is the point of printing it.
- Why does my matrix have fewer eigenvectors than eigenvalues?
- Because it is defective. The shear [[1, 1], [0, 1]] has the eigenvalue 1 twice, but every eigenvector of it is a multiple of (1, 0), so there is one independent direction for two eigenvalues and no basis of eigenvectors exists at all. The tool measures this rather than guessing: it counts the independent directions in the null space of A minus lambda I by elimination with complete pivoting, which is the geometric multiplicity of that eigenvalue. When that count comes out under the number of times the eigenvalue occurs, the extra copies are listed with no vector and the matrix is called defective. A repeated eigenvalue is not defective by itself: the identity times 2 has the eigenvalue 2 twice and a full pair of vectors.
- Does it handle complex eigenvalues?
- Yes, and they are the normal case for a rotation. The quarter-turn [[0, -1], [1, 0]] has no real eigenvector at all, and this returns i and -i with vectors (1, -i) and (1, i). A real matrix can only produce complex eigenvalues in conjugate pairs, so the second of a pair is given the exact conjugate of the first vector rather than whatever a separate solve happened to land on. Complex numbers are printed the way they are written by hand: i, -i, 3 + 4i, 3 - i.
- Why is one of my eigenvalues 6.7e-16 instead of 0?
- Because the arithmetic is done in double precision and the iteration cannot land on exact zero from a matrix that does not decouple. [[1, 2, 3], [4, 5, 6], [7, 8, 9]] is singular, so one eigenvalue is mathematically 0, and this returns 16.1168, -1.1168 and 6.7e-16. Showing that last value as a flat 0 would be a claim the arithmetic never made, so it is printed as the tiny number it is, with its residual beside it and the eigenvector (1, -2, 1) that goes with it. The determinant shown underneath is computed separately, by exact integer elimination when every entry is a whole number, so it reads 0 for that matrix and the gap between it and the product of the eigenvalues is where the rounding went.
- How do I get a matrix in quickly, and what can a cell hold?
- Paste it. A block of numbers dropped into any cell spreads across the grid from that cell and grows the grid to fit, so [[4, 1], [2, 3]], 4 1; 2 3 and two tab separated lines all arrive the same way. A cell takes a whole number, a decimal, exponent form like 1.5e-2, a fraction like 1/2, and the long minus sign that comes with anything copied out of a PDF. A blank cell counts as 0, so a mostly empty matrix still computes, though an entirely blank grid is refused rather than answered as the zero matrix. Sizes run from 2 x 2 to 6 x 6, the result can be shown at 4, 8 or 12 decimal places, and everything runs in your browser with nothing uploaded and no account.
- How do I read algebraic and geometric multiplicity?
- The list includes repeated eigenvalues. Algebraic multiplicity is the number of occurrences of a value; geometric multiplicity is the number of independent vectors provided for that value. Values close within the numerical clustering tolerance are grouped, so these are numerical multiplicity estimates. For the shear [[1, 1], [0, 1]], 1 appears twice but only one independent vector is returned: algebraic multiplicity 2 and geometric multiplicity 1.
- Does it show a characteristic equation or step-by-step derivation?
- For a 2 x 2 or 3 x 3 matrix, set the displayed characteristic polynomial equal to 0 to read the characteristic equation. For [[4, 1], [2, 3]], it is λ² - 7λ + 10 = 0, with eigenvalues 5 and 2. The page shows the resulting vectors, residuals, trace and determinant checks. It does not show a step-by-step derivation for the entered matrix.
- Which eigenvalue is dominant, largest or smallest?
- Eigenvalues are listed by decreasing magnitude, so the first has the largest magnitude; tied magnitudes can share that position. For real eigenvalues, the largest signed value and the smallest signed value can differ from that ordering. Complex eigenvalues have a magnitude but no usual largest-to-smallest signed ordering. This tool computes all the values, rather than running the power method or inverse power method.
- Can I enter variables or a matrix with complex entries?
- No. Matrix cells accept real numbers, decimals, fractions and exponent notation. Symbolic variables and imaginary entries are refused. Complex eigenvalues and eigenvectors can still be returned when they arise from a real matrix.
- Is it free to use on a phone or computer?
- The calculator runs locally in the browser on a phone, tablet or computer. There is no account or installation, and computing and copying the result are free.
Eigenvalues are computed numerically for real matrices from 2 x 2 up to 6 x 6, and every pair is substituted back so the residual of A v minus lambda v is printed next to it. The trace and determinant are checked against the sum and product of the eigenvalues as a second test. A defective matrix returns only the eigenvectors that exist rather than a fabricated full basis, and a run that does not converge says so instead of returning a number.