CipherMatrix

Eigenvalue and Eigenvector Calculator

Enter a 2×2 or 3×3 matrix to get its characteristic polynomial, eigenvalues, eigenvectors and multiplicities, with the full working shown and checked.

What are eigenvalues and eigenvectors?

For a square matrix A, an eigenvector is a nonzero vector v that A only stretches or flips, never turns: Av = λv. The number λ is the matching eigenvalue. If λ = 2 the vector doubles in length, if λ = −1 it reverses direction, and if λ = 0 it is squashed onto the origin.

These numbers describe how a linear map behaves along its natural axes. They decide whether a system of differential equations is stable, how a Markov chain settles down, which directions carry the most variance in principal component analysis, and how a bridge or a guitar string vibrates.

How to find eigenvalues and eigenvectors by hand

The method is always the same, and the calculator shows each stage:

  • Subtract λ from each diagonal entry to form A − λI.
  • Set det(A − λI) = 0. This gives the characteristic polynomial, of degree 2 or 3 here.
  • Solve the polynomial. Its roots are the eigenvalues, and the number of times a root repeats is its algebraic multiplicity.
  • For each eigenvalue λ, row-reduce A − λI and solve (A − λI)v = 0. The solutions are the eigenvectors.
  • Check: the eigenvalues must add up to the trace and multiply to the determinant, and Av must equal λv.

Algebraic versus geometric multiplicity

A repeated eigenvalue can have fewer independent eigenvectors than its multiplicity suggests. The shear matrix with rows (1, 1) and (0, 1) has λ = 1 twice but only one eigenvector direction. Such a matrix is called defective and cannot be diagonalized.

A matrix is diagonalizable when, for every eigenvalue, the geometric multiplicity (dimension of the eigenspace) equals the algebraic multiplicity. Symmetric real matrices always satisfy this.

Exact answers, approximate answers, and complex eigenvalues

This calculator works with exact fractions. Rational eigenvalues come out as exact fractions, and quadratic cases come out as exact radicals such as 2 + √2 or complex numbers such as i.

Only when a 3×3 characteristic polynomial has no rational root does the tool fall back on numerical root finding. Those values are clearly marked approximate. A real matrix can have complex eigenvalues, always in conjugate pairs, for example a rotation of the plane.

Common mistakes

Subtracting λ from every entry instead of only the diagonal, treating the zero vector as an eigenvector, and expecting your eigenvector to match the textbook exactly. Any nonzero multiple of an eigenvector is also an eigenvector, so (1, 2) and (−3, −6) describe the same direction.

Worked examples

These examples are computed by the same engine as the calculator above, so you can compare each step with your own working.

2×2, distinct eigenvalues

  • Matrix A: [[4, 1], [2, 3]]
Characteristic polynomial
p(λ) = λ² − 7λ + 10
Eigenvalue λ₁
5
algebraic multiplicity 1, geometric multiplicity 1
Eigenvalue λ₂
2
algebraic multiplicity 1, geometric multiplicity 1
Eigenvector for λ₁
(1, 1)
Eigenvector for λ₂
(1, −2)
Diagonalizable?
Yes

Step-by-step solution

