Eigenvalue Calculator

Enter a 2x2 or 3x3 matrix and get its eigenvalues and eigenvectors with the full working: the characteristic polynomial built from your numbers, each eigenvector solved from (A - λI)v = 0, the trace and determinant cross-check, and a plain verdict on whether the matrix diagonalizes.

Put this calculator on your website for free

Copy one snippet and give your visitors a working Eigenvalue Calculator.

What Av = λv is actually saying

A matrix moves vectors. Feed one in, a different one comes out, usually pointing somewhere new. An eigenvector is a direction the matrix does not turn: the output lands on the same line as the input, only longer, shorter, or flipped. The eigenvalue is the stretch factor along that direction. Take the matrix [[2, 0],[0, 2]] and the vector [3, 4]: multiplying gives [6, 8]. Same direction, twice the length, so [3, 4] is an eigenvector with eigenvalue 2 (and for that particular matrix, so is every other vector, since doubling everything turns nothing). Most matrices are choosier: they keep only a few special directions, and finding them is what this page does. If you just need the mechanics of multiplying a matrix by a vector, the matrix multiplication calculator walks through it row by row.

The characteristic polynomial

Where do eigenvalues come from? Rearrange the definition: Av = λv means (A − λI)v = 0 for some nonzero v. A matrix can only send a nonzero vector to zero if it squashes space flat, and the determinant is exactly the flatness detector: it happens precisely when det(A − λI) = 0. Expand that determinant and you get a polynomial in λ, the characteristic polynomial. Its degree equals the matrix size, because λ appears once in each of the n diagonal entries and the determinant multiplies one entry from every row. So a 2×2 matrix gets a quadratic and a 3×3 gets a cubic, which is why a 2×2 has at most two eigenvalues and a 3×3 at most three. If you came here for a characteristic polynomial calculator, this is the first thing the steps print, built from your own entries.

det(A − λI) = 0
2×2:  λ2 − (a + d)λ + (ad − bc) = 0
3×3:  λ3 − (trace)λ2 + Mλ − det = 0

The trace is the sum of the diagonal entries, det is the determinant, and M is the sum of the three principal 2×2 minors (cross out row k and column k, take the determinant of what is left, do it for k = 1, 2, 3, add the three up). Every coefficient is something you can read off the matrix, no symbolic expansion required. The determinant itself, along with the inverse, lives on the matrix calculator.

Worked example

Find the eigenvalues and eigenvectors of A = [[2, 1],[1, 2]]. The trace is 2 + 2 = 4 and the determinant is (2)(2) − (1)(1) = 3, so the characteristic polynomial is λ2 − 4λ + 3 = 0. The quadratic formula: the discriminant is 16 − 12 = 4, so λ = (4 ± 2)/2, giving λ = 1 and λ = 3.

For λ = 1: A − I = [[1, 1],[1, 1]], and the row [1, 1] demands v1 + v2 = 0, so v = [1, −1]. For λ = 3: A − 3I = [[−1, 1],[1, −1]], whose rows demand v2 = v1, so v = [1, 1]. Check the first pair: A·[1, −1] = [2 − 1, 1 − 2] = [1, −1], which is 1 times the vector. And the built-in cross-check: 1 + 3 = 4 matches the trace, 1 × 3 = 3 matches the determinant.

So this matrix stretches the [1, 1] diagonal by 3 and leaves the [1, −1] diagonal alone. Every other vector is a mix of those two motions.

Rotations, shears, and matrices that keep secrets

Three special cases teach more than a hundred routine ones. First, complex eigenvalues: the 90 degree rotation [[0, −1],[1, 0]] turns every single direction, so no real eigenvector can exist, and the algebra agrees by handing back the complex pair i and −i. That is not the machinery breaking; it is the machinery telling you the matrix rotates. Second, defective matrices: the shear [[1, 1],[0, 1]] has one eigenvalue, 1, counted twice, but only one independent eigenvector. A shear slides everything sideways, keeps the x axis pointed the same way, and tilts every other direction, so one preserved direction is genuinely all it has. Third, zero eigenvalues: an eigenvalue of 0 means some direction gets flattened to nothing, which is the same thing as the determinant being 0, because the determinant is always the product of the eigenvalues. A singular matrix and a matrix with a zero eigenvalue are the same animal seen from two sides.

Why eigenvalues matter beyond the homework

