Differential EquationsIntroduction to Systems3 of 3
Introduction to Systems · 3

Matrices, Eigenvalues and Eigenvectors

We want to solve systems of differential equations where the rates of change of x\xvar{x} and y\yvar{y} depend on both variables at once.

1

Rewriting a Coupled System as a Matrix Equation

When each variable only depends on itself, like dxdt=3x\xvar{\frac{dx}{dt}} = 3\xvar{x} and dydt=−2y\yvar{\frac{dy}{dt}} = -2\yvar{y}, we can solve each equation separately to get x(t)=c1e3t\xvar{x(t)} = c_1 e^{3t} and y(t)=c2e−2t\yvar{y(t)} = c_2 e^{-2t}. That stops working when both equations contain both x\xvar{x} and y\yvar{y}:

dxdt=1x+2ydydt=3x+2y\displaystyle \begin{aligned} \xvar{\frac{dx}{dt}} &= 1\xvar{x} + 2\yvar{y} \\ \yvar{\frac{dy}{dt}} &= 3\xvar{x} + 2\yvar{y} \end{aligned}

To solve a coupled system without a mess of algebraic elimination, we first put (x,y)(\xvar{x}, \yvar{y}) into a single position vector and write the system as a matrix equation.

Writing a Coupled System as a Matrix Equation
dxdt=3x\displaystyle\htmlClass{lc-blue}{\frac{dx}{dt}} = 3\htmlClass{lc-blue}{x}
00
x\htmlClass{lc-blue}{x}
3x3\htmlClass{lc-blue}{x}
x\htmlClass{lc-blue}{x}

Putting x\xvar{x} and y\yvar{y} into a column vector turns the two equations into one relationship between a point's position and its velocity:

[dxdtdydt]⏟velocity=[1232][xy]⏟position=[1x+2y3x+2y]\displaystyle \underbrace{\begin{bmatrix} \xvar{\tfrac{dx}{dt}} \\ \yvar{\tfrac{dy}{dt}} \end{bmatrix}}_{\velocity{\text{velocity}}} = \begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix} \underbrace{\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix}}_{\text{position}} = \begin{bmatrix} 1\xvar{x} + 2\yvar{y} \\ 3\xvar{x} + 2\yvar{y} \end{bmatrix}

To multiply a matrix by a column vector, go across each row of the matrix, multiply each number by the matching entry of the vector, and add the products.

2

What Eigenvectors and Eigenvalues Mean Geometrically

An eigenvector is a nonzero vector that stays on its own line when multiplied by the matrix. The matrix just scales it by a single number λ\lambda, called its eigenvalue.

In our system, the matrix takes any position vector [xy]\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} and outputs the velocity vector at that point. At almost every point, the velocity arrow points in a different direction than the position arrow and pushes the point along a curve, unless we start along an eigenvector.

What Eigenvectors and Eigenvalues Mean Geometrically
[xy]\begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \end{bmatrix}
[1232]\begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix}
[dxdtdydt]\begin{bmatrix} \htmlClass{lc-blue}{\tfrac{dx}{dt}} \\ \htmlClass{lc-orange}{\tfrac{dy}{dt}} \end{bmatrix}
position\text{position}
velocity\htmlClass{lc-pink}{\text{velocity}}
x\htmlClass{lc-blue}{x}
y\htmlClass{lc-orange}{y}
[13]\htmlClass{lc-pink}{\begin{bmatrix} 1 \\ 3 \end{bmatrix}}
(1,0)(1, 0)
x\htmlClass{lc-blue}{x}
y\htmlClass{lc-orange}{y}
4[xy]\htmlClass{lc-green}{4}\begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \end{bmatrix}
[xy]\begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \end{bmatrix}
x\htmlClass{lc-blue}{x}
y\htmlClass{lc-orange}{y}

Along a direction where the velocity is just λ\lambda times the position, the matrix acts like simple multiplication by λ\lambda:

[1232][xy]⏟eigenvector=λ⏟eigenvalue[xy]\displaystyle \begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix} \underbrace{\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix}}_{\text{eigenvector}} = \underbrace{\lambda}_{\text{eigenvalue}} \begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix}

Because the velocity pushes straight along the line the point is already on, the point stays on that line forever and scales by eλte^{\lambda t}.

This system has two special lines through the origin where the velocity lines up with the position and the path stays straight.

Almost every starting position gets pushed onto a curve, except along two special lines through the origin where the velocity lines up with the position and keeps the path straight.
3

Finding Eigenvalues with the Determinant

To find those straight-line directions for A=[1232]A = \begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix}, we look for the eigenvalues λ\lambda that give a nonzero vector v=[xy]v = \begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} where

[1232][xy]=λ[xy]\displaystyle \begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} = \lambda\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix}
Finding Eigenvalues with the Determinant
A=[1232]A[xy]=λ[xy]λ=  ?\displaystyle \begin{aligned} A &= \begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix} \\[4pt] A\begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \end{bmatrix} &= \lambda \begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \end{bmatrix} \\[4pt] \lambda &= \;? \end{aligned}