Formula used
A v = λ v
det(A − λI) = 0 (characteristic equation)
trace(A) = λ₁ + λ₂ (+ λ₃) det(A) = λ₁λ₂ (λ₃)
  1. NoteSet up the characteristic equation
    det(A − λI) = 0
    λ is an eigenvalue of A exactly when (A − λI)v = 0 has a nonzero solution v, i.e. when A − λI is singular, i.e. when its determinant is 0.
    Subtract λ from every diagonal entry of A (and only the diagonal):
    A − λI =4 − λ123 − λ
  2. CalculateExpand the determinant
    p(λ) = λ² − tr·λ + det
    trace(A) = a₁₁ + a₂₂ = 4 + 3 = 7
    det(A) = a₁₁a₂₂ − a₁₂a₂₁ = 4·3 − 1·2 = 10
    For a 2×2 matrix, det(A − λI) = λ² − trace(A)·λ + det(A).
    Characteristic polynomial: p(λ) = λ² − 7λ + 10
  3. CalculateSolve p(λ) = 0 for the eigenvalues
    p(λ) = 0
    Quadratic λ² + bλ + c with b = −tr, c = det: Δ = b² − 4c = (−7)² − 4·10 = 9
    Δ > 0 and a perfect square: two distinct rational roots.
    λ = (tr ± √Δ) / 2
    λ₁ = 5 algebraic multiplicity 1
    λ₂ = 2 algebraic multiplicity 1
  4. CalculateEigenvectors for λ₁ = 5
    (A − λI)v = 0
    Solve (A − λI)v = 0 with λ = 5. Subtracting 5 from the diagonal gives:
    Row operations:
    pivot = a₁₁ = -1 Scan column 1 from row 1 downward: the first nonzero entry is a₁₁ = -1 (row 1). It already sits in the pivot position (1, 1).
    R₁ ← (-1)·R₁ new R₁ = [-1, 1] · (-1) = [1, -1]
    R₂ ← R₂ - 2·R₁ new R₂ = [2, -2] - (2)·[1, -1] = [0, 0]
    rank(A − λI) = 1, so the null space has dimension n − rank = 2 − 1 = 1.
    x₁ = x₂
    Free variable: x₂. Each choice of 1 for one free variable (0 for the others) gives a basis vector, scaled here to whole numbers:
    v₁ = (1, 1)ᵀ
    A − λI =−112−2RREF(A − λI) =1−100
  5. CalculateEigenvectors for λ₂ = 2
    (A − λI)v = 0
    Solve (A − λI)v = 0 with λ = 2. Subtracting 2 from the diagonal gives:
    Row operations:
    pivot = a₁₁ = 2 Scan column 1 from row 1 downward: the first nonzero entry is a₁₁ = 2 (row 1). It already sits in the pivot position (1, 1).
    R₁ ← (1/2)·R₁ new R₁ = [2, 1] · (1/2) = [1, 1/2]
    R₂ ← R₂ - 2·R₁ new R₂ = [2, 1] - (2)·[1, 1/2] = [0, 0]
    rank(A − λI) = 1, so the null space has dimension n − rank = 2 − 1 = 1.
    x₁ = −(1/2)x₂
    Free variable: x₂. Each choice of 1 for one free variable (0 for the others) gives a basis vector, scaled here to whole numbers:
    v₂ = (1, −2)ᵀ
    A − λI =2121RREF(A − λI) =11200
  6. NoteAlgebraic and geometric multiplicity
    geometric ≤ algebraic
    Algebraic multiplicity = how many times λ is a root of p(λ). Geometric multiplicity = dimension of the eigenspace = number of independent eigenvectors.
    EigenvalueAlgebraicGeometric
    λ₁ = 511
    λ₂ = 211
  7. CheckVerify the answer
    Sum of eigenvalues (with multiplicity) = 7 and trace(A) = 7 ✓
    Product of eigenvalues = 10 and det(A) = 10 ✓
    A·(1, 1) = (5, 5) and λ₁·v = (5, 5) ✓
    A·(1, −2) = (2, −4) and λ₂·v = (2, −4) ✓
    Every eigenvalue has geometric = algebraic multiplicity, so A is diagonalizable (over the complex numbers if complex eigenvalues occur): A = P D P⁻¹, D = diag(eigenvalues), P = eigenvectors as columns.

2×2 rotation (complex)

  • Matrix A: [[0, -1], [1, 0]]
Characteristic polynomial
p(λ) = λ² + 1
Eigenvalue λ₁
i
algebraic multiplicity 1, geometric multiplicity 1 · ≈ i
Eigenvalue λ₂
−i
algebraic multiplicity 1, geometric multiplicity 1 · ≈ −i
Eigenvector for λ₁
(1, −i)
≈ (1, −i)
Eigenvector for λ₂
(1, i)
≈ (1, i)
Diagonalizable?
Yes

Step-by-step solution

