Calculus, Linear Algebra & Discrete Math Matrices & Linear Algebra Characteristic polynomial det(A − λI) = 0

Eigenvalue and Eigenvector Calculator (2×2, 3×3)

Enter a 2×2 or 3×3 matrix and this calculator builds its characteristic polynomial, solves it exactly with the closed-form quadratic and cubic formulas, and then finds the eigenvectors by computing the null space of A − λI for each eigenvalue. You get the algebraic multiplicity from the polynomial and the geometric multiplicity from the null space, which together decide whether the matrix is diagonalisable. Complex conjugate pairs are reported with their modulus rather than silently dropped.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Matrix sizeChoose 2 to use only the top-left four entries.3 × 3
a₁₁Entry in row 1, column 1 of the matrix.2
a₁₂Entry in row 1, column 2 of the matrix.0
a₁₃Entry in row 1, column 3 of the matrix.0
a₂₁Entry in row 2, column 1 of the matrix.0
a₂₂Entry in row 2, column 2 of the matrix.3
a₂₃Entry in row 2, column 3 of the matrix.4
a₃₁Entry in row 3, column 1 of the matrix.0
a₃₂Entry in row 3, column 2 of the matrix.4
a₃₃Entry in row 3, column 3 of the matrix.9

It returns

  • Largest eigenvalue λ₁ — Real eigenvalues are listed largest first.
  • Second eigenvalue λ₂
  • Third eigenvalue λ₃ — 3×3 matrices only, and only when the third root is real.
  • Trace (equals the sum of the eigenvalues)
  • Determinant (equals the product of the eigenvalues)
  • Spectral radius max|λ| — Includes the modulus of any complex pair. Below 1 means powers of A shrink to zero.

The formula

det(AλI)=0
λ=trA±(trA)24detA2
A=PDP1

In plain text: det(A − λI) = 0, then (A − λI)v = 0 for each λ

  • λAn eigenvalue — the factor by which A stretches its eigenvector (—)
  • vAn eigenvector — a non-zero vector whose direction A leaves unchanged (—)
  • IThe identity matrix of the same size as A (—)
  • det(A − λI)The characteristic polynomial, of degree n in λ (—)

The definition is Av = λv with v ≠ 0. Rearranging to (A − λI)v = 0 forces A − λI to be singular, which is exactly the determinant condition.

Updated Category Matrices & Linear Algebra Verified against published test cases Reading time 10 min

What eigenvalues and eigenvectors are

Most vectors change direction when a matrix acts on them. A few do not — they only get longer or shorter, or flipped. Those special directions are the eigenvectors, and the factor each one is scaled by is its eigenvalue. In symbols, Av = λv with v0.

Finding them turns a matrix from an opaque grid of numbers into something you can describe in a sentence. A matrix with eigenvalues 3 and 0.5 stretches by 3 along one axis and squashes by half along another, and once you know those axes you know everything the matrix does. That is why eigenvalues appear as the answer to so many different questions: the natural frequencies of a vibrating structure, the principal components of a data set, the long-run distribution of a Markov chain, the stability of an equilibrium in a differential equation, and the ranking vector behind PageRank are all eigenvector problems.

Two identities give you an instant check on any answer. The eigenvalues sum to the trace and multiply to the determinant. For the default matrix, the eigenvalues 11, 2 and 1 sum to 14 and multiply to 22, which are exactly the trace and determinant reported above.

Why the determinant appears in the recipe

Start from Av = λv and move everything to one side: (A − λI)v = 0. You are asking for a non-zero vector that the matrix A − λI sends to zero. A matrix does that only if it is singular — an invertible matrix sends nothing but zero to zero. So λ is an eigenvalue precisely when det(A − λI) = 0.

Expanding that determinant gives a polynomial of degree n in λ, the characteristic polynomial. For a 2×2 it is λ² − (tr A)λ + det A, so the eigenvalues come straight from the quadratic formula. For a 3×3 it is λ³ − (tr A)λ² + (sum of the three principal 2×2 minors)λ − det A, a cubic that this calculator solves with the trigonometric form of Cardano's formula and then refines with a few Newton steps.

Once you have λ, the eigenvectors are the null space of A − λI, found by row reduction. There is always at least one, because the matrix is singular by construction; the dimension of that null space is the geometric multiplicity.

The other multiplicity comes from the polynomial: if (λ − 3)² divides the characteristic polynomial, then 3 has algebraic multiplicity 2. The two need not agree. Geometric multiplicity is always at least 1 and never exceeds the algebraic one, and the gap between them is what makes a matrix defective.

Worked example: the 3×3 matrix [[2,0,0],[0,3,4],[0,4,9]]

