Linear Algebra / Unit 5, Eigenvalues and Eigenvectors / Topic 5.1
Unit 5. Eigenvalues and Eigenvectors
This topic introduces the eigenvectors of a square matrix, which are the vectors that the map sends along their own lines, and the eigenvalues, which are the factors by which those vectors are stretched. They are the most useful description of what a map does.
You need Topics 3.1, 3.4, 4.3, and 4.6 for this topic.
A map usually turns a vector to a new direction. Topic 4.6 found a special case for the matrix below: it sends (1, 1) to (3, 3) and (1, −1) to (1, −1). These two vectors stay on their own lines.
A = 2112the matrixA 11 = 33 = 3 11the vector (1, 1) is multiplied by 3A 1−1 = 1−1 = 1 1−1the vector (1, −1) is multiplied by 1Let A be a square matrix. A vector v that is not the zero vector is called an eigenvector of A when Av is a multiple of v.
Av = λvThe number λ is called the eigenvalue that belongs to v. The symbol λ is the Greek letter lambda. For the matrix above, (1, 1) is an eigenvector with the eigenvalue 3, and (1, −1) is an eigenvector with the eigenvalue 1.
The zero vector is excluded, because A0 = λ0 is true for any λ and gives no information. The eigenvalue itself is allowed to be 0.
| Eigenvalue | What the map does to its eigenvector |
|---|---|
| λ greater than 1 | Stretches it |
| λ = 1 | Leaves it unchanged |
| λ between 0 and 1 | Shrinks it |
| λ = 0 | Sends it to the zero vector, so the eigenvector is in the null space |
| λ less than 0 | Reverses its direction, and also stretches or shrinks it |
Any multiple of an eigenvector, other than the zero vector, is an eigenvector with the same eigenvalue: A(cv) = cAv = λ(cv). So an eigenvector marks a whole line through the origin. The eigenvectors of one eigenvalue, together with the zero vector, form a subspace, called the eigenspace of that eigenvalue.
Try it: look for eigenvectors
Choose a map and drag the blue point. The red arrow is Ax. When Ax is on the same line as x, the arrow turns green: x is an eigenvector. Look for all of the lines of eigenvectors of each map.
Write the equation Av = λv with all of the terms on one side. Because λv = λIv, where I is the identity matrix,
(A − λI)v = 0An eigenvector is a solution of this homogeneous system other than the zero vector. From Topic 3.4, such a solution exists exactly when the matrix A − λI has a determinant of 0.
The eigenvalues of A are the numbers λ for which det(A − λI) = 0.
The matrix A − λI is A with λ subtracted from each diagonal entry. For example,
A = 4123the matrixdet(A − λI) = det 4 − λ123 − λsubtract λ from each diagonal entrydet(A − λI) = (4 − λ)(3 − λ) − 2the 2 by 2 determinantdet(A − λI) = λ² − 7λ + 10multiply outdet(A − λI) = (λ − 2)(λ − 5)factorThe determinant is 0 for λ = 2 and for λ = 5. These are the two eigenvalues.
For each eigenvalue, solve (A − λI)v = 0. The system always has a free variable, because its determinant is 0.
For λ = 2:
A − 2I = 2121subtract 2 from each diagonal entry2x + y = 0both rows give this equationv = 1−2one solutionFor λ = 5:
A − 5I = −112−2subtract 5 from each diagonal entry−x + y = 0both rows give this equationv = 11one solutionCheck both results with the original matrix.
4123 1−2 = 2−4 = 2 1−2the eigenvalue 24123 11 = 55 = 5 11the eigenvalue 5| Matrix | Eigenvalues | Eigenvectors |
|---|---|---|
| Diagonal | The diagonal entries | The standard unit vectors |
| Triangular | The diagonal entries | Found from (A − λI)v = 0 |
| Identity | 1 | All vectors except the zero vector |
| Projection onto a line | 1 and 0 | Vectors on the line, and vectors perpendicular to it |
| Reflection across a line | 1 and −1 | Vectors on the line, and vectors perpendicular to it |
| Shear with the rows 1, 1 and 0, 1 | 1 only | Only the multiples of (1, 0) |
| Rotation by 90° | No real eigenvalues | No real eigenvectors |
For a triangular matrix, A − λI is also triangular, and its determinant is the product of the diagonal entries a₁₁ − λ, a₂₂ − λ, and so on. That product is 0 exactly when λ is one of the diagonal entries.
A rotation by 90° turns each vector off its own line, so it has no eigenvectors in the plane. Its equation is λ² + 1 = 0, which has no real solution. Unit 8 shows that it has eigenvalues and eigenvectors with complex numbers.
For a 2 by 2 matrix with the entries a, b, c, d, the equation det(A − λI) = 0 is
λ² − (a + d)λ + (ad − bc) = 0If the two solutions are λ₁ and λ₂, the left side is also (λ − λ₁)(λ − λ₂) = λ² − (λ₁ + λ₂)λ + λ₁λ₂. Comparing the two forms gives
λ₁ + λ₂ = tr A λ₁λ₂ = det AThe same is true for a square matrix of any size: the sum of the eigenvalues is the trace, and their product is the determinant. For the example:
2 + 5 = 7 = 4 + 3the sum of the eigenvalues and the trace(2)(5) = 10 = 12 − 2the product of the eigenvalues and the determinantUse these two facts to check your eigenvalues.
A matrix has an inverse exactly when 0 is not one of its eigenvalues, because the determinant is the product of the eigenvalues.
Eigenvectors that belong to different eigenvalues are linearly independent. For two eigenvectors the reason is short. If v₂ were a multiple of v₁, it would be on the same line as v₁, and the map would stretch it by λ₁ and not by λ₂.
So an n by n matrix with n different eigenvalues has n independent eigenvectors, and they are a basis of ℝⁿ. Topic 5.3 uses this basis.
| Term | Meaning |
|---|---|
| Eigenvector | A vector v, not the zero vector, with Av = λv |
| Eigenvalue | The number λ in that equation |
| Eigenspace | All eigenvectors of one eigenvalue, together with the zero vector |
| To find the eigenvalues | Solve det(A − λI) = 0 |
| To find the eigenvectors | Solve (A − λI)v = 0 for each eigenvalue |
| Checks | The sum of the eigenvalues is the trace, and their product is the determinant |
Work each problem on paper first. Then open the answer to check your work.
Av = (3 + 2, 2 + 8) = (5, 10)multiplyAv = 5(1, 2)5 times the vector
Yes. The eigenvalue is 5.
det(A − λI) = (1 − λ)² − 4the 2 by 2 determinantdet(A − λI) = λ² − 2λ − 3multiply outdet(A − λI) = (λ − 3)(λ + 1)factor
The eigenvalues are 3 and −1. Check: the sum is 2, which is the trace, and the product is −3, which is the determinant.
For λ = 3, A − 3I = −222−2, which gives x = y. An eigenvector is (1, 1).
For λ = −1, A + I = 2222, which gives x = −y. An eigenvector is (1, −1).
The matrix is upper triangular, so the eigenvalues are the diagonal entries: 2, −3, and 5.
λ² − 6λ + 8 = 0the characteristic equation(λ − 2)(λ − 4) = 0factor
The eigenvalues are 2 and 4.
The product of the eigenvalues is 0 and their sum is 5, so the eigenvalues are 0 and 5.
For λ = 0, x + 2y = 0, so an eigenvector is (−2, 1). It is in the null space.
For λ = 5, A − 5I = −422−1, which gives y = 2x. An eigenvector is (1, 2).
The @ sign multiplies a matrix by a vector, and the * sign multiplies a vector by a number. The code below calculates Av and 3v for the matrix of Part 1.
Python
Both results are [3 3], so (1, 1) is an eigenvector with the eigenvalue 3.
In the next box, change v to an eigenvector of this matrix with the eigenvalue 1. The two results should be equal.
Python
The instruction np.linalg.eigvals calculates the eigenvalues of a square matrix.
Python
The result is [3. 1.]. Now find the eigenvalues of the matrix in Part 3, which has the rows 4, 1 and 2, 3.
Python
The instruction np.linalg.eig gives two results: the eigenvalues, and a matrix whose columns are eigenvectors. Two names with a comma between them receive the two results. In the code below, w receives the eigenvalues and V receives the matrix of eigenvectors.
Python
The first column of V is about (0.707, 0.707). It belongs to the first eigenvalue, 5, and it is a multiple of the eigenvector (1, 1) from Part 4. The second column is about (−0.447, 0.894). It belongs to the eigenvalue 2, and it is a multiple of (1, −2). Python scales each eigenvector so that its length is 1.
A column of a matrix is written with a colon in place of the row number. The first column of V is V[:, 0] and the second column is V[:, 1], because Python counts from 0. The first eigenvalue is w[0].
Python
The two results are equal, so the first column of V is an eigenvector with the first eigenvalue.
Now change the code so that it checks the second column of V with the second eigenvalue. Two numbers have to change.
Python
The instruction np.sum adds the numbers in a list, and np.prod multiplies them. The code below compares the sum of the eigenvalues with the trace, and their product with the determinant, for a 3 by 3 matrix.
Python
The first two results are 14, or very close to it, and the last two results are very close to 4. Small differences in the last digits are rounding errors.
The code below asks for the eigenvalues of the rotation by 90°.
Python
The result is [0.+1.j 0.-1.j]. Python writes the imaginary unit as j, so these two numbers are i and −i. They are complex numbers, which agrees with Part 5: the rotation has no real eigenvalues. Unit 8 explains complex eigenvalues.
This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.
Choose how your answers are checked
1. The vector (3, 2) is an eigenvector of 2321. Find its eigenvalue.
A(3, 2) = (6 + 6, 6 + 2)multiplyA(3, 2) = (12, 8) = 4(3, 2)4 times the vectorThe eigenvalue is 4.
2. Find the two eigenvalues of 5102.
det(A − λI) = (5 − λ)(2 − λ), which is 0 for λ = 5 and λ = 2. The eigenvalues of a triangular matrix are its diagonal entries.
3. Find the two eigenvalues of 3113.
det(A − λI) = (3 − λ)² − 1the 2 by 2 determinantdet(A − λI) = λ² − 6λ + 8multiply outdet(A − λI) = (λ − 2)(λ − 4)factorCheck: the sum 6 is the trace, and the product 8 is the determinant.
4. Which vector is an eigenvector of 3113 with the eigenvalue 2?
A(1, −1) = (3 − 1, 1 − 3)multiplyA(1, −1) = (2, −2) = 2(1, −1)2 times the vectorThe vector (1, 1) is an eigenvector with the eigenvalue 4.
5. A square matrix has the eigenvalue 0. Which statement is true?
The determinant is the product of the eigenvalues, so it is 0. A matrix has an inverse exactly when 0 is not one of its eigenvalues.