Linear Algebra

Eigenvalue and Eigenvector Calculator

This eigenvalue calculator finds the eigenvalues and eigenvectors of any square matrix up to 4 × 4, with steps.

Try
Matrix A (square, up to 4 × 4)

Choose the size, then type whole numbers, decimals or fractions. You can paste a block copied from a spreadsheet. For matrices larger than 4 × 4, see “Exact versus numerical eigenvalues” below.

Result

Eigenvalues: λ₁ = 6, λ₂ = 1

Eigenvalues

λ1=6,λ2=1\lambda_{1} = 6, \quad \lambda_{2} = 1

λ₁ = 6, λ₂ = 1

Characteristic polynomial
p(λ)=λ2−7λ+6p(\lambda) = \lambda^{2} - 7\lambda + 6
Factored form
(λ−1)(λ−6)\left(\lambda - 1\right)\left(\lambda - 6\right)
Eigenvector for λ₁ = 6Algebraic multiplicity 1, geometric multiplicity 1. Unit (normalized) eigenvector: (2, 1)/√5.
[21]\begin{bmatrix} 2 \\ 1 \end{bmatrix}
Eigenvector for λ₂ = 1Algebraic multiplicity 1, geometric multiplicity 1. Unit (normalized) eigenvector: (−1, 2)/√5.
[−12]\begin{bmatrix} -1 \\ 2 \end{bmatrix}
Sum of eigenvalues = traceCounted with multiplicity.
77
Product of eigenvalues = determinant
66
Diagonalizable?
Yes

A has 2 distinct real eigenvalues: 6 and 1. Along each eigenvector, multiplying by A just scales the vector by its eigenvalue.

Eigenvalues and eigenvectors
EigenvalueValueAlgebraic multiplicityGeometric multiplicityEigenvectors
λ₁611(2, 1)
λ₂111(−1, 2)
Step-by-step working (6 steps)
  1. Subtract λ from the diagonal

    An eigenvalue λ is a number for which (A − λI)v = 0 has a nonzero solution v, which happens exactly when det(A − λI) = 0.

    A−λI=[5−λ222−λ]A - \lambda I = \begin{bmatrix} 5 - \lambda & 2 \\ 2 & 2 - \lambda \end{bmatrix}
  2. Find the characteristic polynomial

    For a 2 × 2 matrix, det(λI−A)=λ2−(tr⁡A)λ+det⁡A\det(\lambda I - A) = \lambda^2 - (\operatorname{tr} A)\lambda + \det A, with tr A = 7 and det A = 6.

    p(λ)=det(λI−A)=λ2−7λ+6p(\lambda) = \det(\lambda I - A) = \lambda^{2} - 7\lambda + 6
  3. Find the rational roots

    By the rational root theorem, a rational root of p(λ) must divide the constant term (the polynomial is monic). Testing the candidates gives λ = 1, λ = 6.

    p(λ)=(λ−1)(λ−6)p(\lambda) = \left(\lambda - 1\right)\left(\lambda - 6\right)
  4. Eigenvectors for λ = 6

    Row-reduce A − 6I and solve (A − λI)v = 0. There is one free variable, so the eigenvectors are the multiples of (2, 1).

    [−122−4]→[1−200],v=[21]\begin{bmatrix} -1 & 2 \\ 2 & -4 \end{bmatrix} \to \begin{bmatrix} 1 & -2 \\ 0 & 0 \end{bmatrix}, \quad v = \begin{bmatrix} 2 \\ 1 \end{bmatrix}
  5. Eigenvectors for λ = 1

    Row-reduce A − 1I and solve (A − λI)v = 0. There is one free variable, so the eigenvectors are the multiples of (−1, 2).

    [4221]→[11200],v=[−12]\begin{bmatrix} 4 & 2 \\ 2 & 1 \end{bmatrix} \to \begin{bmatrix} 1 & \frac{1}{2} \\ 0 & 0 \end{bmatrix}, \quad v = \begin{bmatrix} -1 \\ 2 \end{bmatrix}
  6. Check with the trace and determinant

    The eigenvalues (with multiplicity) add up to the trace and multiply to the determinant: sum ≈ 7 and tr A = 7; product ≈ 6 and det A = 6.

It builds the characteristic polynomial det(λI−A)\det(\lambda I - A) exactly, solves it for exact rational, surd or complex roots, and finds each eigenvector from (A−λI)v=0(A - \lambda I)v = 0, with unit vectors, multiplicities and trace and determinant checks.