Formula used
A v = λ v
det(A − λI) = 0 (characteristic equation)
trace(A) = λ₁ + λ₂ (+ λ₃) det(A) = λ₁λ₂ (λ₃)
  1. NoteSet up the characteristic equation
    det(A − λI) = 0
    λ is an eigenvalue of A exactly when (A − λI)v = 0 has a nonzero solution v, i.e. when A − λI is singular, i.e. when its determinant is 0.
    Subtract λ from every diagonal entry of A (and only the diagonal):
    A − λI =−λ−11−λ
  2. CalculateExpand the determinant
    p(λ) = λ² − tr·λ + det
    trace(A) = a₁₁ + a₂₂ = 0 + 0 = 0
    det(A) = a₁₁a₂₂ − a₁₂a₂₁ = 0·0 − (−1)·1 = 1
    For a 2×2 matrix, det(A − λI) = λ² − trace(A)·λ + det(A).
    Characteristic polynomial: p(λ) = λ² + 1
  3. CalculateSolve p(λ) = 0 for the eigenvalues
    p(λ) = 0
    Quadratic λ² + bλ + c with b = −tr, c = det: Δ = b² − 4c = 0² − 4·1 = −4
    Δ < 0: the two roots are complex conjugates (a real matrix can have complex eigenvalues).
    λ = (tr ± √Δ) / 2
    λ₁ = i ≈ i algebraic multiplicity 1
    λ₂ = −i ≈ −i algebraic multiplicity 1
  4. CalculateEigenvectors for λ₁ = i
    (A − λI)v = 0
    This eigenvalue is complex, so the entries of A − λI are not rational. They are computed exactly in the field Q(√r) (numbers p + q√r with rational p, q).
    A − λI is singular, so its two rows are proportional: a nonzero vector orthogonal to a nonzero row, (−b, a − λ)-style, solves (A − λI)v = 0.
    v₁ = (1, −i)ᵀ ≈ (1, −i)ᵀ
    Check ‖A v − λ v‖ ≈ 0 (floating point; ~1e-15 means it works)
  5. CalculateEigenvectors for λ₂ = −i
    (A − λI)v = 0
    This eigenvalue is complex, so the entries of A − λI are not rational. They are computed exactly in the field Q(√r) (numbers p + q√r with rational p, q).
    A − λI is singular, so its two rows are proportional: a nonzero vector orthogonal to a nonzero row, (−b, a − λ)-style, solves (A − λI)v = 0.
    v₂ = (1, i)ᵀ ≈ (1, i)ᵀ
    Check ‖A v − λ v‖ ≈ 0 (floating point; ~1e-15 means it works)
  6. NoteAlgebraic and geometric multiplicity
    geometric ≤ algebraic
    Algebraic multiplicity = how many times λ is a root of p(λ). Geometric multiplicity = dimension of the eigenspace = number of independent eigenvectors.
    EigenvalueAlgebraicGeometric
    λ₁ = i11
    λ₂ = −i11
  7. CheckVerify the answer
    Sum of eigenvalues ≈ 0 and trace(A) = 0 ✓ (numeric)
    Product of eigenvalues ≈ 1 and det(A) = 1 ✓ (numeric)
    A v − λ v for λ₁: largest error ≈ 0 ✓
    A v − λ v for λ₂: largest error ≈ 0 ✓
    Every eigenvalue has geometric = algebraic multiplicity, so A is diagonalizable (over the complex numbers if complex eigenvalues occur): A = P D P⁻¹, D = diag(eigenvalues), P = eigenvectors as columns.

3×3 symmetric (2 ± √2)

  • Matrix A: [[2, -1, 0], [-1, 2, -1], [0, -1, 2]]
Characteristic polynomial
p(λ) = λ³ − 6λ² + 10λ − 4
Eigenvalue λ₁
2
algebraic multiplicity 1, geometric multiplicity 1
Eigenvalue λ₂
2 + √2
algebraic multiplicity 1, geometric multiplicity 1 · ≈ 3.414214
Eigenvalue λ₃
2 − √2
algebraic multiplicity 1, geometric multiplicity 1 · ≈ 0.5857864
Eigenvector for λ₁
(1, 0, −1)
Eigenvector for λ₂
(√2, −2, √2)
≈ (1.414214, −2, 1.414214)
Eigenvector for λ₃
(−√2, −2, −√2)
≈ (−1.414214, −2, −1.414214)
Diagonalizable?
Yes

