Femtobytes
Problem type

Eigenvalues and eigenvectors

What it solves
Find the eigenvalues and eigenvectors of a 2 by 2 or 3 by 3 matrix: build the characteristic polynomial, solve it, find the directions the matrix does not turn, and check every one by multiplying.
Subject
Linear Algebra
Topic
Eigenvalues and eigenvectors
Also called
eigenvalue, eigenvector, characteristic polynomial, diagonalise
Your problem

Find the eigenvalues and eigenvectors of this matrix.

A=[4123]A = \left[ \begin{array}{rr} 4 & 1 \\ 2 & 3 \end{array} \right]
The square matrix
Size2
Whole numbers or fractions for 2 by 2; whole numbers for 3 by 3.
Invent a new one:
The problem

Find the eigenvalues and eigenvectors of this matrix.

A=[4123]A = \left[ \begin{array}{rr} 4 & 1 \\ 2 & 3 \end{array} \right]
The result
λ1=2:  [1−2],λ2=5:  [11]\lambda_{1} = 2: \; \begin{bmatrix} 1 \\ -2 \end{bmatrix}, \qquad \lambda_{2} = 5: \; \begin{bmatrix} 1 \\ 1 \end{bmatrix}

Two different real eigenvalues, each with its own direction.

checked 26 lines of this solution were evaluated with exact arithmetic before it was shown to you. A solution with a false line is never served.
Picture 1 of 9Step 1: Say what we are looking for
The matrix whose own directions we are hunting
44112233
A matrix turns most vectors off their own line. The question this page answers is which lines it does NOT turn: on those, the matrix only stretches or shrinks, and the amount it stretches by is the eigenvalue.
1

Say what we are looking for

Why this step

A matrix moves almost every vector to a new direction. The exceptions are rare and precious: directions the matrix does NOT turn, only stretches. Along such a direction the whole complicated matrix behaves like multiplication by a single number. Find those directions and the matrix stops being a table of numbers and becomes something you can see.

A=[4123],A−λI=[4−λ123−λ]A = \left[ \begin{array}{rr} 4 & 1 \\ 2 & 3 \end{array} \right], \qquad A - \lambda I = \begin{bmatrix} 4 - \lambda & 1 \\ 2 & 3 - \lambda \end{bmatrix}
Subtracting λI\lambda I takes λ\lambda off each diagonal entry and leaves the rest alone.
2

Build the characteristic polynomial

Why this step

We expand det⁡(A−λI)\det\left( A - \lambda I \right) with λ\lambda left as a letter. The result is a polynomial in λ\lambda of degree 22, called the characteristic polynomial, and its roots are the eigenvalues. Two of its coefficients can be predicted before any work: the sum of the diagonal of AA (the trace) and det⁡A\det A. They make a free check on the algebra.

det⁡(A−λI)\displaystyle \det\left( A - \lambda I \right)==(4−λ)(3−λ)−1⋅2\displaystyle \left( 4 - \lambda \right) \left( 3 - \lambda \right) - 1 \cdot 2
The 2×22 \times 2 rule: main diagonal product minus the other diagonal product. checked
==12−4λ−3λ+λ2−2\displaystyle 12 - 4 \lambda - 3 \lambda + \lambda^{2} - 2
Multiply out the two brackets, four products in all, and work out 1⋅21 \cdot 2. checked
==λ2−7λ+10\displaystyle \lambda^{2} - 7 \lambda + 10
Collect the plain numbers and the λ\lambda terms, highest power first. checked
3

Solve the characteristic equation

Why this step

The eigenvalues are the roots of λ2−7λ+10=0\lambda^{2} - 7 \lambda + 10 = 0. It is a quadratic, so the discriminant decides everything in advance: positive means two different real eigenvalues, zero means one repeated eigenvalue, and negative means no real eigenvalue at all, which has a vivid meaning we will come to.

D\displaystyle D==72−4⋅10\displaystyle 7^{2} - 4 \cdot 10
The discriminant of λ2−(trace)λ+det⁡A\lambda^2 - (\text{trace}) \lambda + \det A is (trace)2−4det⁡A(\text{trace})^2 - 4 \det A. checked
==9\displaystyle 9
Work it out. checked

D=9D = 9 is a perfect square, so the quadratic factorises. We need two numbers that add to the trace 77 and multiply to det⁡A=10\det A = 10: they are 55 and 22.

λ2−7λ+10=(λ−5)(λ−2)\lambda^{2} - 7 \lambda + 10 = \left( \lambda - 5 \right) \left( \lambda - 2 \right)
Check by multiplying the brackets back out. checked
4

Eigenvectors for lambda = 2: set up

Why this step

With λ=2\lambda = 2 fixed, the eigenvectors are the non-zero solutions of (A−λI)v=0\left( A - \lambda I \right) v = 0. That is an ordinary system of linear equations, and we solve it the ordinary way, by row reduction. We already know it MUST have a non-zero solution, because this λ\lambda was chosen to make the determinant zero. If row reduction produced a pivot in every column, that would prove we had the wrong eigenvalue.

A−(2)I=[2121]A - \left( 2 \right) I = \left[ \begin{array}{rr} 2 & 1 \\ 2 & 1 \end{array} \right]
Take 22 off each diagonal entry of AA. The right-hand side of the system is all zeros and stays all zeros under every row operation, so we do not write it.
5

lambda = 2, pivot 1: column 1, row 1

Why this step

We work one column at a time, left to right. The goal for a column is a single 11 (the pivot) with zeros everywhere else in it. A column in that state says something very plain: its variable appears in exactly one equation, with nothing in front of it. Each cleared column is one variable pinned down.