Moving λ[xy]\lambda\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} to the left side subtracts λ\lambda from the main diagonal of AA. Using the identity matrix I=[1001]I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, we write this as (A−λI)v=0(A - \lambda I)v = 0. For the two equations in (A−λI)v=0(A - \lambda I)v = 0 to share a whole line of nonzero points instead of only (0,0)(0, 0), they must describe the exact same line, which happens when the determinant is zero:

det⁡(A−λI)=det⁡[a−λbcd−λ]=(a−λ)(d−λ)−bc⏟main diagonal minus other diagonal=0\displaystyle \det(A - \lambda I) = \det\begin{bmatrix} a - \lambda & b \\ c & d - \lambda \end{bmatrix} = \underbrace{(a - \lambda)(d - \lambda) - bc}_{\text{main diagonal minus other diagonal}} = 0
Text solution
Subtract λ\lambda from the main diagonalMove λ[xy]\lambda\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} to the left side so the right side is zero.
A−λI=[1−λ232−λ]\displaystyle A - \lambda I = \begin{bmatrix} 1 - \lambda & 2 \\ 3 & 2 - \lambda \end{bmatrix}
Set the determinant to zeroMultiply the main diagonal, subtract the other diagonal, and set the result to 00 so the two equations describe the same line.
det⁡[1−λ232−λ]=(1−λ)(2−λ)−(2)(3)=2−3λ+λ2−6=λ2−3λ−4=0\displaystyle \begin{aligned} \det\begin{bmatrix} 1 - \lambda & 2 \\ 3 & 2 - \lambda \end{bmatrix} &= (1 - \lambda)(2 - \lambda) - (2)(3) \\ &= 2 - 3\lambda + \lambda^2 - 6 \\ &= \lambda^2 - 3\lambda - 4 = 0 \end{aligned}
Factor to find the eigenvaluesFactor the quadratic to find the two eigenvalues λ\lambda.
(λ−4)(λ+1)=0λ=4,λ=−1\displaystyle \begin{aligned} \eigfirst{(\lambda - 4)}\eigsecond{(\lambda + 1)} &= 0 \\ \lambda = \eigfirst{4}, \quad \lambda &= \eigsecond{-1} \end{aligned}

So this system has one special direction where points grow like e4t\eigfirst{e^{4t}} and a second special direction where points shrink toward the origin like e−t\eigsecond{e^{-t}}.

4

Finding Eigenvectors and Straight-Line Solutions

Now that we have the eigenvalues λ=4\lambda = \eigfirst{4} and λ=−1\lambda = \eigsecond{-1}, we need to find an eigenvector [xy]\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} for each one and combine their straight-line solutions to solve the system for any starting point.

Finding Eigenvectors and Straight-Line Solutions
[1−λ232−λ][xy]=[00]λ=4 ⁣:−1 ⁣:    [xy]=  ?λ=−1 ⁣:    [xy]=  ?\displaystyle \begin{aligned} \begin{bmatrix} 1 - \lambda & 2 \\ 3 & 2 - \lambda \end{bmatrix}\begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \end{bmatrix} &= \begin{bmatrix} 0 \\ 0 \end{bmatrix} \\[6pt] \lambda = \mathrlap{\htmlClass{lc-green}{4}\colon}\hphantom{-1\colon}\;\; \begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \end{bmatrix} &= \;? \\[4pt] \lambda = \htmlClass{lc-violet}{-1}\colon\;\; \begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \end{bmatrix} &= \;? \end{aligned}
Text solution
Plug in λ=4\lambda = \eigfirst{4} and pick a nonzero point on the lineSubstitute λ=4\lambda = \eigfirst{4} into the diagonal of A−λIA - \lambda I and choose simple nonzero numbers x\xvar{x} and y\yvar{y} that satisfy the row equation.
[1−4232−4][xy]=[−323−2][xy]=[00]−3x+2y=0  ⟹  3x=2y  ⟹  [xy]=[23]\displaystyle \begin{aligned} \begin{bmatrix} 1 - \eigfirst{4} & 2 \\ 3 & 2 - \eigfirst{4} \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} &= \begin{bmatrix} -3 & 2 \\ 3 & -2 \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} \\ -3\xvar{x} + 2\yvar{y} &= 0 \implies 3\xvar{x} = 2\yvar{y} \implies \begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} = \eigfirst{\begin{bmatrix} 2 \\ 3 \end{bmatrix}} \end{aligned}
Plug in λ=−1\lambda = \eigsecond{-1} and pick a nonzero point on the second lineSubstitute λ=−1\lambda = \eigsecond{-1} into the diagonal of A−λIA - \lambda I to find the second eigenvector direction.
[1−(−1)232−(−1)][xy]=[2233][xy]=[00]x+y=0  ⟹  y=−x  ⟹  [xy]=[1−1]\displaystyle \begin{aligned} \begin{bmatrix} 1 - \eigsecond{(-1)} & 2 \\ 3 & 2 - \eigsecond{(-1)} \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} &= \begin{bmatrix} 2 & 2 \\ 3 & 3 \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} \\ \xvar{x} + \yvar{y} &= 0 \implies \yvar{y} = -\xvar{x} \implies \begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} = \eigsecond{\begin{bmatrix} 1 \\ -1 \end{bmatrix}} \end{aligned}
Combine the two straight-line solutionsMultiply each eigenvector by its exponential eλte^{\lambda t} and add them together with constants c1\eigfirst{c_1} and c2\eigsecond{c_2}.
[x(t)y(t)]=c1e4t[23]+c2e−t[1−1]\displaystyle \begin{bmatrix} \xvar{x(t)} \\ \yvar{y(t)} \end{bmatrix} = \eigfirst{c_1 e^{4t}\begin{bmatrix} 2 \\ 3 \end{bmatrix}} + \eigsecond{c_2 e^{-t}\begin{bmatrix} 1 \\ -1 \end{bmatrix}}

