MathsLinear Algebra

Eigenvalue & Eigenvector
calculator.

Find the eigenvalues and eigenvectors of a 2 by 2 or 3 by 3 matrix, step by step.

How it's worked out

An eigenvector of a square matrix A is a nonzero vector v that A only stretches, shrinks or flips. The stretch factor λ (lambda) is its eigenvalue.

Av\displaystyle A v=λv\displaystyle {}= \lambda v

Moving λv to the left gives (A − λI)v = 0, where I is the identity. A nonzero v can solve that only when A − λI has no inverse, which is when its determinant is 0. That determinant is the characteristic polynomial, and its roots are the eigenvalues.

p(λ)\displaystyle p(\lambda)=det⁡(A−λI)\displaystyle {}= \det(A - \lambda I)=0\displaystyle {}= 0

For a 2 by 2 matrix the polynomial only needs the trace (the sum of the diagonal) and the determinant, so the quadratic formula finishes the job. For a 3 by 3 matrix it is a cubic: the tool finds one real root, divides it out and solves the quadratic that is left.

p(λ)\displaystyle p(\lambda)=λ2−tr⁡(A)λ+det⁡(A)\displaystyle {}= \lambda^2 - \operatorname{tr}(A)\,\lambda + \det(A)

Each eigenvector then comes from row-reducing A − λI and solving for the free entries. The set of all solutions is the eigenspace for that λ. Two numbers describe each eigenvalue. The algebraic multiplicity counts how often it repeats as a root. The geometric multiplicity is the size of its eigenspace, and it is never more than the algebraic one.

Worked examples

Priya checks a 2 by 2 homework answer

Priya's matrix has trace 7 and determinant 10, so the polynomial is λ² − 7λ + 10.

[4123]\displaystyle \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix}p(λ)\displaystyle p(\lambda)=λ2−7λ+10\displaystyle {}= \lambda^2 - 7\lambda + 10

Its roots are λ = 5 and 2. For λ = 5 the eigenvector is (1, 1), and for λ = 2 it is (−1/2, 1). Her answer key shows (−1, 2) for the second one, which is the same direction doubled.

As a check, the eigenvalues add to 7, the trace, and multiply to 10, the determinant.

Open this example in the tool

Omar models bikes moving between two stations

Each night 80% of the bikes at station 1 stay and 20% move to station 2, while station 2 keeps 70% and sends 30% back. Each column adds to 1, so this is a Markov matrix.

[4531015710]\begin{bmatrix} \frac{4}{5} & \frac{3}{10} \\ \frac{1}{5} & \frac{7}{10} \end{bmatrix}

The eigenvalues are 1 and 1/2. The eigenvector for λ = 1 is (3/2, 1), so in the long run the bikes split 3 to 2 between the stations. The other eigenvalue, 1/2, says any gap from that split halves every night.

Open this example in the tool

Lena gets eigenvalues with a square root

For rows 1, 2 and 3, 4 the polynomial is λ² − 5λ − 2. Its discriminant is not a perfect square, so the exact eigenvalues keep a root.

λ\displaystyle \lambda=5±332\displaystyle {}= \frac{5 \pm \sqrt{33}}{2}

In decimals that is about 5.3723 and −0.3723. One is negative, so along its eigenvector A flips vectors as well as scaling them.

Open this example in the tool

Reading your result

Triangular matrices are quick. The eigenvalues of a triangular matrix are its diagonal entries. For rows 3, 6, −8 and 0, 0, 6 and 0, 0, 2 they are 3, 2, 0.

A zero eigenvalue means no inverse. For rows 1, 2 and 2, 4 the eigenvalues are 5 and 0. The determinant is their product, 0, so the matrix is singular.

Complex pairs mean turning. The 90° rotation leaves no real direction on its own line, and its eigenvalues are i and −i. Complex eigenvalues of a real matrix always come as a conjugate pair.

Repeats need a second look. The shear with rows 2, 1 and 0, 2 has λ = 2 twice but only 1 eigenvector, so it cannot be diagonalized. The 3 by 3 example from Lay has λ = 2 twice with 2 eigenvectors, so it can.

Diagonalizing gives powers. When there are as many independent eigenvectors as rows, A = PDP⁻¹ with the eigenvectors in P and the eigenvalues in D. Then the kth power of A is P times the kth power of D times P⁻¹, and powers of a diagonal matrix just raise each entry.

Common mistakes

  • Subtracting λ from every entry. Only the diagonal changes: A − λI takes λ from each diagonal entry and leaves the rest alone.
  • Expecting one right eigenvector. Any nonzero multiple works, so (1, 1) and (3, 3) are both answers. Check yours by multiplying by A.
  • Calling a repeated eigenvalue defective without checking. The identity matrix repeats λ = 1 and is still diagonal. Count the eigenvectors, not the repeats.
  • Rounding before the eigenvectors. A rounded λ makes A − λI slightly invertible, so the only solution looks like 0. Keep the exact value until the end.
  • Reading eigenvalues off the diagonal of a full matrix. That shortcut only works for triangular matrices.

Questions people ask

It needs as many independent eigenvectors as it has rows. That fails only when an eigenvalue repeats and its eigenspace is smaller than the number of repeats, as with a shear. Distinct eigenvalues always give a diagonalizable matrix.

Sources