Two famous jobs. Principal component analysis, the workhorse of data compression and machine learning, is eigenvectors wearing a lab coat: build the covariance matrix of your data and its eigenvectors are the directions the data actually varies in, with each eigenvalue measuring how much variation lives along its direction. Keeping the few directions with the biggest eigenvalues and dropping the rest is how a thousand-column dataset shrinks to a handful of columns without losing the story. And Google PageRank: the early web was ranked by writing the link structure as one enormous matrix and finding its leading eigenvector, whose entries are the importance scores of every page. The ranking that organized the web was, quite literally, one eigenvector. Row-times-column arithmetic underneath all of this is just repeated dot products, which the dot product calculator covers, and the perpendicular-to-both trick this page uses for 3×3 eigenvectors is the cross product earning its keep.

Diagonalization, and what it is for

When an n×n matrix has n independent eigenvectors, you can factor it as A = PDP−1: D is a diagonal matrix holding the eigenvalues, and P holds the eigenvectors as columns. This calculator prints both whenever they exist. The payoff is that diagonal matrices are trivially easy to work with, so anything hard about A gets done on D instead: A100 = PD100P−1, and raising D to the 100th power just raises each diagonal number. That trick powers population models, Markov chains, systems of differential equations, and the Fibonacci closed form. A matrix that cannot be diagonalized (the defective case above) is exactly one that is short of eigenvectors, and this page says so plainly rather than manufacturing a P that does not exist. For solving the systems of equations that eigenvector work reduces to, row reduction lives on the RREF calculator.

Symmetric matrices always play fair

One theorem worth carrying around: a symmetric matrix (equal to its own transpose, so the entry at row i, column j matches the one at row j, column i) always has real eigenvalues, and its eigenvectors can always be chosen perpendicular to each other. That is the spectral theorem, and you can lean on it: no complex pairs, no defective shortage, a full set of eigenvectors, guaranteed before you compute anything. It is also why PCA never misbehaves, since covariance matrices are symmetric by construction. Try it here: make your matrix symmetric, and watch every eigenvalue come back real, every time. The worked example above, [[2, 1],[1, 2]], is symmetric, and sure enough its eigenvectors [1, 1] and [1, −1] are perpendicular: their dot product is 1 − 1 = 0.

Frequently asked questions

Can eigenvalues be complex numbers?

Yes, and it means something specific: the matrix rotates. The 90 degree rotation [[0, -1],[1, 0]] turns every direction, so no real vector can come out parallel to itself, and the algebra reports that by returning the complex pair i and -i. A real matrix always produces complex eigenvalues in conjugate pairs, a + bi together with a - bi.

Can an eigenvalue be zero?

Yes, exactly when the matrix is singular. The determinant always equals the product of the eigenvalues, so a zero eigenvalue forces determinant zero and the other way around. Geometrically, the eigenvector belonging to 0 is a direction the matrix flattens completely: Av = 0v means v gets sent to the zero vector.

What is a defective matrix?

One that is short of eigenvectors. The shear [[1, 1],[0, 1]] has the eigenvalue 1 counted twice, but only one independent eigenvector, because a shear keeps the x axis pointed the same way and tilts every other direction. When an eigenvalue's count of independent eigenvectors (geometric multiplicity) falls below how many times it appears as a root (algebraic multiplicity), the matrix is defective and cannot be diagonalized.

What is diagonalization actually for?

Making hard matrix work cheap. If A has a full set of independent eigenvectors, then A = PDP-1 with the eigenvalues on D's diagonal and the eigenvectors as P's columns, and Ak = PDkP-1, where powering D just powers each diagonal number. Population models, Markov chains, and systems of differential equations all run on this trick. This calculator prints D and P whenever they exist.

How do I find the eigenvalues of a 2x2 matrix by hand?

Two numbers and one formula. Compute the trace (add the diagonal) and the determinant, write λ2 - (trace)λ + det = 0, and solve with the quadratic formula. For [[2, 1],[1, 2]]: trace 4, determinant 3, so λ2 - 4λ + 3 = 0, which factors to (λ - 1)(λ - 3) and gives eigenvalues 1 and 3. Check yourself: they must add to the trace and multiply to the determinant.

What is an eigenvector, in plain words?

A direction the matrix does not turn. Feed the matrix a vector along that direction and the output lands on the same line, just stretched, shrunk, or flipped, and the eigenvalue is the stretch factor. [[2, 0],[0, 2]] sends [3, 4] to [6, 8]: same direction, twice the length, so [3, 4] is an eigenvector with eigenvalue 2.

Do symmetric matrices always have real eigenvalues?

Yes. A matrix that equals its own transpose always has real eigenvalues, and its eigenvectors can be chosen perpendicular to each other. That is the spectral theorem, and it is why principal component analysis never hits complex numbers: covariance matrices are symmetric by construction, so their eigenvalues (the variances along each principal direction) are guaranteed real.

Related calculators