Step-by-step solution

Formula used
A v = λ v
det(A − λI) = 0 (characteristic equation)
trace(A) = λ₁ + λ₂ (+ λ₃) det(A) = λ₁λ₂ (λ₃)
  1. NoteSet up the characteristic equation
    det(A − λI) = 0
    λ is an eigenvalue of A exactly when (A − λI)v = 0 has a nonzero solution v, i.e. when A − λI is singular, i.e. when its determinant is 0.
    Subtract λ from every diagonal entry of A (and only the diagonal):
    A − λI =2 − λ−10−12 − λ−10−12 − λ
  2. CalculateExpand the determinant
    p(λ) = λ³ − tr·λ² + c·λ − det
    trace(A) = 6 det(A) = 4
    Sum of the principal 2×2 minors: c = M₁₂ + M₁₃ + M₂₃ = 3 + 4 + 3 = 10
    For a 3×3 matrix, det(λI − A) = λ³ − trace(A)·λ² + c·λ − det(A). (It equals −det(A − λI), so the roots are the same.)
    Characteristic polynomial: p(λ) = λ³ − 6λ² + 10λ − 4
  3. CalculateSolve p(λ) = 0 for the eigenvalues
    p(λ) = 0
    Rational root theorem: any rational root of p is an integer-ratio of divisors of its constant term. Testing candidates finds p(2) = 0.
    Divide out (λ − 2): p(λ) = (λ − 2)(λ² − 4λ + 2)
    Remaining quadratic λ² + (−4)λ + 2: Δ = b² − 4c = (−4)² − 4·2 = 8
    Δ > 0 but not a perfect square: two real irrational roots, conjugate radicals.
    λ₁ = 2 algebraic multiplicity 1
    λ₂ = 2 + √2 ≈ 3.414214 algebraic multiplicity 1
    λ₃ = 2 − √2 ≈ 0.5857864 algebraic multiplicity 1
  4. CalculateEigenvectors for λ₁ = 2
    (A − λI)v = 0
    Solve (A − λI)v = 0 with λ = 2. Subtracting 2 from the diagonal gives:
    Row operations:
    pivot = a₂₁ = -1 Scan column 1 from row 1 downward: the first nonzero entry is a₂₁ = -1 (row 2). It must be moved up to the pivot position (1, 1).
    R₁ ↔ R₂ Exchange row 1 and row 2 so the nonzero pivot lands at (1, 1). Swapping rows does not change the rank.
    R₁ ← (-1)·R₁ new R₁ = [-1, 0, -1] · (-1) = [1, 0, 1]
    pivot = a₂₂ = -1 Scan column 2 from row 2 downward: the first nonzero entry is a₂₂ = -1 (row 2). It already sits in the pivot position (2, 2).
    R₂ ← (-1)·R₂ new R₂ = [0, -1, 0] · (-1) = [0, 1, 0]
    R₃ ← R₃ + R₂ new R₃ = [0, -1, 0] - (-1)·[0, 1, 0] = [0, 0, 0]
    rank(A − λI) = 2, so the null space has dimension n − rank = 3 − 2 = 1.
    x₁ = −x₃
    x₂ = 0
    Free variable: x₃. Each choice of 1 for one free variable (0 for the others) gives a basis vector, scaled here to whole numbers:
    v₁ = (1, 0, −1)ᵀ
    A − λI =0−10−10−10−10RREF(A − λI) =101010000
  5. CalculateEigenvectors for λ₂ = 2 + √2
    (A − λI)v = 0
    This eigenvalue is an irrational real number, so the entries of A − λI are not rational. They are computed exactly in the field Q(√r) (numbers p + q√r with rational p, q).
    A − λI is singular with rank 2, so a null vector is the cross product of two independent rows.
    v₂ = (√2, −2, √2)ᵀ ≈ (1.414214, −2, 1.414214)ᵀ
    Check ‖A v − λ v‖ ≈ 0 (floating point; ~1e-15 means it works)
  6. CalculateEigenvectors for λ₃ = 2 − √2
    (A − λI)v = 0
    This eigenvalue is an irrational real number, so the entries of A − λI are not rational. They are computed exactly in the field Q(√r) (numbers p + q√r with rational p, q).
    A − λI is singular with rank 2, so a null vector is the cross product of two independent rows.
    v₃ = (−√2, −2, −√2)ᵀ ≈ (−1.414214, −2, −1.414214)ᵀ
    Check ‖A v − λ v‖ ≈ 1.1e-16 (floating point; ~1e-15 means it works)
  7. NoteAlgebraic and geometric multiplicity
    geometric ≤ algebraic
    Algebraic multiplicity = how many times λ is a root of p(λ). Geometric multiplicity = dimension of the eigenspace = number of independent eigenvectors.
    EigenvalueAlgebraicGeometric
    λ₁ = 211
    λ₂ = 2 + √211
    λ₃ = 2 − √211
  8. CheckVerify the answer
    Sum of eigenvalues ≈ 6 and trace(A) = 6 ✓ (numeric)
    Product of eigenvalues ≈ 4 and det(A) = 4 ✓ (numeric)
    A v − λ v for λ₁: largest error ≈ 0 ✓
    A v − λ v for λ₂: largest error ≈ 0 ✓
    A v − λ v for λ₃: largest error ≈ 1.1e-16 ✓
    Every eigenvalue has geometric = algebraic multiplicity, so A is diagonalizable (over the complex numbers if complex eigenvalues occur): A = P D P⁻¹, D = diag(eigenvalues), P = eigenvectors as columns.