The first row and column isolate the entry 2, so the matrix splits into a 1×1 block and a 2×2 block, and the eigenvalues are the union of the blocks' eigenvalues.

  1. Coefficients of the characteristic polynomial. The trace is 2 + 3 + 9 = 14. The three principal 2×2 minors are det[[2,0],[0,3]] = 6, det[[2,0],[0,9]] = 18 and det[[3,4],[4,9]] = 27 − 16 = 11, summing to 35. The determinant is 2 × 11 = 22. So the polynomial is λ³ − 14λ² + 35λ − 22.
  2. Use the block structure to solve it. The 1×1 block gives λ = 2 immediately. The 2×2 block [[3,4],[4,9]] has trace 12 and determinant 11, so λ = (12 ± √(144 − 44))/2 = (12 ± 10)/2, giving 11 and 1.
  3. Check against the identities. 11 + 2 + 1 = 14 = trace ✓. 11 × 2 × 1 = 22 = determinant ✓.
  4. Eigenvector for λ = 11. A − 11I = [[−9,0,0],[0,−8,4],[0,4,−2]]. The first row forces x = 0. The second says −8y + 4z = 0, so z = 2y. Taking y = 1 gives (0, 1, 2), which the calculator reports scaled to (0, 0.5, 1).
  5. Eigenvector for λ = 2. A − 2I = [[0,0,0],[0,1,4],[0,4,7]]. The last two rows force y = z = 0 (their 2×2 determinant is 7 − 16 = −9, non-zero), leaving x free: (1, 0, 0).
  6. Eigenvector for λ = 1. A − I = [[1,0,0],[0,2,4],[0,4,8]]. The first row forces x = 0; the second gives 2y + 4z = 0, so y = −2z. Taking z = 1 gives (0, −2, 1), which the calculator reports as the proportional (0, 1, −0.5).

Verify one of them directly: A(0, 1, 2) = (0, 3(1) + 4(2), 4(1) + 9(2)) = (0, 11, 22) = 11 × (0, 1, 2) ✓.

Three distinct eigenvalues give three independent eigenvectors, so the matrix is diagonalisable: A = PDP⁻¹ with P holding those eigenvectors as columns and D = diag(11, 2, 1). Note also that the matrix is symmetric, and the three eigenvectors are mutually perpendicular — (0,1,2)·(1,0,0) = 0 and (0,1,2)·(0,−2,1) = −2 + 2 = 0 — exactly as the spectral theorem promises.

How to read the spectrum

The sign and size of each eigenvalue tell you what the map does along that axis. |λ| > 1 stretches, |λ| < 1 contracts, λ < 0 flips the direction, and λ = 0 collapses it entirely — which is why a zero eigenvalue is the same statement as a zero determinant and a singular matrix.

The spectral radius decides long-run behaviour. The powers Aⁿ tend to zero when max|λ| < 1 and blow up when it exceeds 1. That single number determines whether an iterative scheme converges, whether a discrete dynamical system settles, and whether a linear recurrence grows or decays.

Complex eigenvalues mean rotation. A real matrix can have complex conjugate pairs, and when it does the map has a rotational component in the plane spanned by the real and imaginary parts of the eigenvector. The 90° rotation matrix [[0,−1],[1,0]] is the pure case: eigenvalues ±i, modulus 1, no real eigenvector at all because no real direction survives a quarter turn.

Compare the two multiplicities. When they agree for every eigenvalue, there is a full basis of eigenvectors and the matrix diagonalises. When geometric falls short of algebraic, the matrix is defective: [[2,1],[0,2]] has λ = 2 with algebraic multiplicity 2 but only the one eigenvector direction (1, 0). Defective matrices cannot be diagonalised at all, and the nearest thing available is the Jordan form.

Small matrices and their spectra

Every row can be entered into the calculator above. The trace and determinant columns are the two checks worth doing on any eigenvalue you compute.
MatrixEigenvaluesTraceDeterminantDiagonalisable?
[[4,1],[2,3]]5, 2710Yes
[[2,0],[0,3]]2, 356Yes — already diagonal
[[2,1],[0,2]]2, 244No — defective
[[0,−1],[1,0]]±i01Not over the reals
[[1,2],[2,4]]5, 050Yes, but singular
[[3,1],[1,3]]4, 268Yes — symmetric
[[2,0,0],[0,3,4],[0,4,9]]11, 2, 11422Yes — symmetric
I₃1, 1, 131Yes — every vector is an eigenvector

The identity and the shear both have a repeated eigenvalue, and they sit on opposite sides of the defective line: the identity has a three-dimensional eigenspace, the shear a one-dimensional one.