By Hira Noor, mathematicianLast reviewed Free, no sign-up, runs in your browserReport a problem

How to use this calculator

  1. Choose the size of the square matrix (1 × 1 to 4 × 4) and type its entries. Fractions and decimals are kept exact, and you can paste a block copied from a spreadsheet.
  2. Read the eigenvalues at the top. Repeated eigenvalues show their multiplicity, and irrational or complex ones are given in exact form with a decimal value.
  3. Each eigenvector row gives a basis for that eigenvalue’s eigenspace. Any nonzero multiple of an eigenvector is also an eigenvector.
  4. Open the steps to see A − λI, the characteristic polynomial, how it was factored, and the row reduction that produced each eigenvector.

Formulas

Eigenvalue equation

Av→=λv→,v→≠0→A\vec{v} = \lambda \vec{v}, \quad \vec{v} \ne \vec{0}

Plain-text formula: Avec(v) = λvec(v), vec(v) ≠ vec(0)

AA
a square n × n matrix
λ\lambda
an eigenvalue (a real or complex number)
v→\vec{v}
an eigenvector for λ (never the zero vector)
II
the n × n identity matrix

An eigenvector keeps its direction when multiplied by A; the eigenvalue λ is the factor it is scaled by. Rewriting as (A−λI)v→=0→(A - \lambda I)\vec{v} = \vec{0} shows that λ must make A−λIA - \lambda I singular.

Characteristic equation

det(A−λI)=0\det(A - \lambda I) = 0

Plain-text formula: det(A − λI) = 0

Expanding the determinant gives a polynomial of degree n in λ, the characteristic polynomial. Its roots, counted with multiplicity, are the n eigenvalues. The calculator writes it as det(λI−A)\det(\lambda I - A), which has the same roots and always starts with λn\lambda^n.

2 × 2 characteristic polynomial

λ2−(tr⁡A)λ+det⁡A=0,λ=tr⁡A±(tr⁡A)2−4det⁡A2\lambda^2 - (\operatorname{tr} A)\lambda + \det A = 0, \qquad \lambda = \frac{\operatorname{tr} A \pm \sqrt{(\operatorname{tr} A)^2 - 4\det A}}{2}

Plain-text formula: λ^2 − (tr A)λ + det A = 0, λ = (tr A ± √((tr A)^2 − 4 det A))/2

For A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} the polynomial needs only the trace a+da + d and the determinant ad−bcad - bc. A negative value under the square root means the two eigenvalues are complex conjugates.

3 × 3 characteristic polynomial

det(λI−A)=λ3−(tr⁡A)λ2+(M11+M22+M33)λ−det⁡A\det(\lambda I - A) = \lambda^3 - (\operatorname{tr} A)\lambda^2 + (M_{11} + M_{22} + M_{33})\lambda - \det A

Plain-text formula: det(λI − A) = λ^3 − (tr A)λ^2 + (M_11 + M_22 + M_33)λ − det A

The middle coefficient is the sum of the three principal 2 × 2 minors: delete row i and column i and take the determinant of what is left. This avoids expanding det(A−λI)\det(A - \lambda I) symbol by symbol.

Trace and determinant checks

λ1+⋯+λn=tr⁡A,λ1λ2⋯λn=det⁡A\lambda_1 + \cdots + \lambda_n = \operatorname{tr} A, \qquad \lambda_1 \lambda_2 \cdots \lambda_n = \det A

Plain-text formula: λ_1 + ⋯ + λ_n = tr A, λ_1λ_2⋯λ_n = det A

These identities hold for every square matrix, counting repeated eigenvalues with multiplicity, and are a quick way to check eigenvalues found by hand.

Reading the result

An eigenvalue tells you how A acts along one special direction: λ = 2 doubles vectors in that direction, λ = −1 flips them, and λ = 0 squashes them to zero (so A is singular). Complex eigenvalues come in conjugate pairs for real matrices and signal rotation.

The algebraic multiplicity is how many times λ repeats as a root of the characteristic polynomial. The geometric multiplicity is the number of independent eigenvectors for λ, the dimension of its eigenspace. It is always at least 1 and at most the algebraic multiplicity.

