Eigenvalue Calculator
Enter a square matrix up to 6 × 6 and get its eigenvalues and eigenvectors, the characteristic polynomial, the trace and determinant checks, and the diagonalization A = PDP⁻¹ when it exists. Eigenvalues come out exactly — as fractions, radicals or complex numbers — whenever the polynomial allows, and numerically otherwise. Free, no sign-up, and everything runs in your browser.
Whole numbers, decimals or fractions such as 3/4.
Results
Eigenvalues (repeated according to algebraic multiplicity)
λ1 = 2, λ2 = 5
7
Trace
10
Determinant
Exact
Method
No
Symmetric?
Yes
Diagonalizable?
Check: the eigenvalues add up to the trace, 7, and multiply to the determinant, 10.
Characteristic polynomial
p(λ) = det(λI − A) = λ² − tr(A)·λ + det(A) = λ² − (7)λ + (10) = λ² − 7λ + 10
p(λ) = (λ − 2)(λ − 5)
- Rational root theorem: a rational root is a divisor of the constant term over a divisor of the leading coefficient. Roots found: 2, 5.
Eigenvalues and eigenvectors
Each eigenvector solves (A − λI)v = 0. Any non-zero multiple of it is also an eigenvector.
λ = 2
algebraic multiplicity 1, geometric multiplicity 1
| 2 | 1 |
| 2 | 1 |
| 1 |
| −2 |
λ = 5
algebraic multiplicity 1, geometric multiplicity 1
| −1 | 1 |
| 2 | −2 |
| 1 |
| 1 |
Diagonalization
The eigenvectors form the columns of P, and A = P D P⁻¹ with D the diagonal matrix of eigenvalues.
| 1 | 1 |
| −2 | 1 |
| 2 | 0 |
| 0 | 5 |
How to Use the Eigenvalue Calculator
- 1. Choose the size. Pick n from 2 to 6 and fill in the n × n matrix. Fractions such as 3/4 and decimals are read exactly.
- 2. Read the eigenvalues. They are listed with repeats according to algebraic multiplicity, next to the trace and determinant as a quick check: the eigenvalues add up to the trace and multiply to the determinant.
- 3. Follow the characteristic polynomial. The calculator writes p(λ) = det(λI − A), factors out its rational roots, and solves what is left with the quadratic formula.
- 4. Inspect the eigenvectors. For each eigenvalue you see A − λI and a basis of its eigenspace, plus P and D when A is diagonalizable over the rationals.
What Eigenvalues and Eigenvectors Are
An eigenvector of a square matrix A is a non-zero vector v that A only stretches, never turns: Av = λv. The scalar λ is the eigenvalue. Rearranged, (A − λI)v = 0 has a non-zero solution only when A − λI is singular, which happens exactly when det(A − λI) = 0. That equation is the characteristic equation, and the polynomial is the characteristic polynomial. This calculator uses the monic form det(λI − A), which differs from det(A − λI) only by the factor (−1)ⁿ and has the same roots.
| Term | Meaning |
|---|---|
| Algebraic multiplicity | How many times λ is a root of the characteristic polynomial |
| Geometric multiplicity | The dimension of the eigenspace: how many independent eigenvectors λ has |
| Diagonalizable | A has n independent eigenvectors, so A = PDP⁻¹; this needs geometric = algebraic multiplicity for every eigenvalue |
| Defective | Some eigenvalue has geometric multiplicity below its algebraic multiplicity |
Geometric multiplicity is never larger than algebraic multiplicity. Symmetric real matrices are always diagonalizable, with real eigenvalues.
Exact Answers and Numeric Answers
The characteristic polynomial is computed exactly, so there is no rounding in it. Rational roots are found with the rational root theorem and divided out. If a quadratic is left, the quadratic formula gives both remaining eigenvalues in closed form, including complex ones, and the eigenvectors are solved exactly in the same number system. That covers every 2 × 2 matrix, every 3 × 3 matrix whose characteristic polynomial has a rational root, and larger matrices that split into rational roots plus one quadratic.
When the polynomial does not factor that way — an irreducible cubic, or a quartic with irrational roots — the calculator switches to the QR algorithm in double precision. It reduces the matrix to Hessenberg form, applies shifted QR steps until the subdiagonal vanishes, and finds eigenvectors by inverse iteration. Expect about ten correct digits for a well-conditioned matrix. An eigenvalue whose imaginary part is below 10⁻⁹ of its size is shown as real, and the page says which method it used.
Worked Examples
A = [4 1; 2 3]. The trace is 7 and the determinant 10, so p(λ) = λ² − 7λ + 10 = (λ − 2)(λ − 5). For λ = 2 the eigenvector is (1, −2), and for λ = 5 it is (1, 1). Then P has columns (1, −2) and (1, 1), D = diag(2, 5), and A = PDP⁻¹.
A = [1 1; 1 0] (the Fibonacci matrix). Here p(λ) = λ² − λ − 1 has discriminant 5 and no rational roots, so the eigenvalues are (1 + √5)/2 ≈ 1.618034 — the golden ratio — and (1 − √5)/2 ≈ −0.618034, with eigenvector ((1 + √5)/2, 1) for the first.
A = [0 −1; 1 0], a 90° rotation, has p(λ) = λ² + 1, so its eigenvalues are i and −i: no real vector keeps its direction. The cyclic permutation matrix with rows (0, 1, 0), (0, 0, 1), (1, 0, 0) has p(λ) = λ³ − 1 = (λ − 1)(λ² + λ + 1), so its eigenvalues are 1 and the complex cube roots of unity (−1 ± i√3)/2. A = [2 1; 0 2] has λ = 2 with algebraic multiplicity 2 but only one eigenvector direction, so it is defective and cannot be diagonalized.
The 4 × 4 tridiagonal matrix with 2 on the diagonal and −1 beside it has an irrational spectrum, so it runs numerically: its eigenvalues are 0.381966, 1.381966, 2.618034 and 3.618034, which match 2 − 2cos(kπ/5) for k = 1 to 4.
Frequently Asked Questions
- How do you find the eigenvalues of a 2×2 matrix?
- Compute the trace and determinant, write λ² − (trace)λ + (determinant) = 0, and solve it. For [4 1; 2 3] that is λ² − 7λ + 10 = 0, so λ = 2 and λ = 5. If the discriminant is negative the eigenvalues are complex conjugates.
- How do you find the eigenvectors once you have the eigenvalues?
- For each eigenvalue λ, solve (A − λI)v = 0, typically by row reduction. The solutions form the eigenspace; any non-zero vector in it is an eigenvector, so eigenvectors are only defined up to a scalar multiple.
- Can a real matrix have complex eigenvalues?
- Yes. Complex eigenvalues of a real matrix come in conjugate pairs. A rotation of the plane by an angle other than 0° or 180° has no real eigenvector, so its eigenvalues are complex.
- What does it mean if an eigenvalue is 0?
- The matrix is singular: det A = 0 because the determinant is the product of the eigenvalues, and the eigenvectors for 0 are the non-zero solutions of Ax = 0. The multiplicity of 0 tells you how much of the space the matrix collapses.
- When is a matrix diagonalizable?
- When it has n linearly independent eigenvectors. Distinct eigenvalues guarantee it, and so does a real symmetric matrix. A repeated eigenvalue can break it if its eigenspace is too small, as in [2 1; 0 2].
- Why are some eigenvalues shown as decimals?
- For 5 × 5 and 6 × 6 matrices, and for cubics with no rational root, there is no root formula this tool applies, so it uses the QR algorithm. Those values are accurate to roughly ten digits; the characteristic polynomial shown beside them is still exact.