Linear Algebra / Unit 5, Eigenvalues and Eigenvectors / Topic 5.4
Unit 5. Eigenvalues and Eigenvectors
This topic studies what happens when the same map is applied many times. The eigenvalues decide whether the result grows, dies away, or settles at a steady state. The main application is the Markov chain, which describes a system that moves between states with fixed probabilities.
You need Topics 5.1 and 5.3 for this topic.
Many processes change in steps, and each step is the same linear map. If x₀ is the state at the start and A is the matrix of one step, then
x₁ = Ax₀ x₂ = Ax₁ = A²x₀ xk = Akx₀The question is what xk looks like when k is large. Multiplying by A again and again answers it slowly. The eigenvalues answer it at once.
Suppose that A is diagonalizable, with the eigenvectors v₁, …, vₙ and the eigenvalues λ₁, …, λₙ. Write the starting vector as a combination of the eigenvectors, x₀ = c₁v₁ + … + cₙvₙ. Each step multiplies each term by its eigenvalue, so after k steps
xk = c₁λ₁kv₁ + c₂λ₂kv₂ + … + cₙλₙkvₙThis is the same statement as Ak = PDkP⁻¹ from Topic 5.3. The size of each eigenvalue decides what its term does.
| Eigenvalue | Its term after many steps |
|---|---|
| Size greater than 1 | Grows without limit |
| λ = 1 | Stays the same |
| λ = −1 | Changes sign at each step and keeps its size |
| Size less than 1 | Dies away |
After many steps, the term with the largest eigenvalue is much larger than the others. The vector xk then points along that eigenvector, and each further step multiplies it by that eigenvalue.
The Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, and so on. Each number is the sum of the two numbers before it: Fk+2 = Fk+1 + Fk. This rule is one step of a linear map, if the state holds two neighboring numbers.
Fk+2Fk+1 = 1110 Fk+1FkThe matrix has the trace 1 and the determinant −1, so its characteristic equation is λ² − λ − 1 = 0.
λ₁ = (1 + √5)/2 ≈ 1.618 λ₂ = (1 − √5)/2 ≈ −0.618The second eigenvalue has a size less than 1, so its term dies away. For large k, each Fibonacci number is about 1.618 times the number before it. The number 1.618 is called the golden ratio. For example, 21 / 13 ≈ 1.615.
A Markov chain describes a system that is in one of several states and moves between them in steps. The probability of each move depends only on the present state.
For example, the people of a region live either in the city or in the suburbs. Each year, 10 percent of the people in the city move to the suburbs, and 20 percent of the people in the suburbs move to the city. Let the vector x hold the fraction of the people in the city and the fraction in the suburbs. One year is the map
xk+1 = Axk with A = 0.90.20.10.8The first column says where the people of the city go: 0.9 stay and 0.1 move. The second column says where the people of the suburbs go: 0.2 move and 0.8 stay.
A matrix like this is called a Markov matrix, or a stochastic matrix. It has two properties.
Start with all of the people in the city, x₀ = (1, 0).
| Year | 0 | 1 | 2 | 3 | 10 | 30 |
|---|---|---|---|---|---|---|
| City | 1 | 0.9 | 0.83 | 0.781 | 0.676 | 0.667 |
| Suburbs | 0 | 0.1 | 0.17 | 0.219 | 0.324 | 0.333 |
The fractions settle at 2/3 and 1/3.
The eigenvalues explain the table. The trace of A is 1.7 and the determinant is 0.7, so the eigenvalues are 1 and 0.7.
The starting vector is (1, 0) = (1/3)(2, 1) + (1/3)(1, −1). So
xk = 1/3 21 + (1/3)(0.7)k 1−1The second term dies away, because 0.7k goes to 0. The first term does not change. It is the steady state, (2/3, 1/3). A steady state is a vector that one step leaves unchanged, Ax = x. It is an eigenvector with the eigenvalue 1, scaled so that its components add to 1.
The steady state does not depend on the starting vector. A different start changes only the coefficient of the term that dies away.
Try it: a Markov chain with two states
Move the sliders to set the fraction that leaves each state in one step and the fraction that starts in state 1. The blue curve is the fraction in state 1, and the red curve is the fraction in state 2. The dashed lines show the steady state.
To find a steady state directly, solve (A − I)x = 0 and divide the solution by the sum of its components.
Markov chains are used wherever a system moves between states at random with fixed probabilities. One large example is the ranking of web pages by a search engine: a reader who follows links at random is a Markov chain, and the steady state gives the fraction of the time spent on each page. In physics, a chain of radioactive decays and the random walk of a molecule are Markov chains.
| Fact | Statement |
|---|---|
| After k steps | xk = c₁λ₁kv₁ + … + cₙλₙkvₙ |
| Long-run behavior | The term with the largest eigenvalue dominates |
| Markov matrix | No negative entries, and each column adds to 1 |
| Steady state | The eigenvector with the eigenvalue 1, scaled so that its components add to 1 |
| Speed of approach | Set by the size of the second eigenvalue |
Work each problem on paper first. Then open the answer to check your work.
The term with 0.5k dies away. The term with 1.2k grows without limit.
For large k, xk points along the eigenvector of 1.2, unless the starting vector had no part along it.
Yes. No entry is negative, and the columns add to 1.
One eigenvalue is 1. The trace is 1.3, so the other eigenvalue is 0.3.
−0.4x + 0.3y = 0from (A − I)x = 0x = (3, 4)one solution, an eigenvector3 + 4 = 7the sum of the componentssteady state = (3/7, 4/7)divide by the sum
A = 0.90.60.10.4.
−0.1x + 0.6y = 0from (A − I)x = 0x = (6, 1)one solution, an eigenvectorsteady state = (6/7, 1/7)divide by the sum 7
The machine works on 6/7 of the days, which is about 86 percent.
The term is multiplied by 0.7 each year.
0.7¹² ≈ 0.0140.7¹³ ≈ 0.0097
It takes 13 years.
After many steps, the state vector points along the eigenvector of the largest eigenvalue, 1.618.
Each further step multiplies the vector by 1.618, so each Fibonacci number is about 1.618 times the one before it.
The code below stores the Markov matrix of Part 4 and the starting vector (1, 0), and takes one step. The @ sign multiplies a matrix by a vector.
Python
The result is [0.9 0.1], the fractions after one year.
A line that starts with for tells Python to repeat the lines that follow it. The line for k in range(5): repeats them 5 times. Python repeats only the lines that are indented, which means that they start with four spaces. The colon at the end of the for line is required.
In the code below, each repeat replaces x by Ax and prints the new vector.
Python
The five results are the fractions after 1, 2, 3, 4, and 5 years. The first three agree with the table in Part 4.
In the next box, the print line is not indented, so it is not repeated. It runs once, after all of the steps. Change the number of steps from 5 to 50.
Python
The instruction np.linalg.matrix_power calculates a power of a matrix. The code below prints A⁵⁰.
Python
Both columns are very close to (2/3, 1/3). The product of this matrix with any starting vector whose components add to 1 is the steady state, so the start does not matter.
From Topic 5.1, np.linalg.eig gives the eigenvalues and a matrix whose columns are eigenvectors. The instruction np.argmax gives the position of the largest number in a list. For a Markov matrix the largest eigenvalue is 1, so this finds the column of the steady state. The last line divides the eigenvector by the sum of its components.
Python
The eigenvalues are 1 and 0.7, and the steady state is (2/3, 1/3).
Now change the matrix. Each year, 30 percent of the people in the city move to the suburbs, and 10 percent of the people in the suburbs move to the city. Each column must add to 1.
Python
The powers of the matrix in Part 3 contain the Fibonacci numbers. The entry in row 1 and column 2 of the power k is the number F with the index k. Python counts from 0, so that entry is written [0, 1].
Python
The power 10 has the rows 89, 55 and 55, 34, and the Fibonacci number with the index 10 is 55.
Now find the Fibonacci number with the index 20.
Python
The code below prints the eigenvalues of the Fibonacci matrix and the ratio of two neighboring Fibonacci numbers.
Python
The eigenvalues are about 1.618 and −0.618. The ratio of the Fibonacci numbers with the indexes 21 and 20 is 1.618034, which agrees with the larger eigenvalue to six decimal places.
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. Which of these matrices is a Markov matrix?
In a Markov matrix, no entry is negative, and the entries of each column add to 1. In the first matrix the rows add to 1, but the columns add to 1.1 and 0.9. The third matrix has a negative entry.
2. Find the steady state of the Markov matrix 0.70.40.30.6. Its components add to 1. You can type fractions.
The steady state satisfies Ax = x.0.7x₁ + 0.4x₂ = x₁the first row0.4x₂ = 0.3x₁subtract 0.7x₁ from both sidesx = (4, 3)one solutionsteady state = (4/7, 3/7)divide by the sum 7
3. One eigenvalue of 0.70.40.30.6 is 1. Find the other eigenvalue.
The trace is the sum of the eigenvalues.trace = 0.7 + 0.6 = 1.3other eigenvalue = 1.3 − 1 = 0.3
4. A matrix A has the eigenvalues 1.5 and 0.2. The starting vector x₀ has a part along each eigenvector. What happens to xk = Akx₀ when k is large?
Each step multiplies the part along an eigenvector by its eigenvalue. The part with 0.2 dies away, and the part with 1.5 grows without limit.
5. Let A = 0.80.30.20.7 and x₀ = (1, 0). Calculate x₂ = A²x₀.
x₁ = Ax₀ = (0.8, 0.2)the first stepx₂ = Ax₁ = (0.64 + 0.06, 0.16 + 0.14)the second stepx₂ = (0.7, 0.3)
Next: Topic 5.5, Systems of Differential Equations and the Matrix Exponential