Linear Algebra / Unit 5, Eigenvalues and Eigenvectors / Topic 5.5
Unit 5. Eigenvalues and Eigenvectors
This topic uses eigenvalues and eigenvectors to solve systems of linear differential equations, in which several quantities change continuously and affect each other. It also defines the exponential of a matrix, which is the form that the solution takes in quantum mechanics.
You need Topics 5.1 and 5.3 for this topic. You also need the derivative of the exponential function.
The simplest differential equation says that a quantity changes at a rate proportional to itself.
dx/dt = ax has the solution x(t) = x(0) eatThe solution grows when a is positive and dies away when a is negative. Radioactive decay, the cooling of an object, and the discharge of a capacitor follow this equation with a negative a.
When two quantities affect each other, each rate depends on both quantities.
dx/dt = −2x + y dy/dt = x − 2yFor example, x and y can be the temperatures of two objects, measured from the temperature of the room. Each object loses heat to the room and exchanges heat with the other object. In matrix form, with x = (x, y),
dx/dt = Ax with A = −211−2The two equations are coupled: neither can be solved alone.
Look for a solution that keeps one direction and changes only its size, x(t) = eλtv, where v is a fixed vector. Its derivative is λeλtv, and Ax is eλtAv. The two sides are equal when
Av = λvEach eigenvector v of A, with its eigenvalue λ, gives the solution eλtv. Along an eigenvector, the system behaves like the single equation of Part 1.
The system is linear, so a combination of solutions is a solution. If A has n independent eigenvectors, the general solution is
x(t) = c₁eλ₁tv₁ + c₂eλ₂tv₂ + … + cₙeλₙtvₙThe constants come from the starting value. At t = 0 each exponential is 1, so x(0) = c₁v₁ + … + cₙvₙ. The constants are the coordinates of x(0) in the basis of eigenvectors.
Compare this with Topic 5.4. For repeated steps, each term was multiplied by λk. For continuous change, each term is multiplied by eλt.
The matrix A has the trace −4 and the determinant 3, so λ² + 4λ + 3 = 0, and the eigenvalues are −1 and −3. The eigenvectors are (1, 1) for λ = −1 and (1, −1) for λ = −3. Take the starting value x(0) = (3, 1).
31 = 2 11 + 1 1−1the starting value in the basis of eigenvectorsx(t) = 2e−t 11 + e−3t 1−1each part is multiplied by its exponentialx(t) = 2e−t + e−3tthe first componenty(t) = 2e−t − e−3tthe second componentBoth eigenvalues are negative, so both temperatures go to the temperature of the room. The term with e−3t dies away faster. It holds the difference between the two temperatures, so the two objects first reach a common temperature, and then cool together.
Try it: the paths of the solutions
Choose a system and drag the blue point to set the starting value. The curve is the path of the solution x(t) as time passes, and the arrowhead shows its direction. The dashed lines are the lines of the eigenvectors, when the eigenvalues are real.
| Eigenvalue | Its term as time passes |
|---|---|
| Real and negative | Dies away |
| Real and positive | Grows without limit |
| Zero | Stays constant |
| Imaginary, such as i and −i | Oscillates with a constant size |
| Complex with a negative real part | Oscillates and dies away |
| Complex with a positive real part | Oscillates and grows |
A system is called stable when all of its solutions die away. That happens exactly when the real part of each eigenvalue is negative. Unit 8 explains how eλt with a complex λ produces sines and cosines.
Newton’s second law gives equations with second derivatives. Two equal masses m are joined to each other and to two walls by three equal springs with the spring constant k. If x₁ and x₂ are the displacements of the masses from equilibrium, then
m x₁″ = −2k x₁ + k x₂ m x₂″ = k x₁ − 2k x₂In matrix form, mx″ = −Kx, where K is the matrix with the rows 2k, −k and −k, 2k. Look for a motion in which both masses oscillate with one angular frequency ω, x(t) = cos(ωt)v. Its second derivative is −ω² cos(ωt)v, so the equation requires
Kv = mω²vThis is an eigenvalue problem for K. The matrix with the rows 2, −1 and −1, 2 has the eigenvalues 1 and 3, with the eigenvectors (1, 1) and (1, −1).
| Eigenvector | Motion | Angular frequency |
|---|---|---|
| (1, 1) | The masses move together, in the same direction | ω = √k/m |
| (1, −1) | The masses move in opposite directions | ω = √3k/m |
These two motions are called the normal modes of the system. Any motion of the two masses is a combination of the two normal modes. In the second mode the middle spring is stretched and compressed, which is the reason for its higher frequency.
The solution of the single equation is x(t) = eatx(0). The solution of the system can be written in the same form, x(t) = eAtx(0), if the exponential of a matrix is defined by the same series as the exponential of a number.
eAt = I + At + (At)²/2! + (At)³/3! + …The series adds up to a matrix for any square matrix A. Taking the derivative of each term shows that the derivative of eAt is AeAt, so eAtx(0) solves the system, and at t = 0 it is equal to x(0).
If A = PDP⁻¹, then each power is (At)k = P(Dt)kP⁻¹, as in Topic 5.3, and the series becomes
eAt = P eDt P⁻¹The exponential of the diagonal matrix Dt is the diagonal matrix with the entries eλ₁t, …, eλₙt. For the example of Part 3, P has the columns (1, 1) and (1, −1), and
eAt = 1/2 e−t + e−3te−t − e−3te−t − e−3te−t + e−3tMultiplying this matrix by (3, 1) gives the solution of Part 3.
Let J be the matrix of the rotation by 90°, with the rows 0, −1 and 1, 0. Its square is −I, so the powers of J repeat: J, −I, −J, I. The terms of the series with even powers collect into the series for cos t, and the terms with odd powers collect into the series for sin t.
eJt = (cos t) I + (sin t) J = cos t−sin tsin tcos tThe exponential of Jt is the rotation by the angle t. The system dx/dt = Jx moves each point around a circle at a constant rate.
This is the form of the main equation of quantum mechanics. The Schrödinger equation is a linear system, dψ/dt = −(i/ħ)Hψ, where H is the matrix or operator of the energy. Its solution is ψ(t) = e−iHt/ħψ(0). Each eigenvector of H is multiplied by e−iEt/ħ, where E is its eigenvalue, the energy. Topic 9.8 develops this.
| Fact | Statement |
|---|---|
| System | dx/dt = Ax |
| Solution from an eigenvector | eλtv |
| General solution | c₁eλ₁tv₁ + … + cₙeλₙtvₙ, with the constants from x(0) |
| Stable system | The real part of each eigenvalue is negative |
| Normal modes | The eigenvectors of K, with Kv = mω²v |
| Matrix exponential | eAt = I + At + (At)²/2! + … = PeDtP⁻¹ |
| Solution with the exponential | x(t) = eAtx(0) |
Work each problem on paper first. Then open the answer to check your work.
The matrix is diagonal, so the equations are not coupled.
x(t) = 2e3t and y(t) = 5e−t.
The eigenvalues are 3 and −1, with the eigenvectors (1, 1) and (1, −1).
x(t) = c₁e3t(1, 1) + c₂e−t(1, −1).
c₁ + c₂ = 4the first components at t = 0c₁ − c₂ = 0the second components at t = 0c₁ = 2add the two equations, then divide by 2c₂ = 2because c₁ = c₂x(t) = 2e3t(1, 1) + 2e−t(1, −1)the solution
For large t the second term dies away, and the solution grows along the direction (1, 1).
The matrix is triangular, so the eigenvalues are −1 and −2.
Both are negative, so all solutions die away. The system is stable.
The matrix is diagonal, so eAt is the diagonal matrix with the entries e2t and e−t.
ω = √k/m = √16 = 4 rad/sthe mode in which the masses move togetherω = √3k/m = √48 ≈ 6.93 rad/sthe mode in which they move in opposite directions
The instruction np.exp calculates the exponential function. The code below prints e¹ and e⁻¹.
Python
The results are about 2.718 and 0.368.
The solution of the example in Part 3 is x(t) = 2e−t(1, 1) + e−3t(1, −1). The code below calculates it at t = 1. The * sign means multiplication.
Python
At t = 1 the two temperatures are about 0.786 and 0.686. They are already close to each other, because the term with e−3t has almost died away.
In the next box, change the time so that the code prints the starting value of the solution.
Python
From Part 6, eAt = PeDtP⁻¹. The instruction np.linalg.eig gives the eigenvalues and a matrix whose columns are eigenvectors. When np.exp is given a list, it takes the exponential of each number in the list, so np.exp(w * t) holds eλt for each eigenvalue. The instruction np.diag puts these numbers on the diagonal of a matrix.
Python
The first result is the matrix eAt at t = 1. The second result is that matrix times the starting value (3, 1). It agrees with the solution in Step 2.
Now find the two temperatures at t = 2 for a different starting value, (4, 0). Two lines have to change.
Python
The series of Part 6 can be added up with a loop. From Topic 5.4, the line for k in range(1, 20): repeats the indented lines, with k equal to 1, then 2, and so on up to 19. Each repeat builds the next term of the series from the term before it, and adds it to the sum. The instruction np.eye(2) is the 2 by 2 identity matrix, and np.pi is the number π.
The code below adds up the series for eJt with t = π/2, where J is the rotation by 90°. The instruction np.round rounds each entry to 6 decimal places.
Python
The result has the rows 0, −1 and 1, 0. The exponential of Jt with t = π/2 is the rotation by 90°, as Part 6 states. Python may print a 0 as -0. The value is the same.
Now change t so that the result is the rotation by 180°, which is the matrix −I.
Python
The code below finds the normal modes of Practice Problem 6. The matrix K has the rows 2k, −k and −k, 2k, with k = 8 and m = 0.5. The eigenvalues of K are mω², so the angular frequencies are the square roots of the eigenvalues divided by m. The instruction np.sqrt calculates a square root.
Python
The angular frequencies are about 6.93 and 4 radians per second. The columns of V are the two modes. In one column the two components have opposite signs, and that column belongs to the higher frequency: the masses move in opposite directions.
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 function solves dx/dt = −4x with x(0) = 3?
The solution of dx/dt = ax is x(t) = x(0)eat. Here a = −4 and x(0) = 3.
2. The matrix A of the system dx/dt = Ax has the eigenvalues −2 and 1. Is the system stable?
A system is stable when all of its solutions die away, which requires each eigenvalue to have a negative real part. The eigenvalue 1 gives a solution that grows as et.
3. The starting value is x(0) = (5, 1), and the eigenvectors are (1, 1) and (1, −1). Find the constants c₁ and c₂ in (5, 1) = c₁(1, 1) + c₂(1, −1).
c₁ + c₂ = 5the first componentsc₁ − c₂ = 1the second components2c₁ = 6add the two equationsc₁ = 3divide both sides by 2c₂ = 5 − 3 = 2substitute c₁ = 3 into the first equation
4. For two masses on springs, Kv = mω²v. One eigenvalue of K is 12 N/m, and each mass is m = 3 kg. Find the angular frequency ω, in radians per second.
The eigenvalue is equal to mω².ω² = 12/3 = 4divide the eigenvalue by the massω = 2 radians per secondtake the square root
5. In which case is eA + B equal to eAeB?
The rule for numbers holds for matrices that commute, which means AB = BA. For matrices that do not commute, the rule fails.
Next: Topic 6.1, Projections