Plugging λ\lambda into a 2×22 \times 2 matrix A−λIA - \lambda I gives you an instant check: the two rows must be multiples of each other. If they aren't, go back and check your arithmetic for λ\lambda. Any nonzero vector on the same line, like [46]\eigfirst{\begin{bmatrix} 4 \\ 6 \end{bmatrix}} or [−2−3]\eigfirst{\begin{bmatrix} -2 \\ -3 \end{bmatrix}}, works just as well, so pick small whole numbers.

Every curved path starting at (x0,y0)(\xvar{x_0}, \yvar{y_0}) is a combination of two straight-line motions: shrinking toward the origin as e−t\eigsecond{e^{-t}} along the [1−1]\eigsecond{\begin{bmatrix} 1 \\ -1 \end{bmatrix}} line while stretching away as e4t\eigfirst{e^{4t}} along the [23]\eigfirst{\begin{bmatrix} 2 \\ 3 \end{bmatrix}} line. Starting directly on either eigenvector line keeps the motion on that line forever.

Every trajectory in the plane is the sum of two straight-line motions along the eigenvector lines: one shrinking toward the origin and the other stretching away.
5

Finding the Eigenvalues of a 3×33 \times 3 Matrix

When a system has three variables x\xvar{x}, y\yvar{y}, and z\zvar{z} that depend on each other, the position vector [xyz]\begin{bmatrix} \xvar{x} \\ \yvar{y} \\ \zvar{z} \end{bmatrix} moves in 3D space, and we need the eigenvalues of a 3×33 \times 3 matrix:

A=[120112011]\displaystyle A = \begin{bmatrix} 1 & 2 & 0 \\ 1 & 1 & 2 \\ 0 & 1 & 1 \end{bmatrix}
Finding the Eigenvalues of a 3×3 Matrix
A=[120112011],λ=  ?\displaystyle A = \begin{bmatrix} 1 & 2 & 0 \\ 1 & 1 & 2 \\ 0 & 1 & 1 \end{bmatrix}, \qquad \lambda = \;?
A−λI=A - \lambda I =
++
−-
++
1−λ\htmlClass{lc-mute}{1 - \lambda}
22
0\htmlClass{lc-mute}{0}
11
1−λ\htmlClass{lc-mute}{1 - \lambda}
22
00
1\htmlClass{lc-mute}{1}
1−λ1 - \lambda
−2det⁡[1201−λ]-2\det\begin{bmatrix} 1 & 2 \\ 0 & 1 - \lambda \end{bmatrix}
Text solution
Expand det⁡(A−λI)=0\det(A - \lambda I) = 0 across the top rowSubtract λ\lambda from the diagonal and go across the top row with alternating signs +,−,++, -, +, multiplying each entry by the 2×22 \times 2 determinant left when its row and column are crossed out.
det⁡[1−λ2011−λ2011−λ]=+(1−λ)det⁡[1−λ211−λ]−2det⁡[1201−λ]+0det⁡[11−λ01]=(1−λ)[(1−λ)(1−λ)−(2)(1)]−2[(1)(1−λ)−(2)(0)]=0\displaystyle \begin{aligned} \det\begin{bmatrix} 1 - \lambda & 2 & 0 \\ 1 & 1 - \lambda & 2 \\ 0 & 1 & 1 - \lambda \end{bmatrix} &= +(1 - \lambda)\det\begin{bmatrix} 1 - \lambda & 2 \\ 1 & 1 - \lambda \end{bmatrix} - 2\det\begin{bmatrix} 1 & 2 \\ 0 & 1 - \lambda \end{bmatrix} + 0\det\begin{bmatrix} 1 & 1 - \lambda \\ 0 & 1 \end{bmatrix} \\ &= (1 - \lambda)\big[(1 - \lambda)(1 - \lambda) - (2)(1)\big] - 2\big[(1)(1 - \lambda) - (2)(0)\big] = 0 \end{aligned}
Multiply out the 2×22 \times 2 determinants into a cubicExpand the brackets and multiply by −1-1 to make the λ3\lambda^3 term positive.
(1−λ)(λ2−2λ−1)−2(1−λ)=0−λ3+3λ2+λ−3=0λ3−3λ2−λ+3=0\displaystyle \begin{aligned} (1 - \lambda)(\lambda^2 - 2\lambda - 1) - 2(1 - \lambda) &= 0 \\ -\lambda^3 + 3\lambda^2 + \lambda - 3 &= 0 \\ \lambda^3 - 3\lambda^2 - \lambda + 3 &= 0 \end{aligned}
Factor to find the three eigenvaluesFactor by grouping (or factor out the shared (1−λ)(1 - \lambda) term two lines up) to solve for λ\lambda.
λ2(λ−3)−1(λ−3)=0(λ−3)(λ2−1)=(λ−3)(λ−1)(λ+1)=0λ=3,λ=1,λ=−1\displaystyle \begin{aligned} \lambda^2\eigfirst{(\lambda - 3)} - 1\eigfirst{(\lambda - 3)} &= 0 \\ \eigfirst{(\lambda - 3)}(\lambda^2 - 1) &= \eigfirst{(\lambda - 3)}(\lambda - 1)(\lambda + 1) = 0 \\ \lambda = \eigfirst{3}, \quad \lambda &= 1, \quad \lambda = -1 \end{aligned}
6