Multiply row 1 by 12\frac{1}{2}, which turns the pivot 22 into 11. Multiplying an equation through by a number that is not zero keeps it true for exactly the same values.

columnworkingnew entry
1112⋅2\frac{1}{2} \cdot 211
2212⋅1\frac{1}{2} \cdot 112\frac{1}{2}
Row 1, entry by entry.
[11221]\left[ \begin{array}{rr} \boxed{1} & \frac{1}{2} \\ 2 & 1 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked

Replace row 2 by R2−2R1R_{2} - 2 R_{1}. The multiplier is chosen so that the entry under attack, 22, is cancelled exactly by the pivot: 2−2⋅1=02 - 2 \cdot 1 = 0.

columnworkingnew entry
112−2⋅12 - 2 \cdot 100
221−2⋅121 - 2 \cdot \frac{1}{2}00
Row 2, entry by entry: old entry minus the multiple of row 1.
[11200]\left[ \begin{array}{rr} \boxed{1} & \frac{1}{2} \\ 0 & 0 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked
6

Eigenvectors for lambda = 2: read off and check

Why this step

Each column without a pivot is a free variable, and each free variable gives one independent eigenvector: set it to 11, set any other free variables to 00, and read the pivot variables off the rows. An eigenvector is only a direction, so any non-zero multiple is equally good; we scale to whole numbers.

[11200]\left[ \begin{array}{rr} 1 & \frac{1}{2} \\ 0 & 0 \end{array} \right]
The reduced matrix. It has 1 pivot and 1 free column. checked
v=[1−2]v = \begin{bmatrix} 1 \\ -2 \end{bmatrix}
An eigenvector for λ=2\lambda = 2. Now the check, Av=λvA v = \lambda v, one row at a time:
4⋅1+1⋅(−2)=2⋅14 \cdot 1 + 1 \cdot \left( -2 \right) = 2 \cdot 1
Row 1 of AA times vv, against λ\lambda times entry 1 of vv. Both sides are 22. checked
2⋅1+3⋅(−2)=2⋅(−2)2 \cdot 1 + 3 \cdot \left( -2 \right) = 2 \cdot \left( -2 \right)
Row 2 of AA times vv, against λ\lambda times entry 2 of vv. Both sides are −4-4. checked
7

Eigenvectors for lambda = 5: set up

Why this step

With λ=5\lambda = 5 fixed, the eigenvectors are the non-zero solutions of (A−λI)v=0\left( A - \lambda I \right) v = 0. That is an ordinary system of linear equations, and we solve it the ordinary way, by row reduction. We already know it MUST have a non-zero solution, because this λ\lambda was chosen to make the determinant zero. If row reduction produced a pivot in every column, that would prove we had the wrong eigenvalue.

A−(5)I=[−112−2]A - \left( 5 \right) I = \left[ \begin{array}{rr} -1 & 1 \\ 2 & -2 \end{array} \right]
Take 55 off each diagonal entry of AA. The right-hand side of the system is all zeros and stays all zeros under every row operation, so we do not write it.
8

lambda = 5, pivot 1: column 1, row 1

Why this step

We work one column at a time, left to right. The goal for a column is a single 11 (the pivot) with zeros everywhere else in it. A column in that state says something very plain: its variable appears in exactly one equation, with nothing in front of it. Each cleared column is one variable pinned down.

Multiply row 1 by −1-1, which turns the pivot −1-1 into 11. Multiplying an equation through by a number that is not zero keeps it true for exactly the same values.

columnworkingnew entry
11−1⋅(−1)-1 \cdot \left( -1 \right)11
22−1⋅1-1 \cdot 1−1-1
Row 1, entry by entry.
[1−12−2]\left[ \begin{array}{rr} \boxed{1} & -1 \\ 2 & -2 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked

Replace row 2 by R2−2R1R_{2} - 2 R_{1}. The multiplier is chosen so that the entry under attack, 22, is cancelled exactly by the pivot: 2−2⋅1=02 - 2 \cdot 1 = 0.

columnworkingnew entry
112−2⋅12 - 2 \cdot 100
22−2−2⋅(−1)-2 - 2 \cdot \left( -1 \right)00
Row 2, entry by entry: old entry minus the multiple of row 1.
[1−100]\left[ \begin{array}{rr} \boxed{1} & -1 \\ 0 & 0 \end{array} \right]
The matrix now. The boxed entry is the pivot being worked on. checked
9

Eigenvectors for lambda = 5: read off and check

Why this step

Each column without a pivot is a free variable, and each free variable gives one independent eigenvector: set it to 11, set any other free variables to 00, and read the pivot variables off the rows. An eigenvector is only a direction, so any non-zero multiple is equally good; we scale to whole numbers.

[1−100]\left[ \begin{array}{rr} 1 & -1 \\ 0 & 0 \end{array} \right]
The reduced matrix. It has 1 pivot and 1 free column. checked
v=[11]v = \begin{bmatrix} 1 \\ 1 \end{bmatrix}
An eigenvector for λ=5\lambda = 5. Now the check, Av=λvA v = \lambda v, one row at a time:
4⋅1+1⋅1=5⋅14 \cdot 1 + 1 \cdot 1 = 5 \cdot 1
Row 1 of AA times vv, against λ\lambda times entry 1 of vv. Both sides are 55. checked
2⋅1+3⋅1=5⋅12 \cdot 1 + 3 \cdot 1 = 5 \cdot 1
Row 2 of AA times vv, against λ\lambda times entry 2 of vv. Both sides are 55. checked