Mistakes to avoid

  • Solving det(A − λI) = 0 with a sign slip. Subtract λ from the diagonal, not add it. The 2×2 characteristic polynomial is λ² − (tr A)λ + det A; the minus sign on the trace term is the one people drop.
  • Assuming a repeated eigenvalue means the matrix is defective. It does not. The identity has an eigenvalue repeated n times and is perfectly diagonalisable. Only a shortfall in the geometric multiplicity makes a matrix defective.
  • Expecting real eigenvalues from a real matrix. Rotations have none. If your matrix is symmetric, the spectral theorem guarantees real eigenvalues; otherwise there is no such promise.
  • Normalising the eigenvector and thinking that made it unique. Any non-zero multiple of an eigenvector is an eigenvector, including the negative. Two correct answers can differ by sign or scale; this calculator scales the largest component to 1 for readability.
  • Reporting the zero vector as an eigenvector. It satisfies Av = λv for every λ, which is exactly why the definition excludes it.
  • Using the characteristic polynomial numerically for large matrices. Its roots are badly conditioned even when the eigenvalues are not, which is why real software uses the QR algorithm instead. At 2×2 and 3×3 the closed forms used here are exact enough that it does not matter.

Why diagonalisation is worth the trouble

If A = PDP⁻¹ then An = PDnP⁻¹, and raising a diagonal matrix to a power just raises each diagonal entry. A calculation whose cost would grow with n becomes constant. The same trick solves systems of linear differential equations — eAt = PeDtP⁻¹ decouples the system into independent scalar equations — and gives the closed form of any linear recurrence. Everything expensive about a matrix becomes cheap in its eigenbasis, which is why finding that basis is worth the effort.

The characteristic polynomial is a determinant, so the determinant calculator is the natural companion — and its output is the product of the eigenvalues, which is the check this page reports. To find the eigenvectors by hand you row-reduce A − λI, which is exactly what the RREF calculator does; the eigenspace is the null space it reports, and its dimension is the nullity.

Verify any eigenvector by multiplying it back: Av should come out as a clean multiple of v, which the matrix multiplication calculator will show you. Building P from the eigenvectors requires inverting it for the diagonalisation, and the matrix inverse calculator also reports the condition number — which for a symmetric matrix is the ratio of the largest to the smallest absolute eigenvalue you found here.

Eigenvalues of a Hessian classify critical points of a function of several variables, so if you arrived here from a multivariable optimisation problem, build the Hessian with the partial derivative calculator and bring it back. And when a cubic characteristic polynomial has roots that are not nice numbers, the Newton-Raphson calculator will refine any of them from a starting guess.

Frequently asked questions

What does an eigenvalue of zero mean?

That the matrix is singular. A zero eigenvalue means some non-zero vector is sent to the zero vector, so the map collapses at least one dimension, the determinant is zero, and no inverse exists. The eigenspace of the eigenvalue 0 is exactly the null space of the matrix, and its dimension is the nullity.

Can a real matrix have complex eigenvalues?

Yes, and they always come in conjugate pairs a ± bi. It happens whenever the map contains a rotation, because no real direction is left unchanged by turning. The 90° rotation [[0,−1],[1,0]] has eigenvalues ±i. The calculator reports the pair and its modulus; the modulus is what governs whether powers of the matrix grow or decay.

What is the difference between algebraic and geometric multiplicity?

Algebraic multiplicity is how many times λ appears as a root of the characteristic polynomial. Geometric multiplicity is the dimension of its eigenspace — how many independent eigenvectors it has. Geometric is always at least 1 and never more than algebraic. When they are equal for every eigenvalue the matrix is diagonalisable; when geometric is smaller for any eigenvalue, the matrix is defective.

Why are my eigenvectors different from my textbook's?

Almost certainly by a scalar factor. If v is an eigenvector then so is 2v, and so is −v; the eigenvalue equation is unchanged by scaling. Textbooks often clear fractions to get integer entries, while this calculator scales the largest component to 1. Divide one answer by the other component-wise: if you get the same constant every time, both are right.

Does every matrix have eigenvectors?

Every square matrix has at least one eigenvalue over the complex numbers, and each eigenvalue has at least one eigenvector. What is not guaranteed is a full set: a defective matrix such as [[2,1],[0,2]] has only one independent eigenvector for a 2×2, so there is no eigenvector basis and no diagonalisation. Over the reals a matrix may have no eigenvalues at all, as a rotation does.

How do I check an eigenvalue quickly?

Add them and multiply them. The eigenvalues of any square matrix sum to the trace and multiply to the determinant, both of which are shown above. For the default matrix, 11 + 2 + 1 = 14 and 11 × 2 × 1 = 22, matching the trace and determinant exactly. If either check fails, an eigenvalue is wrong.

What is the spectral radius used for?

It decides whether repeated application of the matrix grows or shrinks. If the largest absolute eigenvalue is below 1, the powers Aⁿ tend to the zero matrix and any iteration built on A converges; if it is above 1 they blow up. That single number governs the stability of iterative solvers, discrete dynamical systems and linear recurrences.

Why do symmetric matrices behave so much better?

Because of the spectral theorem: a real symmetric matrix always has real eigenvalues, is always diagonalisable, and its eigenvectors for distinct eigenvalues are mutually perpendicular. No complex pairs, no defective cases, and the diagonalising matrix can be taken orthogonal so its inverse is just its transpose. Covariance matrices, Hessians and stiffness matrices are all symmetric, which is why so much of applied linear algebra lives in this comfortable case.

References