Finding an Eigenvector in 3D by Intersecting Planes

Now let's find the 3D eigenvector [xyz]\begin{bmatrix} \xvar{x} \\ \yvar{y} \\ \zvar{z} \end{bmatrix} and straight-line solution for λ=3\lambda = \eigfirst{3}.

Finding an Eigenvector in 3D by Intersecting Planes
[1−λ2011−λ2011−λ][xyz]=[000]λ=3 ⁣:    [xyz]=  ?\displaystyle \begin{aligned} \begin{bmatrix} 1 - \lambda & 2 & 0 \\ 1 & 1 - \lambda & 2 \\ 0 & 1 & 1 - \lambda \end{bmatrix}\begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \\ \htmlClass{lc-violet}{z} \end{bmatrix} &= \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \\[6pt] \lambda = \htmlClass{lc-green}{3}\colon\;\; \begin{bmatrix} \htmlClass{lc-blue}{x} \\ \htmlClass{lc-orange}{y} \\ \htmlClass{lc-violet}{z} \end{bmatrix} &= \;? \end{aligned}
Row 1:−2x+2y=0Row 2:x−2y+2z=0Row 3:y−2z=0\begin{alignedat}{2} & \htmlClass{lc-blue}{\text{Row 1:}}\quad & {-2}\htmlClass{lc-blue}{x} + 2\htmlClass{lc-orange}{y} &= 0 \\ & \htmlClass{lc-orange}{\text{Row 2:}}\quad & \htmlClass{lc-blue}{x} - 2\htmlClass{lc-orange}{y} + 2\htmlClass{lc-violet}{z} &= 0 \\ & \htmlClass{lc-violet}{\text{Row 3:}}\quad & \htmlClass{lc-orange}{y} - 2\htmlClass{lc-violet}{z} &= 0 \end{alignedat}
Text solution
Plug λ=3\lambda = \eigfirst{3} into the diagonalSubstitute λ=3\lambda = \eigfirst{3} into A−λIA - \lambda I to get the equations for three planes through the origin.
[1−32011−32011−3][xyz]=[−2201−2201−2][xyz]=[000]\displaystyle \begin{aligned} \begin{bmatrix} 1 - \eigfirst{3} & 2 & 0 \\ 1 & 1 - \eigfirst{3} & 2 \\ 0 & 1 & 1 - \eigfirst{3} \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \\ \zvar{z} \end{bmatrix} &= \begin{bmatrix} -2 & 2 & 0 \\ 1 & -2 & 2 \\ 0 & 1 & -2 \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \\ \zvar{z} \end{bmatrix} \\ &= \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \end{aligned}
Use two rows to find the relationships between x\xvar{x}, y\yvar{y}, and z\zvar{z}Take the two rows that already have a zero (or eliminate one variable between two rows if none has a zero) to relate the variables.
Row 1:−2x+2y=0  ⟹  x=yRow 3:y−2z=0  ⟹  y=2z\displaystyle \begin{aligned} \xvar{\text{Row 1:}}\quad -2\xvar{x} + 2\yvar{y} &= 0 \implies \xvar{x} = \yvar{y} \\ \zvar{\text{Row 3:}}\quad \yvar{y} - 2\zvar{z} &= 0 \implies \yvar{y} = 2\zvar{z} \end{aligned}
Pick one nonzero value and check it in the third rowChoose z=1\zvar{z} = 1 to find y\yvar{y} and x\xvar{x}, verify that Row 2 gives 2−2(2)+2(1)=02 - 2(2) + 2(1) = 0, and write the straight-line solution.
z=1  ⟹  y=2(1)=2,x=y=2  ⟹  eigenvector [221],solution e3t[221]\displaystyle \begin{aligned} \zvar{z} = 1 &\implies \yvar{y} = 2(1) = 2, \quad \xvar{x} = \yvar{y} = 2 \\ &\implies \text{eigenvector } \eigfirst{\begin{bmatrix} 2 \\ 2 \\ 1 \end{bmatrix}}, \quad \text{solution } \eigfirst{e^{3t}\begin{bmatrix} 2 \\ 2 \\ 1 \end{bmatrix}} \end{aligned}
7