A is diagonalizable when the geometric multiplicities add up to n, so there is a full set of independent eigenvectors. Matrices with n distinct eigenvalues are always diagonalizable; symmetric matrices are too, with real eigenvalues and perpendicular eigenvectors.

How to find eigenvalues and eigenvectors

1. Subtract λ from the diagonal. Write A−λIA - \lambda I: the same matrix with λ subtracted from every diagonal entry.

2. Find the characteristic polynomial. Take det(A−λI)\det(A - \lambda I). For a 2 × 2 matrix this is λ2−(tr⁡A)λ+det⁡A\lambda^2 - (\operatorname{tr} A)\lambda + \det A; for a 3 × 3 use the trace, the principal minors and the determinant, as in the formulas above.

3. Solve for the eigenvalues. Set the polynomial to 0 and solve. Use the quadratic formula for degree 2. For degree 3 or 4, test the divisors of the constant term (the rational root theorem), divide out each root you find, and solve what is left.

4. Find the eigenvectors. For each eigenvalue, row reduce A−λIA - \lambda I and solve (A−λI)v→=0→(A - \lambda I)\vec{v} = \vec{0}. Every free variable gives one independent eigenvector. If you get only the zero vector, the eigenvalue is wrong.

5. Check. Confirm Av→=λv→A\vec{v} = \lambda\vec{v} for one eigenvector, and that the eigenvalues add up to the trace and multiply to the determinant.

The determinant calculator shows step 2 for a numeric matrix, and the RREF calculator shows the row reduction in step 4.

Characteristic polynomial and eigenvalues of a 3 × 3 matrix

Take A=[211121112]A = \begin{bmatrix} 2 & 1 & 1 \\ 1 & 2 & 1 \\ 1 & 1 & 2 \end{bmatrix}. Its trace is 6, each principal 2 × 2 minor is 2⋅2−1⋅1=32 \cdot 2 - 1 \cdot 1 = 3 (so they add to 9), and det⁡A=4\det A = 4. The characteristic polynomial is therefore λ3−6λ2+9λ−4\lambda^3 - 6\lambda^2 + 9\lambda - 4.

The divisors of 4 are the candidates for rational roots. λ = 1 gives 1−6+9−4=01 - 6 + 9 - 4 = 0, so (λ−1)(\lambda - 1) is a factor. Dividing leaves λ2−5λ+4=(λ−1)(λ−4)\lambda^2 - 5\lambda + 4 = (\lambda - 1)(\lambda - 4), so the polynomial is (λ−1)2(λ−4)(\lambda - 1)^2(\lambda - 4): λ = 4 once and λ = 1 twice.

For λ = 4, A−4I=[−2111−2111−2]A - 4I = \begin{bmatrix} -2 & 1 & 1 \\ 1 & -2 & 1 \\ 1 & 1 & -2 \end{bmatrix} row reduces to x=zx = z, y=zy = z, giving the eigenvector (1, 1, 1). For λ = 1, every row of A−IA - I is (1, 1, 1), so the only condition is x+y+z=0x + y + z = 0. That leaves two free variables and two eigenvectors, (−1, 1, 0) and (−1, 0, 1).

λ = 1 has algebraic and geometric multiplicity 2, so A has three independent eigenvectors and is diagonalizable. Check: 4 + 1 + 1 = 6 = tr A and 4 · 1 · 1 = 4 = det A. Load the “3 × 3, repeated eigenvalue” example above to see the same result.

Eigenvalue shortcuts by matrix type

Some matrices give their eigenvalues away before you expand anything. Use these patterns to check an answer or to skip the algebra.

Eigenvalue patterns for common kinds of matrix
Matrix typeExampleEigenvaluesWhat to expect
Diagonal or triangular[[2, 0, 0], [1, 3, 0], [4, 5, 1]]2, 3, 1 (the diagonal entries)Read straight off the diagonal
Symmetric (A = Aᵀ)[[5, 2], [2, 2]]6 and 1Always real, with perpendicular eigenvectors; always diagonalizable
Rotation by 90°[[0, −1], [1, 0]]i and −iComplex, because no real direction stays fixed
Singular (det A = 0)[[1, 2], [2, 4]]0 and 5At least one eigenvalue is 0
Jordan block[[3, 1], [0, 3]]3, twiceOnly one eigenvector, so not diagonalizable
Projection (A² = A)[[1, 0], [0, 0]]1 and 0Only 0 and 1 are possible

Diagonalization: A = PDP⁻¹

