Scientia sine finibus

Linear Algebra / Unit 5, Eigenvalues and Eigenvectors / Topic 5.1

Units and Topics

Unit 5. Eigenvalues and Eigenvectors

5.1 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.

1. The Definition

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 1

Let 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 = λv

The 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.

2. What an Eigenvalue Tells

EigenvalueWhat the map does to its eigenvector
λ greater than 1Stretches it
λ = 1Leaves it unchanged
λ between 0 and 1Shrinks it
λ = 0Sends it to the zero vector, so the eigenvector is in the null space
λ less than 0Reverses 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.

3. Finding the Eigenvalues

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 = 0

An 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)factor

The determinant is 0 for λ = 2 and for λ = 5. These are the two eigenvalues.

4. Finding the Eigenvectors

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 solution

For λ = 5:

A − 5I = −112−2subtract 5 from each diagonal entry−x + y = 0both rows give this equationv = 11one solution

Check both results with the original matrix.

4123 1−2 = 2−4 = 2 1−2the eigenvalue 24123 11 = 55 = 5 11the eigenvalue 5

5. Matrices Whose Eigenvalues Can Be Read Directly

MatrixEigenvaluesEigenvectors
DiagonalThe diagonal entriesThe standard unit vectors
TriangularThe diagonal entriesFound from (A − λI)v = 0
Identity1All vectors except the zero vector
Projection onto a line1 and 0Vectors on the line, and vectors perpendicular to it
Reflection across a line1 and −1Vectors on the line, and vectors perpendicular to it
Shear with the rows 1, 1 and 0, 11 onlyOnly the multiples of (1, 0)
Rotation by 90°No real eigenvaluesNo 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.

6. Two Checks: the Trace and the Determinant

For a 2 by 2 matrix with the entries a, b, c, d, the equation det(A − λI) = 0 is

λ² − (a + d)λ + (ad − bc) = 0

If the two solutions are λ₁ and λ₂, the left side is also (λ − λ₁)(λ − λ₂) = λ² − (λ₁ + λ₂)λ + λ₁λ₂. Comparing the two forms gives

λ₁ + λ₂ = tr A λ₁λ₂ = det A

The 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 determinant

Use 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.

7. Eigenvectors of Different Eigenvalues Are Independent

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.

8. Eigenvalues in Physics

  • A system of masses and springs has special motions in which all of the masses move with one frequency. These motions are eigenvectors, and the squares of the frequencies are eigenvalues. Topic 5.5 works an example.
  • A rigid body has three perpendicular axes about which it can spin without wobbling. They are the eigenvectors of its moment of inertia matrix.
  • In quantum mechanics, each quantity that can be measured is represented by a matrix or an operator. The possible results of a measurement are its eigenvalues, and the states that give one definite result are its eigenvectors. Units 8 and 9 are built on this fact.

Common Mistakes

  • Accepting the zero vector as an eigenvector. An eigenvector is never the zero vector, although an eigenvalue can be 0.
  • Subtracting λ from all of the entries of A. Only the diagonal entries change in A − λI.
  • Expecting one eigenvector for each eigenvalue. Each eigenvalue has a whole line of eigenvectors, or more.
  • Solving (A − λI)v = 0 and finding only the zero vector. This means that λ is not an eigenvalue, so the eigenvalue was calculated incorrectly.
  • Reading the eigenvalues from the diagonal of a matrix that is not triangular.
  • Reducing the matrix by row operations before finding the eigenvalues. Row operations change the eigenvalues.

Summary

TermMeaning
EigenvectorA vector v, not the zero vector, with Av = λv
EigenvalueThe number λ in that equation
EigenspaceAll eigenvectors of one eigenvalue, together with the zero vector
To find the eigenvaluesSolve det(A − λI) = 0
To find the eigenvectorsSolve (A − λI)v = 0 for each eigenvalue
ChecksThe sum of the eigenvalues is the trace, and their product is the determinant

Practice

Work each problem on paper first. Then open the answer to check your work.

1. Is (1, 2) an eigenvector of 3124? If it is, find the eigenvalue.

Av = (3 + 2, 2 + 8) = (5, 10)multiplyAv = 5(1, 2)5 times the vector

Yes. The eigenvalue is 5.

2. Find the eigenvalues of 1221.

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.

3. Find an eigenvector for each eigenvalue of the matrix in Problem 2.

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).

4. Find the eigenvalues of 2710−34005.

The matrix is upper triangular, so the eigenvalues are the diagonal entries: 2, −3, and 5.

5. A 2 by 2 matrix has the trace 6 and the determinant 8. Find its eigenvalues.

λ² − 6λ + 8 = 0the characteristic equation(λ − 2)(λ − 4) = 0factor

The eigenvalues are 2 and 4.

6. The matrix 1224 has a determinant of 0. Find its eigenvalues and an eigenvector for each.

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).

Python Practice

Step 1. Check an eigenvector

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

Step 2. Calculate the eigenvalues

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

Step 3. Calculate the eigenvectors

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.

Step 4. Check an eigenvector from Python

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

Step 5. Compare with the trace and the determinant

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.

Step 6. A map with no real eigenvectors

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.

Quiz

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.

2. Find the two eigenvalues of 5102.

3. Find the two eigenvalues of 3113.

4. Which vector is an eigenvector of 3113 with the eigenvalue 2?

5. A square matrix has the eigenvalue 0. Which statement is true?

Next: Topic 5.2, The Characteristic Polynomial