Multiplying Two Matrices Together

Instead of multiplying a matrix AA by one column vector at a time, we can put two column vectors side by side into a single matrix and multiply the two matrices together:

[1232][213−1]\displaystyle \begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix}\begin{bmatrix} \eigfirst{2} & \eigsecond{1} \\ \eigfirst{3} & \eigsecond{-1} \end{bmatrix}
Multiplying Two Matrices Together
[1232][213−1]=  ?\begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix}\begin{bmatrix} \htmlClass{lc-green}{2} & \htmlClass{lc-violet}{1} \\ \htmlClass{lc-green}{3} & \htmlClass{lc-violet}{-1} \end{bmatrix} = \;?
[23]\htmlClass{lc-green}{\begin{bmatrix} 2 \\ 3 \end{bmatrix}}
[1−1]\htmlClass{lc-violet}{\begin{bmatrix} 1 \\ -1 \end{bmatrix}}
x\htmlClass{lc-blue}{x}
y\htmlClass{lc-orange}{y}
Text solution
Multiply the left matrix by the first columnMultiply each row of the left matrix by [23]\eigfirst{\begin{bmatrix} 2 \\ 3 \end{bmatrix}} to get the first column of the answer.
[1232][23]=[1(2)+2(3)3(2)+2(3)]=[812]\displaystyle \begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix}\eigfirst{\begin{bmatrix} 2 \\ 3 \end{bmatrix}} = \begin{bmatrix} 1(\eigfirst{2}) + 2(\eigfirst{3}) \\ 3(\eigfirst{2}) + 2(\eigfirst{3}) \end{bmatrix} = \eigfirst{\begin{bmatrix} 8 \\ 12 \end{bmatrix}}
Multiply the left matrix by the second columnMultiply each row of the left matrix by [1−1]\eigsecond{\begin{bmatrix} 1 \\ -1 \end{bmatrix}} to get the second column, and put both output columns side by side.
[1232][213−1]=[1(2)+2(3)1(1)+2(−1)3(2)+2(3)3(1)+2(−1)]=[8−1121]\displaystyle \begin{aligned} \begin{bmatrix} 1 & 2 \\ 3 & 2 \end{bmatrix}\begin{bmatrix} \eigfirst{2} & \eigsecond{1} \\ \eigfirst{3} & \eigsecond{-1} \end{bmatrix} &= \begin{bmatrix} 1(\eigfirst{2}) + 2(\eigfirst{3}) & 1(\eigsecond{1}) + 2(\eigsecond{-1}) \\ 3(\eigfirst{2}) + 2(\eigfirst{3}) & 3(\eigsecond{1}) + 2(\eigsecond{-1}) \end{bmatrix} \\ &= \begin{bmatrix} \eigfirst{8} & \eigsecond{-1} \\ \eigfirst{12} & \eigsecond{1} \end{bmatrix} \end{aligned}

Because we multiply the rows of the left matrix by the columns of the right matrix, order matters: ABAB is usually not equal to BABA. The only matrix that leaves every matrix unchanged is the identity matrix I=[1001]I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}.

8

Finding the Inverse of a 2×22 \times 2 Matrix

The inverse of a matrix AA, written A−1A^{-1}, is the matrix that undoes AA so that multiplying them together gives the identity matrix, AA−1=[1001]AA^{-1} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}. (The −1-1 in A−1A^{-1} means the inverse matrix that undoes AA, not 1A\frac{1}{A}; we never write division by a matrix.) Let's see how the 2×22 \times 2 inverse works and find the inverse of B=[213−1]B = \begin{bmatrix} \eigfirst{2} & \eigsecond{1} \\ \eigfirst{3} & \eigsecond{-1} \end{bmatrix}.

Finding the Inverse of a 2×2 Matrix
5x=15A=[abcd]5−1=15A−1=  ?\displaystyle \begin{alignedat}{2} 5x &= 15 &\qquad A &= \begin{bmatrix} a & b \\ c & d \end{bmatrix} \\[6pt] 5^{-1} &= \frac{1}{5} &\qquad A^{-1} &= \;? \end{alignedat}

Swapping the main diagonal and negating the other diagonal makes the off-diagonal terms cancel to 00 and puts the determinant ad−bcad - bc on the main diagonal, so dividing by ad−bcad - bc leaves [1001]\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}:

A=[abcd]  ⟹  A−1=1ad−bc⏟divide by det⁡(A)[d−b−ca]⏟swap a,dnegate b,c\displaystyle A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} \implies A^{-1} = \underbrace{\frac{1}{ad - bc}}_{\text{divide by } \det(A)} \underbrace{\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}}_{\substack{\text{swap } a, d \\ \text{negate } b, c}}
Text solution
Find the determinantMultiply the main diagonal and subtract the other diagonal to make sure you aren't dividing by zero.
det⁡(B)\displaystyle \det(B) =(2)(−1)−(1)(3)\displaystyle = (\eigfirst{2})(\eigsecond{-1}) - (\eigsecond{1})(\eigfirst{3}) =−2−3\displaystyle = -2 - 3 =−5\displaystyle = -5
Swap the main diagonal, negate the other diagonal, and divide by det⁡(B)\det(B)Swap 2\eigfirst{2} and −1\eigsecond{-1}, flip the signs of 1\eigsecond{1} and 3\eigfirst{3}, and divide every entry by −5-5.
B−1=1−5[−1−1−32]=[151535−25]\displaystyle B^{-1} = \frac{1}{-5}\begin{bmatrix} -1 & -1 \\ -3 & 2 \end{bmatrix} = \begin{bmatrix} \tfrac{1}{5} & \tfrac{1}{5} \\ \tfrac{3}{5} & -\tfrac{2}{5} \end{bmatrix}

As long as the two column vectors of AA don't lie on the same line through the origin, the parallelogram between them has nonzero area ∣ad−bc∣|ad - bc| and A−1A^{-1} restores the original 2D grid; when the two columns lie on the same line, the area drops to zero (ad−bc=0ad - bc = 0), the entire plane collapses onto a line, and no inverse exists.

A matrix can undo its transformation and restore the grid as long as its two columns don't lie on the same line through the origin, because lining them up flattens the whole plane onto a single line with zero area and no inverse.

Key concepts

Recap: Matrices, Eigenvalues, and Eigenvectors
dx⃗dt=Ax⃗\displaystyle\htmlClass{lc-pink}{\frac{d\vec{x}}{dt}} = A\vec{x}
(1,0)(1, 0)
[13]\htmlClass{lc-pink}{\begin{bmatrix} 1 \\ 3 \end{bmatrix}}
x\htmlClass{lc-blue}{x}
y\htmlClass{lc-orange}{y}

Here is the full picture of how eigenvalues, eigenvectors, and matrices fit together to solve coupled systems.

9

Practice

1

Rewrite the coupled system dxdt=2x+y\xvar{\frac{dx}{dt}} = 2\xvar{x} + \yvar{y}, dydt=4x−y\yvar{\frac{dy}{dt}} = 4\xvar{x} - \yvar{y} as a matrix equation, and find the velocity vector at (1,2)(1, 2) and at (1,−4)(1, -4). Which of these two points lies on an eigenvector line, what is its eigenvalue, and what is the straight-line solution along that line?

Multiply the matrix by each position vector and check whether the output velocity vector is a single number λ\lambda times the input position vector.

The matrix equation is
[dxdtdydt]=[214−1][xy]\displaystyle \begin{bmatrix} \xvar{\tfrac{dx}{dt}} \\ \yvar{\tfrac{dy}{dt}} \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 4 & -1 \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix}
Testing the two points:
[214−1][12]=[42],[214−1][1−4]=[−28]=−2[1−4]\displaystyle \begin{aligned} \begin{bmatrix} 2 & 1 \\ 4 & -1 \end{bmatrix}\begin{bmatrix} 1 \\ 2 \end{bmatrix} &= \velocity{\begin{bmatrix} 4 \\ 2 \end{bmatrix}}, \\ \begin{bmatrix} 2 & 1 \\ 4 & -1 \end{bmatrix}\begin{bmatrix} 1 \\ -4 \end{bmatrix} &= \velocity{\begin{bmatrix} -2 \\ 8 \end{bmatrix}} = \eigfirst{-2}\eigfirst{\begin{bmatrix} 1 \\ -4 \end{bmatrix}} \end{aligned}
Watch out for two common mistakes here: at (1,2)(1, 2), the velocity [42]\velocity{\begin{bmatrix} 4 \\ 2 \end{bmatrix}} scales x\xvar{x} by 44 and y\yvar{y} by 11, so it is not a single multiple of [12]\begin{bmatrix} 1 \\ 2 \end{bmatrix} and the path curves off the line; at (1,−4)(1, -4), dropping the negative sign when comparing [−28]\velocity{\begin{bmatrix} -2 \\ 8 \end{bmatrix}} with [1−4]\begin{bmatrix} 1 \\ -4 \end{bmatrix} gives the wrong eigenvalue λ=2\lambda = 2 and wrong solution e2t[1−4]e^{2t}\begin{bmatrix} 1 \\ -4 \end{bmatrix}. The point (1,−4)\eigfirst{(1, -4)} lies on an eigenvector line with eigenvalue λ=−2\lambda = \eigfirst{-2} and straight-line solution e−2t[1−4]\eigfirst{e^{-2t}\begin{bmatrix} 1 \\ -4 \end{bmatrix}}.
2