When A has n independent eigenvectors, put them in the columns of a matrix P and the matching eigenvalues on the diagonal of D. Then A=PDP−1A = PDP^{-1}, and powers become easy: Ak=PDkP−1A^k = PD^kP^{-1}, where DkD^k just raises each diagonal entry to the power k.

For A=[5222]A = \begin{bmatrix} 5 & 2 \\ 2 & 2 \end{bmatrix}, P=[2−112]P = \begin{bmatrix} 2 & -1 \\ 1 & 2 \end{bmatrix} and D=[6001]D = \begin{bmatrix} 6 & 0 \\ 0 & 1 \end{bmatrix}. The calculator’s “Diagonalizable?” line tells you whether such a P exists. To build P−1P^{-1}, use the inverse matrix calculator; to multiply the three matrices back together, use the matrix calculator.

Exact versus numerical eigenvalues

The characteristic polynomial is computed with exact fractions. Rational roots are found with the rational root theorem, and quadratic factors are solved with the quadratic formula, so eigenvalues such as 5+332\frac{5 + \sqrt{33}}{2} or 2+i2 + i are exact. Eigenvectors for rational eigenvalues come from exact row reduction of A−λIA - \lambda I.

A cubic or quartic factor with no rational roots is solved numerically by Aberth–Ehrlich iteration, accurate to about 15 significant digits, and its eigenvectors are computed in floating point. To study such a polynomial on its own, use the polynomial root finder.

Matrices larger than 4 × 4 are outside this calculator. In practice they are not solved through the characteristic polynomial at all, but with numerical methods such as the QR algorithm, as in NumPy’s numpy.linalg.eig or MATLAB’s eig.

Common mistakes

Subtracting λ from every entry. λ comes off the diagonal only: A−λIA - \lambda I, not A−λA - \lambda.

Dropping a repeated root. (λ−1)2(λ−4)(\lambda - 1)^2(\lambda - 4) has three eigenvalues counted with multiplicity, and the trace and determinant checks only work when λ = 1 is counted twice.

Expecting one eigenvector per repeated eigenvalue. A repeated eigenvalue can have one eigenvector or several. Count the free variables after row reducing A−λIA - \lambda I.

Reporting the zero vector. v→=0→\vec{v} = \vec{0} always solves (A−λI)v→=0→(A - \lambda I)\vec{v} = \vec{0}, but it is never an eigenvector. If row reduction leaves no free variable, recheck the eigenvalue.

Ignoring complex roots. A negative discriminant does not mean “no eigenvalues”. It means a conjugate pair such as 2 ± i.

Worked example

Eigenvalues and eigenvectors of a symmetric 2 × 2 matrix

Find the eigenvalues and eigenvectors of A = [[5, 2], [2, 2]].

  1. Trace: 5 + 2 = 7. Determinant: 5 · 2 − 2 · 2 = 6.
  2. Characteristic polynomial: λ2−7λ+6=(λ−6)(λ−1)\lambda^2 - 7\lambda + 6 = (\lambda - 6)(\lambda - 1), so λ = 6 and λ = 1.
  3. For λ = 6: A−6I=[−122−4]A - 6I = \begin{bmatrix} -1 & 2 \\ 2 & -4 \end{bmatrix}, whose first row says −v1+2v2=0-v_1 + 2v_2 = 0, so v = (2, 1).
  4. For λ = 1: A−I=[4221]A - I = \begin{bmatrix} 4 & 2 \\ 2 & 1 \end{bmatrix}, whose rows say 2v1+v2=02v_1 + v_2 = 0, so v = (−1, 2).
  5. Check: 6 + 1 = 7 = tr A and 6 · 1 = 6 = det A. The eigenvectors are perpendicular: (2)(−1) + (1)(2) = 0, as expected for a symmetric matrix.

Answer: λ₁ = 6 with eigenvector (2, 1) and λ₂ = 1 with eigenvector (−1, 2). A is diagonalizable.

Frequently asked questions

How do you find the eigenvalues of a matrix?

Subtract λ from each diagonal entry, take the determinant of A − λI, and set it to 0. The roots of that characteristic polynomial are the eigenvalues. For a 2 × 2 matrix the equation is λ² − (tr A)λ + det A = 0, so [[5, 2], [2, 2]] gives λ² − 7λ + 6 = 0 and λ = 6 or 1.

How do you find eigenvectors once you have the eigenvalues?