3×3 defective

  • Matrix A: [[2, 1, 0], [0, 2, 0], [0, 0, 3]]
Characteristic polynomial
p(λ) = λ³ − 7λ² + 16λ − 12
Eigenvalue λ₁
2
algebraic multiplicity 2, geometric multiplicity 1
Eigenvalue λ₂
3
algebraic multiplicity 1, geometric multiplicity 1
Eigenvector for λ₁
(1, 0, 0)
Eigenvector for λ₂
(0, 0, 1)
Diagonalizable?
No (defective)
This matrix is defective: it has fewer independent eigenvectors than its size. Generalized eigenvectors (Jordan form) would be needed to complete a basis.

Step-by-step solution

Formula used
A v = λ v
det(A − λI) = 0 (characteristic equation)
trace(A) = λ₁ + λ₂ (+ λ₃) det(A) = λ₁λ₂ (λ₃)
  1. NoteSet up the characteristic equation
    det(A − λI) = 0
    λ is an eigenvalue of A exactly when (A − λI)v = 0 has a nonzero solution v, i.e. when A − λI is singular, i.e. when its determinant is 0.
    Subtract λ from every diagonal entry of A (and only the diagonal):
    A − λI =2 − λ1002 − λ0003 − λ
  2. CalculateExpand the determinant
    p(λ) = λ³ − tr·λ² + c·λ − det
    trace(A) = 7 det(A) = 12
    Sum of the principal 2×2 minors: c = M₁₂ + M₁₃ + M₂₃ = 4 + 6 + 6 = 16
    For a 3×3 matrix, det(λI − A) = λ³ − trace(A)·λ² + c·λ − det(A). (It equals −det(A − λI), so the roots are the same.)
    Characteristic polynomial: p(λ) = λ³ − 7λ² + 16λ − 12
  3. CalculateSolve p(λ) = 0 for the eigenvalues
    p(λ) = 0
    Rational root theorem: any rational root of p is an integer-ratio of divisors of its constant term. Testing candidates finds p(2) = 0.
    Divide out (λ − 2): p(λ) = (λ − 2)(λ² − 5λ + 6)
    Remaining quadratic λ² + (−5)λ + 6: Δ = b² − 4c = (−5)² − 4·6 = 1
    Δ > 0 and a perfect square: two distinct rational roots.
    λ₁ = 2 algebraic multiplicity 2
    λ₂ = 3 algebraic multiplicity 1
  4. CalculateEigenvectors for λ₁ = 2
    (A − λI)v = 0
    Solve (A − λI)v = 0 with λ = 2. Subtracting 2 from the diagonal gives:
    Row operations:
    pivot = a₁₂ = 1 Scan column 2 from row 1 downward: the first nonzero entry is a₁₂ = 1 (row 1). It already sits in the pivot position (1, 2).
    pivot = a₃₃ = 1 Scan column 3 from row 2 downward: the first nonzero entry is a₃₃ = 1 (row 3). It must be moved up to the pivot position (2, 3).
    R₂ ↔ R₃ Exchange row 2 and row 3 so the nonzero pivot lands at (2, 3). Swapping rows does not change the rank.
    rank(A − λI) = 2, so the null space has dimension n − rank = 3 − 2 = 1.
    x₂ = 0
    x₃ = 0
    Free variable: x₁. Each choice of 1 for one free variable (0 for the others) gives a basis vector, scaled here to whole numbers:
    v₁ = (1, 0, 0)ᵀ
    A − λI =010000001RREF(A − λI) =010001000
  5. CalculateEigenvectors for λ₂ = 3
    (A − λI)v = 0
    Solve (A − λI)v = 0 with λ = 3. Subtracting 3 from the diagonal gives:
    Row operations:
    pivot = a₁₁ = -1 Scan column 1 from row 1 downward: the first nonzero entry is a₁₁ = -1 (row 1). It already sits in the pivot position (1, 1).
    R₁ ← (-1)·R₁ new R₁ = [-1, 1, 0] · (-1) = [1, -1, 0]
    pivot = a₂₂ = -1 Scan column 2 from row 2 downward: the first nonzero entry is a₂₂ = -1 (row 2). It already sits in the pivot position (2, 2).
    R₂ ← (-1)·R₂ new R₂ = [0, -1, 0] · (-1) = [0, 1, 0]
    R₁ ← R₁ + R₂ new R₁ = [1, -1, 0] - (-1)·[0, 1, 0] = [1, 0, 0]
    rank(A − λI) = 2, so the null space has dimension n − rank = 3 − 2 = 1.
    x₁ = 0
    x₂ = 0
    Free variable: x₃. Each choice of 1 for one free variable (0 for the others) gives a basis vector, scaled here to whole numbers:
    v₂ = (0, 0, 1)ᵀ
    A − λI =−1100−10000RREF(A − λI) =100010000
  6. NoteAlgebraic and geometric multiplicity
    geometric ≤ algebraic
    Algebraic multiplicity = how many times λ is a root of p(λ). Geometric multiplicity = dimension of the eigenspace = number of independent eigenvectors.
    EigenvalueAlgebraicGeometric
    λ₁ = 221
    λ₂ = 311
  7. CheckVerify the answer
    Sum of eigenvalues (with multiplicity) = 7 and trace(A) = 7 ✓
    Product of eigenvalues = 12 and det(A) = 12 ✓
    A·(1, 0, 0) = (2, 0, 0) and λ₁·v = (2, 0, 0) ✓
    A·(0, 0, 1) = (0, 0, 3) and λ₂·v = (0, 0, 3) ✓
    Some eigenvalue has geometric multiplicity smaller than its algebraic multiplicity: A is defective and NOT diagonalizable (it lacks a full set of eigenvectors).

Frequently asked questions

Can an eigenvalue be zero?

Yes. Zero is an eigenvalue exactly when the determinant is 0, which means the matrix is singular and not invertible.

Why are my eigenvectors different from the answer in my textbook?

An eigenvector is only defined up to a nonzero scalar multiple. This tool scales rational eigenvectors to the smallest whole-number vector with a positive first entry. Yours is correct if it is a multiple of it.

What does a complex eigenvalue mean?

The matrix rotates (and possibly scales) vectors in some plane, so no real direction stays fixed. For a real matrix the complex eigenvalues come in conjugate pairs a + bi and a − bi.

What is a defective matrix?

A matrix with an eigenvalue whose geometric multiplicity is smaller than its algebraic multiplicity. It does not have enough independent eigenvectors to be diagonalized.

Does it support 4×4 matrices?

No. The tool covers 2×2 and 3×3 matrices, where the characteristic polynomial can be solved exactly or reliably. Degree-4 and higher polynomials have no general formula that is practical here.

Related calculators