Find the eigenvalues, eigenvectors, and general solution of the system dxdt=4x+y\xvar{\frac{dx}{dt}} = 4\xvar{x} + \yvar{y}, dydt=2x+3y\yvar{\frac{dy}{dt}} = 2\xvar{x} + 3\yvar{y}.

Set det⁡(A−λI)=0\det(A - \lambda I) = 0 to find the two values of λ\lambda, then plug each λ\lambda back into the diagonal of A−λIA - \lambda I to find a nonzero vector [xy]\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} that makes both row equations true.

Setting the determinant of A−λIA - \lambda I to zero:
det⁡[4−λ123−λ]=(4−λ)(3−λ)−2=λ2−7λ+10=(λ−5)(λ−2)=0\displaystyle \begin{aligned} \det\begin{bmatrix} 4 - \lambda & 1 \\ 2 & 3 - \lambda \end{bmatrix} &= (4 - \lambda)(3 - \lambda) - 2 \\ &= \lambda^2 - 7\lambda + 10 \\ &= \eigfirst{(\lambda - 5)}\eigsecond{(\lambda - 2)} = 0 \end{aligned}
So the eigenvalues are λ=5\lambda = \eigfirst{5} and λ=2\lambda = \eigsecond{2}. For λ=5\lambda = \eigfirst{5}, [−112−2][xy]=[00]\begin{bmatrix} -1 & 1 \\ 2 & -2 \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} gives −x+y=0-\xvar{x} + \yvar{y} = 0, so [11]\eigfirst{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} is an eigenvector. For λ=2\lambda = \eigsecond{2}, [2121][xy]=[00]\begin{bmatrix} 2 & 1 \\ 2 & 1 \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} gives 2x+y=02\xvar{x} + \yvar{y} = 0, or y=−2x\yvar{y} = -2\xvar{x}. Be careful not to read the row numbers [2,1][2, 1] directly as the eigenvector [21]\begin{bmatrix} 2 \\ 1 \end{bmatrix} (which gives 2(2)+1=5≠02(2) + 1 = 5 \neq 0 and the wrong solution c1e5t[11]+c2e2t[21]c_1 e^{5t}\begin{bmatrix} 1 \\ 1 \end{bmatrix} + c_2 e^{2t}\begin{bmatrix} 2 \\ 1 \end{bmatrix}); picking x=1\xvar{x} = 1 gives y=−2\yvar{y} = -2, so the eigenvector is [1−2]\eigsecond{\begin{bmatrix} 1 \\ -2 \end{bmatrix}} and the general solution is [x(t)y(t)]=c1e5t[11]+c2e2t[1−2]\begin{bmatrix} \xvar{x(t)} \\ \yvar{y(t)} \end{bmatrix} = \eigfirst{c_1 e^{5t}\begin{bmatrix} 1 \\ 1 \end{bmatrix}} + \eigsecond{c_2 e^{2t}\begin{bmatrix} 1 \\ -2 \end{bmatrix}}.
3

For the 3D system ddt[xyz]=[230422022][xyz]\frac{d}{dt}\begin{bmatrix} \xvar{x} \\ \yvar{y} \\ \zvar{z} \end{bmatrix} = \begin{bmatrix} 2 & 3 & 0 \\ 4 & 2 & 2 \\ 0 & 2 & 2 \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \\ \zvar{z} \end{bmatrix}, find all three eigenvalues, then find an eigenvector and the straight-line solution for the largest eigenvalue.

Expand det⁡(A−λI)=0\det(A - \lambda I) = 0 across the top row, keeping the shared (2−λ)(2 - \lambda) factor intact, and then use Row 1 and Row 3 of (A−6I)v=0(A - \eigfirst{6}I)v = 0 to relate x\xvar{x}, y\yvar{y}, and z\zvar{z}.