For each eigenvalue λ, solve (A − λI)v = 0 by row reduction. Each free variable gives one independent eigenvector. For [[5, 2], [2, 2]] and λ = 6, A − 6I has the row (−1, 2), so −v₁ + 2v₂ = 0 and v = (2, 1).

How do I check whether a number is an eigenvalue?

λ is an eigenvalue exactly when det(A − λI) = 0. For A = [[3, 2], [3, 8]] and λ = 2, A − 2I = [[1, 2], [3, 6]] has determinant 6 − 6 = 0, so 2 is an eigenvalue, with eigenvector (−2, 1). The other eigenvalue is 9, since they must add to the trace 11.

What is an eigenvalue in simple terms?

It is a stretch factor. Most vectors change direction when a matrix multiplies them, but an eigenvector only gets longer, shorter or flipped. The eigenvalue says by how much: 3 triples it, 0.5 halves it, and −1 reverses it.

Can a matrix have complex eigenvalues?

Yes. A real matrix can have complex eigenvalues, which then come in conjugate pairs. For example, [[1, −2], [1, 3]] has characteristic polynomial λ² − 4λ + 5 and eigenvalues 2 + i and 2 − i.

Why is my eigenvector different from the textbook’s?

Eigenvectors are only determined up to a nonzero multiple. (2, 1), (4, 2) and (−2, −1) are all eigenvectors for the same eigenvalue. The calculator scales exact eigenvectors to the smallest whole numbers; a normalized (unit) eigenvector is that vector divided by its length, such as (2, 1)/√5.

What does a zero eigenvalue mean?

λ = 0 means some nonzero vector is sent to zero, so A is singular and det A = 0. The eigenvectors for λ = 0 span the null space of A.

What is a defective matrix?

A matrix with an eigenvalue whose geometric multiplicity is smaller than its algebraic multiplicity, such as [[3, 1], [0, 3]]: λ = 3 is a double root but has only one independent eigenvector, (1, 0). Defective matrices cannot be diagonalized.

What are the eigenvalues of a triangular matrix?

Its diagonal entries. Subtracting λ from the diagonal leaves a triangular matrix whose determinant is the product of the (aᵢᵢ − λ) terms, so [[2, 0, 0], [1, 3, 0], [4, 5, 1]] has eigenvalues 2, 3 and 1.

Can I find eigenvalues on a Casio or TI calculator?

The TI-84 Plus and Casio fx-991EX have no eigenvalue key, but they can give the trace and determinant, and for a 2 × 2 matrix you can then solve λ² − (tr A)λ + det A = 0 with the equation solver. CAS calculators such as the TI-Nspire CAS have built-in eigVl and eigVc functions. None of them show the working; this calculator does.

Why is the limit 4 × 4?

Up to degree 4, the factoring and exact formulas stay fast and readable. Larger matrices are normally handled with numerical methods such as the QR algorithm rather than the characteristic polynomial.

Determinant Calculator

Exact determinants of 2x2 to 6x6 matrices by row reduction or cofactor expansion, with every step.

Linear Algebra

Matrix Calculator

Multiply, add and subtract matrices up to 6 × 6, plus determinant, inverse, transpose and powers, exactly.

Linear Algebra

RREF Calculator

Reduced row echelon form or REF with each row operation, rank, nullity and linear system solutions.

Linear Algebra

Inverse Matrix Calculator

Exact inverses of 2x2 to 6x6 matrices by Gauss–Jordan elimination, with every row operation and a check.

Linear Algebra

Vector Calculator

Dot product, angle between vectors, magnitude, unit vector and projections of 2D to 6D vectors.

Linear Algebra

Polynomial Root Finder

All real and complex roots of a polynomial up to degree 10, with multiplicities, exact forms and steps.

Algebra & Equations

Sources and further reading

  1. Introduction to Linear Algebra, 6th edition, Chapter 6: Eigenvalues and Eigenvectors, Wellesley-Cambridge Press (Gilbert Strang, 2023)
  2. 18.06 Linear Algebra, Lectures 21 and 22: Eigenvalues and Eigenvectors, Diagonalization and Powers of A (opens in a new tab), MIT OpenCourseWare
  3. Linear Algebra, Chapter 5: Eigenvalues and Eigenvectors (opens in a new tab), Interactive Linear Algebra (Margalit and Rabinoff), Georgia Institute of Technology

Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?