Expanding det⁡(A−λI)=0\det(A - \lambda I) = 0 across the top row:
(2−λ)[(2−λ)2−4]−3[4(2−λ)]+0=−λ3+6λ2+4λ−24=−(λ−6)(λ−2)(λ+2)=0\displaystyle \begin{aligned} (2 - \lambda)\big[(2 - \lambda)^2 - 4\big] - 3\big[4(2 - \lambda)\big] + 0 &= -\lambda^3 + 6\lambda^2 + 4\lambda - 24 \\ &= -\eigfirst{(\lambda - 6)}(\lambda - 2)(\lambda + 2) = 0 \end{aligned}
(Don't forget the alternating minus sign on the middle top-row entry 33; writing +3[4(2−λ)]+3[4(2 - \lambda)] turns the expression into (2−λ)[(2−λ)2+8]=0(2 - \lambda)[(2 - \lambda)^2 + 8] = 0 and misses λ=6\lambda = \eigfirst{6} and λ=−2\lambda = -2.) Thus λ=6,2,−2\lambda = \eigfirst{6}, 2, -2. Plugging the largest eigenvalue λ=6\lambda = \eigfirst{6} into the diagonal gives
[−4304−4202−4][xyz]=[000]\displaystyle \begin{bmatrix} -4 & 3 & 0 \\ 4 & -4 & 2 \\ 0 & 2 & -4 \end{bmatrix}\begin{bmatrix} \xvar{x} \\ \yvar{y} \\ \zvar{z} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
Row 1 gives −4x+3y=0-4\xvar{x} + 3\yvar{y} = 0 (4x=3y4\xvar{x} = 3\yvar{y}) and Row 3 gives 2y−4z=02\yvar{y} - 4\zvar{z} = 0 (y=2z\yvar{y} = 2\zvar{z}). Picking z=2\zvar{z} = 2 gives y=4\yvar{y} = 4; be careful in 4x=3y4\xvar{x} = 3\yvar{y} not to swap the numbers to get x=4\xvar{x} = 4 and y=3\yvar{y} = 3 (which gives the wrong eigenvector [432]\begin{bmatrix} 4 \\ 3 \\ 2 \end{bmatrix} and e6t[432]e^{6t}\begin{bmatrix} 4 \\ 3 \\ 2 \end{bmatrix}). Substituting y=4\yvar{y} = 4 into 4x=3y4\xvar{x} = 3\yvar{y} gives x=3\xvar{x} = 3, eigenvector [342]\eigfirst{\begin{bmatrix} 3 \\ 4 \\ 2 \end{bmatrix}}, and straight-line solution e6t[342]\eigfirst{e^{6t}\begin{bmatrix} 3 \\ 4 \\ 2 \end{bmatrix}}.
4

For A=[4123]A = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix} and B=[111−2]B = \begin{bmatrix} 1 & 1 \\ 1 & -2 \end{bmatrix}, compute both ABAB and BABA to verify that AB≠BAAB \neq BA.

Multiply each row of the left matrix by each column of the right matrix, one column at a time.

Multiplying the rows of the left matrix by the columns of the right matrix (rather than multiplying matching positions entry by entry, which falsely gives [412−6]\begin{bmatrix} 4 & 1 \\ 2 & -6 \end{bmatrix} for both):
AB=[4(1)+1(1)4(1)+1(−2)2(1)+3(1)2(1)+3(−2)]=[525−4],BA=[1(4)+1(2)1(1)+1(3)1(4)+(−2)(2)1(1)+(−2)(3)]=[640−5]\displaystyle \begin{aligned} AB &= \begin{bmatrix} 4(1) + 1(1) & 4(1) + 1(-2) \\ 2(1) + 3(1) & 2(1) + 3(-2) \end{bmatrix} = \begin{bmatrix} 5 & 2 \\ 5 & -4 \end{bmatrix}, \\ BA &= \begin{bmatrix} 1(4) + 1(2) & 1(1) + 1(3) \\ 1(4) + (-2)(2) & 1(1) + (-2)(3) \end{bmatrix} = \begin{bmatrix} 6 & 4 \\ 0 & -5 \end{bmatrix} \end{aligned}
So AB≠BAAB \neq BA.
5

Find the inverse of B=[111−2]B = \begin{bmatrix} 1 & 1 \\ 1 & -2 \end{bmatrix}, and find the value of kk for which C=[643k]C = \begin{bmatrix} 6 & 4 \\ 3 & k \end{bmatrix} has no inverse.

For B−1B^{-1}, swap the main diagonal, negate the other diagonal, and divide by det⁡(B)\det(B); for CC, set det⁡(C)=0\det(C) = 0.

For BB, det⁡(B)=(1)(−2)−(1)(1)=−3\det(B) = (1)(-2) - (1)(1) = -3. Swap the main diagonal entries 11 and −2-2 and negate the other diagonal entries (don't mix up the two diagonals by negating the main diagonal and swapping the other one, which gives the wrong inverse [13−13−13−23]\begin{bmatrix} \tfrac{1}{3} & -\tfrac{1}{3} \\ -\tfrac{1}{3} & -\tfrac{2}{3} \end{bmatrix}):
B−1=1−3[−2−1−11]=[231313−13]\displaystyle B^{-1} = \frac{1}{-3}\begin{bmatrix} -2 & -1 \\ -1 & 1 \end{bmatrix} = \begin{bmatrix} \tfrac{2}{3} & \tfrac{1}{3} \\ \tfrac{1}{3} & -\tfrac{1}{3} \end{bmatrix}
The matrix CC has no inverse when det⁡(C)=6k−(4)(3)=6k−12=0\det(C) = 6k - (4)(3) = 6k - 12 = 0 (subtracting the second diagonal product rather than adding 6k+12=06k + 12 = 0, which gives k=−2k = -2), so k=2k = 2.