MATH1231 4,733 words·24 min read

Eigenvalues and Eigenvectors

8.1 Definitions and examples#

So far in Linear Transformations we have studied linear maps T:V→WT : V \to W where the domain and codomain could be completely different spaces. In this chapter we specialise to the case T:V→VT : V \to V, where a vector and its image live in the same space, so that it actually makes sense to ask how T(v)T(\mathbf{v}) compares to v\mathbf{v} itself. Two questions drive everything that follows:

  1. Given a map TT, are there vectors v∈V\mathbf{v} \in V that are related in a very simple way to their images T(v)T(\mathbf{v})?
  2. [X] Is there a choice of basis for VV that makes the matrix representing TT take a very simple form?

The answer to both is yes, and remarkably it is the same answer. The simplest possible relationship between v\mathbf{v} and T(v)T(\mathbf{v}) is that they are parallel; TT does nothing to v\mathbf{v} except stretch it.

Note

Definition
Let T:V→VT : V \to V be a linear map. If a scalar λ\lambda and a non-zero vector v∈V\mathbf{v} \in V satisfy

T(v)=λv,T(\mathbf{v}) = \lambda \mathbf{v},

then λ\lambda is called an eigenvalue of TT and v\mathbf{v} is called an eigenvector of TT for the eigenvalue λ\lambda.

Basically, an eigenvector is a direction that the map leaves alone; every other vector gets rotated or sheared off into some new direction, but an eigenvector just gets scaled by λ\lambda. The whole power of the subject comes from the fact that if you can find enough of these directions to build a basis, then the map is nothing but a collection of independent stretches, which is about as simple as a linear map can get.

It is important to note the asymmetry in the definition: an eigenvector must be non-zero, but zero is perfectly allowed to be an eigenvalue. The reason for banning 0\mathbf{0} is that T(0)=λ0T(\mathbf{0}) = \lambda\mathbf{0} holds for every scalar λ\lambda, so if we allowed it then every number would be an eigenvalue of every map and the definition would say nothing at all. On the other hand λ=0\lambda = 0 is genuinely informative; it says exactly that ker⁡T≠{0}\ker T \neq \{\mathbf{0}\}, i.e. that TT is not one-to-one.

Example. For infinitely differentiable real-valued functions ff, the derivative

D(f)=f′,where f′(x)=dfdx for x∈R,D(f) = f', \quad \text{where } f'(x) = \frac{df}{dx} \text{ for } x \in \mathbb{R},

defines a linear map DD (we checked in Section 7.5 that differentiation is linear). The exponential function satisfies

D(eλx)=λeλx,D(e^{\lambda x}) = \lambda e^{\lambda x},

so eλxe^{\lambda x} is an eigenvector of DD with eigenvalue λ\lambda. Notice that this is not a curiosity; the enormous importance of exponentials in calculus is precisely that they are the only functions whose derivative is a multiple of themselves. Every time you solved dydx=ay\frac{dy}{dx} = ay in Ordinary Differential Equations and wrote down y=Ceaxy = Ce^{ax}, you were computing an eigenvector of DD.

Calculus is a very rich source of eigenvalue problems, but in this course we are mainly concerned with algebraic problems on finite-dimensional spaces. Those maps can always be represented by matrices, so from here on "eigenvalue" means "eigenvalue of a matrix".

There is one important piece of housekeeping first. When dealing with eigenvalues of matrices we are forced to use C\mathbb{C} as our field of scalars. The reason is that eigenvalues turn out to be the zeroes of a polynomial, and we can only be certain of finding zeroes when the polynomial is complex. So the natural scalar field here is C\mathbb{C} and the natural vector spaces are the complex spaces Cn\mathbb{C}^n from Section 6.1. Real matrices are still allowed; we just have to accept that a perfectly innocent real matrix can have complex eigenvalues, and refusing to look at them would leave the theory full of holes.

Note

Definition
Let A∈Mnn(C)A \in M_{nn}(\mathbb{C}) be a square matrix. If a scalar λ∈C\lambda \in \mathbb{C} and a non-zero vector v∈Cn\mathbf{v} \in \mathbb{C}^n satisfy

Av=λv,A\mathbf{v} = \lambda \mathbf{v},

then λ\lambda is an eigenvalue of AA and v\mathbf{v} is an eigenvector of AA for the eigenvalue λ\lambda.

Example. For the diagonal 2×22 \times 2 matrix

A=(λ100λ2),A = \begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix},

the standard basis vectors e1=(10)\mathbf{e}_1 = \begin{pmatrix} 1 \\ 0\end{pmatrix} and e2=(01)\mathbf{e}_2 = \begin{pmatrix} 0 \\ 1\end{pmatrix} satisfy

Ae1=(λ10)=λ1e1,Ae2=(0λ2)=λ2e2.\begin{align*} A\mathbf{e}_1 &= \begin{pmatrix} \lambda_1 \\ 0 \end{pmatrix} = \lambda_1 \mathbf{e}_1, \\ A\mathbf{e}_2 &= \begin{pmatrix} 0 \\ \lambda_2 \end{pmatrix} = \lambda_2 \mathbf{e}_2. \end{align*}

Therefore e1\mathbf{e}_1 is an eigenvector with eigenvalue λ1\lambda_1 and e2\mathbf{e}_2 is an eigenvector with eigenvalue λ2\lambda_2. Geometrically, if λ1=3\lambda_1 = 3 and λ2=−2\lambda_2 = -2, then this matrix stretches everything on the xx-axis by a factor of 33 and flips everything on the yy-axis while doubling its length; the two axes are the two eigen-directions. For a diagonal matrix the eigenvalues are just the diagonal entries and the standard basis vectors are the eigenvectors; there is nothing to calculate. This is the whole reason we will spend Section 8.2 trying to turn other matrices into diagonal ones.

Example. For the matrix and vector

A=(01000120−249),v=(1525),A = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 20 & -24 & 9\end{pmatrix}, \qquad \mathbf{v} = \begin{pmatrix} 1 \\ 5 \\ 25 \end{pmatrix},

direct multiplication gives

Av=(0(1)+1(5)+0(25)0(1)+0(5)+1(25)20(1)−24(5)+9(25))=(52520−120+225)=(525125)=5v.\begin{align*} A\mathbf{v} &= \begin{pmatrix} 0(1) + 1(5) + 0(25) \\ 0(1)+0(5)+1(25) \\ 20(1) -24(5) + 9(25) \end{pmatrix} \\ &= \begin{pmatrix} 5 \\ 25 \\ 20 - 120 + 225 \end{pmatrix} \\ &= \begin{pmatrix} 5 \\ 25 \\ 125 \end{pmatrix} \\ &= 5\mathbf{v}. \end{align*}

Therefore v\mathbf{v} is an eigenvector of AA for the eigenvalue λ=5\lambda = 5. Notice how cheap verifying an eigenvector is compared to finding one; it is one matrix-vector product. If a question hands you a candidate eigenvector, never go through the characteristic polynomial — just multiply.

8.1.1 Some fundamental results#

We now need a way of finding eigenvalues rather than checking them. The trick is to turn the eigenvector equation into a statement about a kernel, which is something we already know how to compute by row reduction.

Note

Theorem
A scalar λ\lambda is an eigenvalue of a square matrix AA if and only if

det⁡(A−λI)=0,\det(A - \lambda I) = 0,

and then v\mathbf{v} is an eigenvector of AA for λ\lambda if and only if v\mathbf{v} is a non-zero solution of the homogeneous equation (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}; that is, if and only if v∈ker⁡(A−λI)\mathbf{v} \in \ker(A - \lambda I) and v≠0\mathbf{v} \neq \mathbf{0}.

Proof. By definition, an eigenvalue λ\lambda and corresponding eigenvector v\mathbf{v} satisfy Av=λvA\mathbf{v} = \lambda\mathbf{v} with v≠0\mathbf{v} \neq \mathbf{0}. Rearranging,

0=Av−λv=Av−λIv(inserting I so we can factor)=(A−λI)v,\begin{align*} \mathbf{0} &= A\mathbf{v} - \lambda\mathbf{v} \\ &= A\mathbf{v} - \lambda I \mathbf{v} \quad (\text{inserting } I \text{ so we can factor}) \\ &= (A - \lambda I)\mathbf{v}, \end{align*}

where II is the identity matrix of the same size as AA. Now A−λIA - \lambda I is a square matrix, and a square homogeneous system has a non-zero solution if and only if its determinant vanishes. Hence λ\lambda is an eigenvalue if and only if det⁡(A−λI)=0\det(A - \lambda I) = 0. Given that, v\mathbf{v} is an eigenvector precisely when it is a non-zero solution of that homogeneous system, i.e. precisely when v∈ker⁡(A−λI)∖{0}\mathbf{v} \in \ker(A - \lambda I) \setminus \{\mathbf{0}\}. ■\blacksquare

The insertion of II in the second line is the single most important step in this chapter, and it is the step students most often get wrong. You cannot write Av−λv=(A−λ)vA\mathbf{v} - \lambda\mathbf{v} = (A - \lambda)\mathbf{v}, because A−λA - \lambda is a matrix minus a scalar, which is meaningless. You must turn λ\lambda into λI\lambda I first.

Basically, this theorem converts an eigenvalue problem into two things we already know how to do: computing a determinant, and computing a kernel. It also tells us something structurally nice. The set of eigenvectors for λ\lambda, together with 0\mathbf{0}, is exactly ker⁡(A−λI)\ker(A - \lambda I), and a kernel is a subspace by the theorem in Section 7.4.1.

Note

Definition
For an eigenvalue λ\lambda of AA, the subspace ker⁡(A−λI)\ker(A - \lambda I) is called the eigenspace of AA for λ\lambda.

So an eigenvalue never has just one eigenvector; it has a whole subspace of them (minus the origin), and in particular there are always infinitely many. When we "write down the eigenvector for λ\lambda" we are really recording a basis for the eigenspace, and any non-zero multiple of it would have done just as well. Do not be alarmed if your eigenvector is a different multiple from the answer in the back of the book; check whether the two are parallel before assuming you are wrong.

Note

Theorem
If AA is an n×nn \times n matrix and λ∈C\lambda \in \mathbb{C}, then det⁡(A−λI)\det(A - \lambda I) is a complex polynomial of degree nn in λ\lambda.

This can be proved by direct expansion of the determinant; it is straightforward but tedious, so we will just look at the n=3n = 3 case to see why it happens. We have

A−λI=(a11a12a13a21a22a23a31a32a33)−λ(100010001)=(a11−λa12a13a21a22−λa23a31a32a33−λ),A - \lambda I = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix} - \lambda \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} = \begin{pmatrix} a_{11} - \lambda & a_{12} & a_{13} \\ a_{21} & a_{22} - \lambda & a_{23} \\ a_{31} & a_{32} & a_{33} - \lambda \end{pmatrix},

and expanding along the first column,

det⁡(A−λI)=(a11−λ)[(a22−λ)(a33−λ)−a32a23]−a21[a12(a33−λ)−a32a13]+a31[a12a23−(a22−λ)a13]=−λ3+(terms in λ2,λ and constants).\begin{align*} \det(A - \lambda I) &= (a_{11} - \lambda)\big[(a_{22}-\lambda)(a_{33}-\lambda) - a_{32}a_{23}\big] \\ &\quad - a_{21}\big[a_{12}(a_{33}-\lambda) - a_{32}a_{13}\big] + a_{31}\big[a_{12}a_{23} - (a_{22}-\lambda)a_{13}\big] \\ &= -\lambda^3 + (\text{terms in } \lambda^2, \lambda \text{ and constants}). \end{align*}

Notice where the λ3\lambda^3 comes from: only the product of the three diagonal entries contributes a λ3\lambda^3 term, and it arrives with a sign of (−1)3(-1)^3. In general the leading term is (−1)nλn(-1)^n\lambda^n, which is why the degree is exactly nn and never less.

Note

Definition
For a square matrix AA, the polynomial p(λ)=det⁡(A−λI)p(\lambda) = \det(A - \lambda I) is called the characteristic polynomial of AA, and the equation p(λ)=0p(\lambda) = 0 is called the characteristic equation of AA.

Example. Find the characteristic polynomial of

A=(1−123−4−1512).A = \begin{pmatrix} 1 & -1 & 2 \\ 3 & -4 & -1 \\ 5 & 1 & 2 \end{pmatrix}.

Subtracting λ\lambda from each diagonal entry and expanding along the first row,

p(λ)=∣1−λ−123−4−λ−1512−λ∣=(1−λ)[(−4−λ)(2−λ)+1]+1[3(2−λ)+5]+2[3+5(4+λ)]=(1−λ)(λ2+2λ−7)+(11−3λ)+(46+10λ)=−λ3−λ2+9λ−7+57+7λ=−λ3−λ2+16λ+50.\begin{align*} p(\lambda) &= \begin{vmatrix} 1-\lambda & -1 & 2 \\ 3 & -4-\lambda & -1 \\ 5 & 1 & 2-\lambda \end{vmatrix} \\ &= (1-\lambda)\big[(-4-\lambda)(2-\lambda) + 1\big] + 1\big[3(2-\lambda)+5\big] + 2\big[3 + 5(4+\lambda)\big] \\ &= (1-\lambda)(\lambda^2 + 2\lambda - 7) + (11 - 3\lambda) + (46 + 10\lambda) \\ &= -\lambda^3 - \lambda^2 + 9\lambda - 7 + 57 + 7\lambda \\ &= -\lambda^3 - \lambda^2 + 16\lambda + 50. \end{align*}

Therefore the characteristic polynomial is p(λ)=−λ3−λ2+16λ+50p(\lambda) = -\lambda^3 - \lambda^2 + 16\lambda + 50. A useful sanity check at this point: the coefficient of λn−1\lambda^{n-1} is always (−1)n−1tr⁡(A)(-1)^{n-1}\operatorname{tr}(A), the sum of the diagonal entries, and p(0)=det⁡Ap(0) = \det A. Here tr⁡(A)=1−4+2=−1\operatorname{tr}(A) = 1 - 4 + 2 = -1, matching the −λ2-\lambda^2 term, and p(0)=50=det⁡Ap(0) = 50 = \det A. If either check fails you have made an arithmetic slip; this catches errors far faster than redoing the expansion.

Note

Theorem
An n×nn \times n matrix AA has exactly nn eigenvalues in C\mathbb{C}, counted according to their multiplicities. These eigenvalues are the zeroes of the characteristic polynomial p(λ)=det⁡(A−λI)p(\lambda) = \det(A - \lambda I).
Proof. The characteristic polynomial has degree nn over C\mathbb{C} by the previous theorem, so by the Factorisation Theorem for complex polynomials it has exactly nn zeroes counted with multiplicity. By the fundamental theorem above, those zeroes are exactly the eigenvalues of AA. ■\blacksquare

This is where the insistence on complex scalars pays off. Over R\mathbb{R} the statement is simply false — a rotation matrix has no real eigenvalues at all — but over C\mathbb{C} every n×nn \times n matrix has its full complement of nn eigenvalues, no exceptions.

Example. For the matrix AA of the previous example, the roots of −λ3−λ2+16λ+50=0-\lambda^3 - \lambda^2 + 16\lambda + 50 = 0 are, to four significant figures, 4.6884.688, −2.844+1.605i-2.844 + 1.605i and −2.844−1.605i-2.844 - 1.605i, and these are the three eigenvalues of AA.

You are not expected to solve nasty cubics like that by hand; note the complex pair appearing as conjugates, which always happens when the matrix has real entries. The theorem is of enormous theoretical importance because it guarantees eigenvalues exist, but with the exception of 2×22 \times 2 matrices and specially constructed larger ones, modern numerical methods for finding eigenvalues do not go anywhere near the characteristic polynomial — they are iterative, and vastly more stable.

8.1.2 Calculation of eigenvalues and eigenvectors#

The working method is now fixed, and every exam question in this chapter follows it:

  • Form A−λIA - \lambda I by subtracting λ\lambda from each diagonal entry.
  • Compute p(λ)=det⁡(A−λI)p(\lambda) = \det(A - \lambda I) and solve p(λ)=0p(\lambda) = 0 for the eigenvalues.
  • For each eigenvalue λi\lambda_i in turn, row reduce A−λiIA - \lambda_i I and find a basis for ker⁡(A−λiI)\ker(A - \lambda_i I).

Example. Find the eigenvalues and eigenvectors of A=(2222)A = \begin{pmatrix} 2 & 2 \\ 2 & 2 \end{pmatrix}.
The characteristic polynomial is

p(λ)=∣2−λ222−λ∣=(2−λ)2−4=λ2−4λ=λ(λ−4),\begin{align*} p(\lambda) &= \begin{vmatrix} 2 - \lambda & 2 \\ 2 & 2-\lambda \end{vmatrix} \\ &= (2-\lambda)^2 - 4 \\ &= \lambda^2 - 4\lambda \\ &= \lambda(\lambda - 4), \end{align*}

so the eigenvalues are λ1=0\lambda_1 = 0 and λ2=4\lambda_2 = 4. As promised, a 2×22\times 2 matrix has two of them.

For λ1=0\lambda_1 = 0 the eigenvectors are the non-zero vectors of ker⁡(A−0I)=ker⁡A\ker(A - 0I) = \ker A. Row reducing,

(22∣022∣0)→R2=R2−R1(22∣000∣0),\begin{pmatrix} 2 & 2 & \big| & 0 \\ 2 & 2 & \big| & 0 \end{pmatrix} \xrightarrow{R_2 = R_2 - R_1} \begin{pmatrix} 2 & 2 & \big| & 0 \\ 0 & 0 & \big| & 0 \end{pmatrix},

so 2v1+2v2=02v_1 + 2v_2 = 0, giving v1=−v2v_1 = -v_2 and

ker⁡A=span⁡{(−11)}.\ker A = \operatorname{span}\left\{ \begin{pmatrix} -1 \\ 1\end{pmatrix} \right\}.

For λ2=4\lambda_2 = 4 we have A−4I=(−222−2)A - 4I = \begin{pmatrix} -2 & 2 \\ 2 & -2\end{pmatrix}, which row reduces to a single equation −2v1+2v2=0-2v_1 + 2v_2 = 0, so v1=v2v_1 = v_2 and

ker⁡(A−4I)=span⁡{(11)}.\ker(A - 4I) = \operatorname{span}\left\{ \begin{pmatrix} 1 \\ 1\end{pmatrix}\right\}.

Therefore the eigenvalues are 00 and 44, with eigenvectors t(−11)t\begin{pmatrix}-1\\1\end{pmatrix} and t(11)t\begin{pmatrix}1\\1\end{pmatrix} respectively, for any t≠0t \neq 0. Notice that λ=0\lambda = 0 being an eigenvalue is exactly the statement that AA is singular, which it obviously is — its two rows are identical.

Since 00 turning up as an eigenvalue keeps happening, it is worth boxing the general principle:

λ=0 is an eigenvalue of A  ⟺  ker⁡A≠{0}  ⟺  det⁡A=0  ⟺  A is not invertible.\boxed{\lambda = 0 \text{ is an eigenvalue of } A \iff \ker A \neq \{\mathbf{0}\} \iff \det A = 0 \iff A \text{ is not invertible.}}

Example. Find the eigenvalues and eigenvectors of A=(21−14)A = \begin{pmatrix} 2 & 1 \\ -1 & 4\end{pmatrix}.
The characteristic equation is

∣2−λ1−14−λ∣=(2−λ)(4−λ)+1=λ2−6λ+9=(λ−3)2=0,\begin{align*} \begin{vmatrix} 2-\lambda & 1 \\ -1 & 4 - \lambda\end{vmatrix} &= (2-\lambda)(4-\lambda) + 1 \\ &= \lambda^2 - 6\lambda + 9 \\ &= (\lambda - 3)^2 = 0, \end{align*}

so there is a single eigenvalue λ=3\lambda = 3, of multiplicity 22. For its eigenvectors,

A−3I=(−11−11),A - 3I = \begin{pmatrix} -1 & 1 \\ -1 & 1 \end{pmatrix},

whose rows are identical, so the system collapses to −v1+v2=0-v_1 + v_2 = 0 and

ker⁡(A−3I)=span⁡{(11)}.\ker(A - 3I) = \operatorname{span}\left\{ \begin{pmatrix} 1 \\ 1 \end{pmatrix}\right\}.

Therefore the only eigenvalue is 33 and its eigenvectors are t(11)t\begin{pmatrix}1\\1\end{pmatrix} for t≠0t \neq 0. Here the eigenvalue has multiplicity 22 as a root, but its eigenspace is only 11-dimensional; there is nowhere near enough eigenvectors to build a basis for C2\mathbb{C}^2.

Note

Definition
A square matrix with fewer linearly independent eigenvectors than it has columns is called a defective matrix.

The two multiplicities involved here have names, and telling them apart is the single most examinable distinction in the chapter.

Note

Definition
For an eigenvalue λ\lambda of AA, the algebraic multiplicity of λ\lambda is its multiplicity as a root of the characteristic polynomial, and the geometric multiplicity of λ\lambda is dim⁡ker⁡(A−λI)\dim \ker(A - \lambda I), the dimension of its eigenspace.

Basically, the algebraic multiplicity is how many times the eigenvalue was promised to you by the characteristic polynomial, and the geometric multiplicity is how many independent eigenvectors actually turned up. It is always true that

1≤geometric multiplicity≤algebraic multiplicity,1 \leq \text{geometric multiplicity} \leq \text{algebraic multiplicity},

and a matrix is defective exactly when the inequality on the right is strict for at least one eigenvalue. In the example above, λ=3\lambda = 3 had algebraic multiplicity 22 but geometric multiplicity 11, so the matrix is defective.

A repeated eigenvalue does not automatically mean the matrix is defective. The next two examples show both outcomes, and the only way to tell is to actually compute the eigenspace.

Example. The matrix A=(3003)=3IA = \begin{pmatrix} 3 & 0 \\ 0 & 3\end{pmatrix} = 3I has characteristic polynomial (3−λ)2(3-\lambda)^2, so λ=3\lambda = 3 with algebraic multiplicity 22. But A−3IA - 3I is the zero matrix, so ker⁡(A−3I)=C2\ker(A - 3I) = \mathbb{C}^2 and

ker⁡(A−3I)=span⁡{(10),(01)}\ker(A - 3I) = \operatorname{span}\left\{\begin{pmatrix}1\\0\end{pmatrix}, \begin{pmatrix}0\\1\end{pmatrix}\right\}

is 22-dimensional. Therefore the geometric and algebraic multiplicities agree at 22 and the matrix is not defective — indeed every non-zero vector is an eigenvector, since 3I3I scales everything equally.

Example. Find the eigenvalues and eigenspaces of

A=(2−1−1−12−1−1−12),A = \begin{pmatrix} 2 & -1 & -1 \\ -1 & 2 & -1 \\ -1 & -1 & 2\end{pmatrix},

and determine whether AA is defective.
Rather than expand a 3×33\times 3 determinant, notice that A=3I−JA = 3I - J where JJ is the 3×33\times 3 matrix of all ones. Every row of AA sums to 00, so

A(111)=(000)=0(111),A\begin{pmatrix}1\\1\\1\end{pmatrix} = \begin{pmatrix}0\\0\\0\end{pmatrix} = 0\begin{pmatrix}1\\1\\1\end{pmatrix},

giving the eigenvalue λ1=0\lambda_1 = 0 with eigenvector (1,1,1)T(1,1,1)^T for free. For the rest, A−3I=−JA - 3I = -J, so

ker⁡(A−3I)=ker⁡J={v:v1+v2+v3=0},\ker(A - 3I) = \ker J = \left\{ \mathbf{v} : v_1 + v_2 + v_3 = 0 \right\},

which is a single equation in three unknowns and hence a 22-dimensional subspace with basis

(1−10),(10−1).\begin{pmatrix} 1 \\ -1 \\ 0\end{pmatrix}, \quad \begin{pmatrix} 1 \\ 0 \\ -1 \end{pmatrix}.

Checking one of them, A(1,−1,0)T=(2+1+0, −1−2+0, −1+1+0)T=(3,−3,0)T=3(1,−1,0)TA(1,-1,0)^T = (2+1+0,\ -1-2+0,\ -1+1+0)^T = (3,-3,0)^T = 3(1,-1,0)^T, as required. So the eigenvalues are 00 (algebraic and geometric multiplicity 11) and 33 (algebraic and geometric multiplicity 22), and since we have found 1+2=31 + 2 = 3 linearly independent eigenvectors, AA is not defective. Therefore AA has a repeated eigenvalue and is still perfectly well behaved; contrast this with the earlier (21−14)\begin{pmatrix}2&1\\-1&4\end{pmatrix}, where the repeated eigenvalue only produced one direction.

Example. Find all eigenvalues and eigenvectors of A=(12−21)A = \begin{pmatrix} 1 & 2 \\ -2 & 1 \end{pmatrix}.
The characteristic equation is

∣1−λ2−21−λ∣=(1−λ)2+4=λ2−2λ+5=0,\begin{align*} \begin{vmatrix} 1 - \lambda & 2 \\ -2 & 1 - \lambda \end{vmatrix} &= (1-\lambda)^2 + 4 \\ &= \lambda^2 - 2\lambda + 5 = 0, \end{align*}

whose roots are

λ=2±4−202=2±4i2=1±2i.\lambda = \frac{2 \pm \sqrt{4 - 20}}{2} = \frac{2 \pm 4i}{2} = 1 \pm 2i.

So λ1=1+2i\lambda_1 = 1 + 2i and λ2=1−2i\lambda_2 = 1 - 2i. For λ1\lambda_1,

A−(1+2i)I=(−2i2−2−2i),A - (1+2i)I = \begin{pmatrix} -2i & 2 \\ -2 & -2i \end{pmatrix},

and row reducing (multiply row 1 by −1i=i\frac{-1}{i} = i to get (2,2i)(2, 2i), which is −1-1 times row 2) gives the single equation −2iv1+2v2=0-2iv_1 + 2v_2 = 0, i.e. v2=iv1v_2 = iv_1. Taking v1=−iv_1 = -i gives v2=i(−i)=1v_2 = i(-i) = 1, so

v1=(−i1).\mathbf{v}_1 = \begin{pmatrix} -i \\ 1 \end{pmatrix}.

Checking, Av1=(−i+2, 2i+1)TA\mathbf{v}_1 = (-i + 2,\ 2i + 1)^T and (1+2i)(−i,1)T=(−i−2i2, 1+2i)T=(2−i, 1+2i)T(1+2i)(-i, 1)^T = (-i - 2i^2,\ 1 + 2i)^T = (2 - i,\ 1+2i)^T, which agree. Therefore the eigenvectors for 1+2i1 + 2i are t(−i,1)Tt(-i, 1)^T, and for 1−2i1 - 2i they are t(i,1)Tt(i, 1)^T — taking complex conjugates of both the eigenvalue and the eigenvector, which always works for a real matrix and saves you doing the second calculation.

Example. Find the eigenvalues and eigenvectors of the lower triangular matrix

A=(200130014).A = \begin{pmatrix} 2 & 0 & 0 \\ 1 & 3 & 0 \\ 0 & 1 & 4 \end{pmatrix}.

Since A−λIA - \lambda I is still lower triangular, its determinant is just the product of the diagonal entries:

p(λ)=(2−λ)(3−λ)(4−λ),p(\lambda) = (2-\lambda)(3-\lambda)(4-\lambda),

so the eigenvalues are 2,3,42, 3, 4. For any triangular matrix — upper or lower — the eigenvalues are exactly the diagonal entries, so never expand the determinant. For the eigenvectors:

For λ=4\lambda = 4: A−4I=(−2001−10010)A - 4I = \begin{pmatrix} -2&0&0\\1&-1&0\\0&1&0\end{pmatrix}. Row 1 gives v1=0v_1 = 0, then row 2 gives v2=v1=0v_2 = v_1 = 0, and v3v_3 is free; so v=(0,0,1)T\mathbf{v} = (0,0,1)^T.

For λ=3\lambda = 3: A−3I=(−100100011)A - 3I = \begin{pmatrix} -1&0&0\\1&0&0\\0&1&1\end{pmatrix}. Row 1 gives v1=0v_1 = 0 and row 3 gives v3=−v2v_3 = -v_2; so v=(0,1,−1)T\mathbf{v} = (0,1,-1)^T.

For λ=2\lambda = 2: A−2I=(000110012)A - 2I = \begin{pmatrix} 0&0&0\\1&1&0\\0&1&2\end{pmatrix}. Row 2 gives v1=−v2v_1 = -v_2 and row 3 gives v2=−2v3v_2 = -2v_3; taking v3=1v_3 = 1 gives v2=−2v_2 = -2, v1=2v_1 = 2, so v=(2,−2,1)T\mathbf{v} = (2,-2,1)^T.

Checking the last one, A(2,−2,1)T=(4, 2−6, −2+4)T=(4,−4,2)T=2(2,−2,1)TA(2,-2,1)^T = (4,\ 2-6,\ -2+4)^T = (4,-4,2)^T = 2(2,-2,1)^T. Therefore the eigenvalues are 2,3,42, 3, 4 with eigenvectors (2,−2,1)T(2,-2,1)^T, (0,1,−1)T(0,1,-1)^T and (0,0,1)T(0,0,1)^T.

Before moving on it is worth cataloguing what can happen for a real 2×22\times 2 matrix, since the characteristic polynomial is then a real quadratic and there are only three possibilities:

Discriminant Eigenvalues Example above
>0> 0 two distinct real eigenvalues (2222)\begin{pmatrix}2&2\\2&2\end{pmatrix}, eigenvalues 0,40, 4
=0= 0 one real eigenvalue of multiplicity 22 (21−14)\begin{pmatrix}2&1\\-1&4\end{pmatrix} and 3I3I
<0< 0 a conjugate pair of complex eigenvalues (12−21)\begin{pmatrix}1&2\\-2&1\end{pmatrix}, eigenvalues 1±2i1 \pm 2i

Notice that the middle row splits further depending on whether the matrix is defective, which the discriminant alone cannot tell you.

8.2 Eigenvectors, bases, and diagonalisation#

In every example of the last section except the defective one, a 2×22\times 2 matrix gave us two linearly independent eigenvectors — and two independent vectors in C2\mathbb{C}^2 form a basis for C2\mathbb{C}^2, by the results of Section 6.6. That is exactly the situation we want, so let us find out when it happens.

Note

Theorem
If an n×nn \times n matrix has nn distinct eigenvalues, then it has nn linearly independent eigenvectors.

[X] Proof. Let the distinct eigenvalues be λ1,…,λn\lambda_1, \dots, \lambda_n with corresponding eigenvectors v1,…,vn\mathbf{v}_1, \dots, \mathbf{v}_n, and suppose

μ1v1+μ2v2+⋯+μnvn=0.(*)\mu_1\mathbf{v}_1 + \mu_2\mathbf{v}_2 + \cdots + \mu_n\mathbf{v}_n = \mathbf{0}. \tag{*}

We show μ1=0\mu_1 = 0; the same argument with the indices permuted gives μ2=⋯=μn=0\mu_2 = \cdots = \mu_n = 0, which is exactly linear independence.

Apply the matrix (A−λ2I)(A−λ3I)⋯(A−λnI)(A - \lambda_2 I)(A - \lambda_3 I)\cdots(A - \lambda_n I) to both sides of (∗)(\ast). For any eigenvector vj\mathbf{v}_j we have (A−λiI)vj=(λj−λi)vj(A - \lambda_i I)\mathbf{v}_j = (\lambda_j - \lambda_i)\mathbf{v}_j, so the whole product acts on vj\mathbf{v}_j as multiplication by (λj−λ2)(λj−λ3)⋯(λj−λn)(\lambda_j - \lambda_2)(\lambda_j - \lambda_3)\cdots(\lambda_j - \lambda_n). If j≠1j \neq 1 then one of those brackets is (λj−λj)=0(\lambda_j - \lambda_j) = 0, so every term except the first is annihilated. What survives is

μ1(λ1−λ2)(λ1−λ3)⋯(λ1−λn)v1=0.\mu_1(\lambda_1 - \lambda_2)(\lambda_1 - \lambda_3)\cdots(\lambda_1 - \lambda_n)\mathbf{v}_1 = \mathbf{0}.

The eigenvalues are distinct, so every bracket is non-zero, and v1≠0\mathbf{v}_1 \neq \mathbf{0} because it is an eigenvector. Hence μ1=0\mu_1 = 0. ■\blacksquare

The converse of this theorem is false, and assuming otherwise is the classic error. Distinct eigenvalues are sufficient for a full set of independent eigenvectors but not necessary — the matrix 3I−J3I - J above had a repeated eigenvalue and still gave three independent eigenvectors. What we actually need is stated next.

Note

Theorem
If an n×nn\times n matrix AA has nn linearly independent eigenvectors, then there exists an invertible matrix MM and a diagonal matrix DD such that

M−1AM=D.M^{-1}AM = D.

Further, the diagonal entries of DD are the eigenvalues of AA and the columns of MM are the corresponding eigenvectors, the jjth column of MM being an eigenvector for the jjth diagonal entry of DD. Conversely, if M−1AM=DM^{-1}AM = D with DD diagonal, then the columns of MM are nn linearly independent eigenvectors of AA.

[X] Proof. Let v1,…,vn\mathbf{v}_1, \dots, \mathbf{v}_n be nn linearly independent eigenvectors and form the matrix MM with these as its columns,

M=(v1v2⋯vn).M = \begin{pmatrix} \mathbf{v}_1 & \mathbf{v}_2 & \cdots & \mathbf{v}_n \end{pmatrix}.

Multiplying a matrix on the right by MM acts column by column, so

AM=(Av1Av2⋯Avn)=(λ1v1λ2v2⋯λnvn)(using Avi=λivi)=(v1v2⋯vn)(λ1λ2⋱λn)=MD.\begin{align*} AM &= \begin{pmatrix} A\mathbf{v}_1 & A\mathbf{v}_2 & \cdots & A\mathbf{v}_n\end{pmatrix} \\ &= \begin{pmatrix} \lambda_1\mathbf{v}_1 & \lambda_2\mathbf{v}_2 & \cdots & \lambda_n\mathbf{v}_n \end{pmatrix} \quad (\text{using } A\mathbf{v}_i = \lambda_i\mathbf{v}_i) \\ &= \begin{pmatrix} \mathbf{v}_1 & \mathbf{v}_2 & \cdots & \mathbf{v}_n\end{pmatrix}\begin{pmatrix} \lambda_1 & & & \\ & \lambda_2 & & \\ & & \ddots & \\ & & & \lambda_n\end{pmatrix} \\ &= MD. \end{align*}

Since the columns of MM are a basis for Cn\mathbb{C}^n, the system Mx=bM\mathbf{x} = \mathbf{b} has a unique solution for every b\mathbf{b}, so MM is invertible. Multiplying AM=MDAM = MD on the left by M−1M^{-1} gives M−1AM=DM^{-1}AM = D.

Conversely, if M−1AM=DM^{-1}AM = D then AM=MDAM = MD, and comparing the jjth columns of each side gives Avj=λjvjA\mathbf{v}_j = \lambda_j \mathbf{v}_j; so each column of MM is an eigenvector. Finally, the columns of an invertible matrix are always linearly independent. ■\blacksquare

Look carefully at the third line of that proof, because it is where the ordering rule comes from. The jjth column of MM must be an eigenvector for the jjth diagonal entry of DD; if you shuffle the eigenvalues in DD without shuffling the columns of MM to match, the result is simply wrong. This is the most common way to lose marks in this chapter.

Note

Definition
A square matrix AA is diagonalisable if there exists an invertible matrix MM and a diagonal matrix DD with M−1AM=DM^{-1}AM = D.

Combining the two theorems gives the practical criterion:

A is diagonalisable  ⟺  A has n linearly independent eigenvectors  ⟺  A is not defective.\boxed{A \text{ is diagonalisable} \iff A \text{ has } n \text{ linearly independent eigenvectors} \iff A \text{ is not defective.}}

In terms of the two multiplicities, AA is diagonalisable precisely when the geometric multiplicity equals the algebraic multiplicity for every eigenvalue, since the geometric multiplicities are exactly the number of independent eigenvectors each eigenvalue contributes and the algebraic ones always add up to nn.

Example. Show that A=(3223)A = \begin{pmatrix} 3 & 2 \\ 2 & 3\end{pmatrix} is diagonalisable and find MM and DD with M−1AM=DM^{-1}AM = D.
The characteristic equation is

(3−λ)2−4=0λ2−6λ+5=0(λ−5)(λ−1)=0,\begin{align*} (3-\lambda)^2 - 4 &= 0 \\ \lambda^2 - 6\lambda + 5 &= 0 \\ (\lambda - 5)(\lambda - 1) &= 0, \end{align*}

so λ1=5\lambda_1 = 5 and λ2=1\lambda_2 = 1. For λ1=5\lambda_1 = 5, A−5I=(−222−2)A - 5I = \begin{pmatrix}-2&2\\2&-2\end{pmatrix} gives v1=v2v_1 = v_2, so v1=(1,1)T\mathbf{v}_1 = (1,1)^T. For λ2=1\lambda_2 = 1, A−I=(2222)A - I = \begin{pmatrix}2&2\\2&2\end{pmatrix} gives v1=−v2v_1 = -v_2, so v2=(1,−1)T\mathbf{v}_2 = (1,-1)^T. These are linearly independent — guaranteed in advance by the distinct-eigenvalues theorem, since 5≠15 \neq 1 — so AA is diagonalisable with

D=(5001),M=(111−1).D = \begin{pmatrix} 5 & 0 \\ 0 & 1\end{pmatrix}, \qquad M = \begin{pmatrix} 1 & 1 \\ 1 & -1\end{pmatrix}.

Checking directly, det⁡M=−2\det M = -2 so M−1=12(111−1)M^{-1} = \frac{1}{2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}, and

M−1AM=12(111−1)(3223)(111−1)=12(111−1)(515−1)=12(10002)=(5001)=D.\begin{align*} M^{-1}AM &= \frac{1}{2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}\begin{pmatrix}3&2\\2&3\end{pmatrix}\begin{pmatrix}1&1\\1&-1\end{pmatrix} \\ &= \frac{1}{2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}\begin{pmatrix}5&1\\5&-1\end{pmatrix} \\ &= \frac{1}{2}\begin{pmatrix}10&0\\0&2\end{pmatrix} \\ &= \begin{pmatrix}5&0\\0&1\end{pmatrix} = D. \end{align*}

Therefore AA is diagonalisable with the MM and DD above.

The choice of MM and DD is never unique. We could have listed the eigenvalues the other way round, taking

D=(1005),M=(11−11),D = \begin{pmatrix}1&0\\0&5\end{pmatrix}, \qquad M = \begin{pmatrix}1&1\\-1&1\end{pmatrix},

and any non-zero multiple of any column of MM also works, since non-zero multiples of eigenvectors are eigenvectors. So there are infinitely many correct answers; what is not free is the pairing between column jj of MM and entry jj of DD.

Example. Is A=(21−14)A = \begin{pmatrix}2&1\\-1&4\end{pmatrix} diagonalisable?
We found earlier that its only eigenvalue is 33, with a 11-dimensional eigenspace spanned by (1,1)T(1,1)^T. So AA has only one linearly independent eigenvector, not two, and is defective. Therefore AA is not diagonalisable. Notice we did not need to try and fail to construct MM; counting the dimension of the eigenspaces settles it immediately.

8.3 Applications of eigenvalues and eigenvectors#

Many of the applications listed at the start of this chapter arise from studying dynamical systems — essentially any system that changes over time. An electrical network, a bridge oscillating in wind, the population of a city, an ant colony, an atomic nucleus and the Australian economy are all dynamical systems. The common thread in what follows is that a system evolving by repeated application of a matrix is hard to understand directly, but becomes trivial once you look at it in a basis of eigenvectors, where the coordinates simply evolve independently of one another.

8.3.1 Powers of AA#

A typical problem is to compute AkA^k for large kk. Multiplying AA by itself kk times is hopeless for large kk; two propositions rescue us.

Note

Proposition
Let DD be the diagonal matrix with diagonal entries λ1,…,λn\lambda_1, \dots, \lambda_n. Then for k≥1k \geq 1, DkD^k is the diagonal matrix with diagonal entries λ1k,…,λnk\lambda_1^k, \dots, \lambda_n^k.

Proof. By induction on kk. The result is obvious for k=1k = 1. Assume it holds for k=mk = m. Then multiplying out,

Dm+1=DDm=(λ1⋱λn)(λ1m⋱λnm)=(λ1m+1⋱λnm+1),D^{m+1} = D D^m = \begin{pmatrix} \lambda_1 & & \\ & \ddots & \\ & & \lambda_n\end{pmatrix}\begin{pmatrix} \lambda_1^m & & \\ & \ddots & \\ & & \lambda_n^m\end{pmatrix} = \begin{pmatrix} \lambda_1^{m+1} & & \\ & \ddots & \\ & & \lambda_n^{m+1}\end{pmatrix},

since off-diagonal entries of a product of diagonal matrices are all zero. So the result holds for m+1m+1, and hence for all positive integers kk. ■\blacksquare

Note

Proposition
If AA is diagonalisable with M−1AM=DM^{-1}AM = D, then

Ak=MDkM−1for all integers k≥1.A^k = MD^kM^{-1} \quad \text{for all integers } k \geq 1.

Proof. By induction on kk. Multiplying the diagonalisation equation M−1AM=DM^{-1}AM = D on the left by MM and the right by M−1M^{-1} gives A=MDM−1A = MDM^{-1}, which is the case k=1k = 1. Assuming the result for k=mk = m,

Am+1=AAm=(MDM−1)(MDmM−1)=MD(M−1M)DmM−1=MDDmM−1(the inner M−1M collapses to I)=MDm+1M−1,\begin{align*} A^{m+1} &= AA^m \\ &= (MDM^{-1})(MD^mM^{-1}) \\ &= MD(M^{-1}M)D^mM^{-1} \\ &= MDD^mM^{-1} \quad (\text{the inner } M^{-1}M \text{ collapses to } I) \\ &= MD^{m+1}M^{-1}, \end{align*}

so the result holds for m+1m+1 and hence for all k≥1k \geq 1. ■\blacksquare

Basically, the telescoping in the middle of that proof is the entire point of diagonalisation. Every adjacent pair M−1MM^{-1}M cancels, so a product of kk copies of AA costs you only one MM, one M−1M^{-1}, and kk powers of scalars.

Example. Find AkA^k for A=(3223)A = \begin{pmatrix}3&2\\2&3\end{pmatrix}.
From the previous section AA is diagonalisable with

D=(5001),M=(111−1),M−1=(121212−12).D = \begin{pmatrix}5&0\\0&1\end{pmatrix}, \quad M = \begin{pmatrix}1&1\\1&-1\end{pmatrix}, \quad M^{-1} = \begin{pmatrix} \tfrac12 & \tfrac12 \\ \tfrac12 & -\tfrac12\end{pmatrix}.

Then

Ak=MDkM−1=(111−1)(5k001)(121212−12)=(5k15k−1)(121212−12)=(12(5k+1)12(5k−1)12(5k−1)12(5k+1)).\begin{align*} A^k &= MD^kM^{-1} \\ &= \begin{pmatrix}1&1\\1&-1\end{pmatrix}\begin{pmatrix}5^k&0\\0&1\end{pmatrix}\begin{pmatrix} \tfrac12 & \tfrac12 \\ \tfrac12 & -\tfrac12\end{pmatrix} \\ &= \begin{pmatrix}5^k&1\\5^k&-1\end{pmatrix}\begin{pmatrix} \tfrac12 & \tfrac12 \\ \tfrac12 & -\tfrac12\end{pmatrix} \\ &= \begin{pmatrix} \tfrac12(5^k+1) & \tfrac12(5^k-1) \\ \tfrac12(5^k-1) & \tfrac12(5^k+1)\end{pmatrix}. \end{align*}

As a check, substituting k=0k = 0 gives II and substituting k=1k=1 gives (3223)=A\begin{pmatrix}3&2\\2&3\end{pmatrix} = A; and k=2k=2 gives (13121213)\begin{pmatrix}13&12\\12&13\end{pmatrix}, which agrees with A2A^2 computed directly. Therefore Ak=12(5k+15k−15k−15k+1)A^k = \frac{1}{2}\begin{pmatrix}5^k+1 & 5^k-1 \\ 5^k-1 & 5^k+1\end{pmatrix}. Always run the k=0k=0 and k=1k=1 checks; they cost one line each and catch a transposed MM or a swapped eigenvalue instantly.

Example. (Fibonacci.) Let F0=0F_0 = 0, F1=1F_1 = 1 and Fn+2=Fn+1+FnF_{n+2} = F_{n+1} + F_n. Show that the Fibonacci numbers can be extracted from powers of a matrix, and hence explain where the golden ratio comes from.
The recurrence says exactly that

(Fn+1Fn+2)=(0111)(FnFn+1),\begin{pmatrix} F_{n+1} \\ F_{n+2} \end{pmatrix} = \begin{pmatrix} 0 & 1 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} F_n \\ F_{n+1}\end{pmatrix},

so with A=(0111)A = \begin{pmatrix}0&1\\1&1\end{pmatrix} we get (FnFn+1)=An(01)\begin{pmatrix}F_n \\ F_{n+1}\end{pmatrix} = A^n \begin{pmatrix}0\\1\end{pmatrix}. The characteristic equation of AA is

∣−λ111−λ∣=−λ(1−λ)−1=λ2−λ−1=0,\begin{align*} \begin{vmatrix}-\lambda & 1 \\ 1 & 1-\lambda\end{vmatrix} &= -\lambda(1-\lambda) - 1 \\ &= \lambda^2 - \lambda - 1 = 0, \end{align*}

whose roots are φ=1+52\varphi = \frac{1+\sqrt5}{2} and ψ=1−52\psi = \frac{1-\sqrt5}{2}. Since φ≠ψ\varphi \neq \psi the matrix is diagonalisable, so An=MDnM−1A^n = MD^nM^{-1} where DD has φn\varphi^n and ψn\psi^n on its diagonal; every entry of AnA^n is therefore a fixed linear combination of φn\varphi^n and ψn\psi^n. Carrying this through gives Binet's formula

Fn=φn−ψn5.F_n = \frac{\varphi^n - \psi^n}{\sqrt5}.

As a check, A8=(13212134)=(F7F8F8F9)A^8 = \begin{pmatrix}13&21\\21&34\end{pmatrix} = \begin{pmatrix}F_7 & F_8 \\ F_8 & F_9\end{pmatrix}, as the recurrence demands. Therefore the golden ratio is not a mystical constant that happens to show up in the Fibonacci numbers; it is simply the dominant eigenvalue of the recurrence matrix, and since ∣ψ∣<1|\psi| < 1 the ψn\psi^n term dies away and consecutive Fibonacci numbers approach a ratio of φ\varphi.

[X] As an aside, diagonalisation also lets us make sense of the exponential of a matrix. Substituting AA into the power series

ex=1+x+12!x2+13!x3+⋯ ,e^x = 1 + x + \frac{1}{2!}x^2 + \frac{1}{3!}x^3 + \cdots,

replacing 11 by II, and writing A=MDM−1A = MDM^{-1}, the same telescoping as before gives

I+MDM−1+12!(MDM−1)2+⋯=M(I+D+12!D2+⋯ )M−1,I + MDM^{-1} + \frac{1}{2!}(MDM^{-1})^2 + \cdots = M\left(I + D + \frac{1}{2!}D^2 + \cdots\right)M^{-1},

and the bracket is diagonal with entries eλie^{\lambda_i}. So for a diagonalisable matrix,

eA=M(eλ1⋱eλn)M−1.\boxed{e^A = M\begin{pmatrix} e^{\lambda_1} & & \\ & \ddots & \\ & & e^{\lambda_n}\end{pmatrix}M^{-1}.}

One can define sin⁡A\sin A, cos⁡A\cos A and so on in exactly the same way. This is not a party trick; the matrix exponential is precisely what solves the systems of differential equations in the next section.

8.3.2 Solution of first-order linear differential equations#

A very common problem is to solve a pair of coupled first-order linear ODEs with constant coefficients,

dy1dt=a11y1+a12y2,dy2dt=a21y1+a22y2,\begin{align*} \frac{dy_1}{dt} &= a_{11}y_1 + a_{12}y_2, \\ \frac{dy_2}{dt} &= a_{21}y_1 + a_{22}y_2, \end{align*}

with y1(0)y_1(0) and y2(0)y_2(0) given. In Ordinary Differential Equations we could only handle one equation at a time; the difficulty here is that the two are coupled, since each derivative depends on both unknowns. Writing

y=(y1y2),A=(a11a12a21a22),\mathbf{y} = \begin{pmatrix} y_1 \\ y_2 \end{pmatrix}, \qquad A = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22}\end{pmatrix},

the system becomes the single matrix equation

dydt=Ay,y(0) given.\frac{d\mathbf{y}}{dt} = A\mathbf{y}, \qquad \mathbf{y}(0) \text{ given}.

In this form nothing restricts us to two components, and equations of this type are important enough in dynamical systems to have a name — state-space equations, with y\mathbf{y} called the state vector.

This is the obvious generalisation of the scalar equation dydt=ay\frac{dy}{dt} = ay with y(0)=y0y(0) = y_0, whose solution you already know to be y=y0eaty = y_0e^{at}. So it is entirely plausible to guess an exponential solution of the form y=veλt\mathbf{y} = \mathbf{v}e^{\lambda t} for a constant scalar λ\lambda and constant vector v\mathbf{v}. Substituting the guess,

dydt=λveλt=Aveλteλt(Av−λv)=0,\begin{align*} \frac{d\mathbf{y}}{dt} = \lambda\mathbf{v}e^{\lambda t} &= A\mathbf{v}e^{\lambda t} \\ e^{\lambda t}(A\mathbf{v} - \lambda\mathbf{v}) &= \mathbf{0}, \end{align*}

and since eλt≠0e^{\lambda t} \neq 0 for all tt, the guess works exactly when (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}.

Note

Proposition
y(t)=veλt\mathbf{y}(t) = \mathbf{v}e^{\lambda t} is a solution of dydt=Ay\dfrac{d\mathbf{y}}{dt} = A\mathbf{y} if and only if λ\lambda is an eigenvalue of AA and v\mathbf{v} is an eigenvector for λ\lambda.

Basically, the eigenvectors are the directions in which the coupled system decouples; along an eigenvector the whole vector just grows or decays exponentially at the rate given by its eigenvalue, exactly as in the one-dimensional case.

Note

Proposition
If u1(t)\mathbf{u}_1(t) and u2(t)\mathbf{u}_2(t) are solutions of dydt=Ay\dfrac{d\mathbf{y}}{dt} = A\mathbf{y}, then so is any linear combination of them.

Proof. Let y(t)=α1u1(t)+α2u2(t)\mathbf{y}(t) = \alpha_1\mathbf{u}_1(t) + \alpha_2\mathbf{u}_2(t) for scalars α1,α2\alpha_1, \alpha_2. Then

ddt(α1u1+α2u2)=α1du1dt+α2du2dt=α1Au1+α2Au2(each ui solves the equation)=A(α1u1+α2u2),\begin{align*} \frac{d}{dt}\big(\alpha_1\mathbf{u}_1 + \alpha_2\mathbf{u}_2\big) &= \alpha_1\frac{d\mathbf{u}_1}{dt} + \alpha_2\frac{d\mathbf{u}_2}{dt} \\ &= \alpha_1A\mathbf{u}_1 + \alpha_2A\mathbf{u}_2 \quad (\text{each } \mathbf{u}_i \text{ solves the equation}) \\ &= A(\alpha_1\mathbf{u}_1 + \alpha_2\mathbf{u}_2), \end{align*}

which is what we needed. ■\blacksquare

This is the same superposition principle you met for second order linear ODEs, and for the same reason — the equation is linear.

Example. Find the general solution of dydt=Ay\dfrac{d\mathbf{y}}{dt} = A\mathbf{y} where A=(3223)A = \begin{pmatrix}3&2\\2&3\end{pmatrix}, and then the particular solution with y(0)=(1−2)\mathbf{y}(0) = \begin{pmatrix}1\\-2\end{pmatrix}.
We already know the eigenvalues and eigenvectors of this matrix:

λ1=5, v1=(11),λ2=1, v2=(1−1).\lambda_1 = 5, \ \mathbf{v}_1 = \begin{pmatrix}1\\1\end{pmatrix}, \qquad \lambda_2 = 1, \ \mathbf{v}_2 = \begin{pmatrix}1\\-1\end{pmatrix}.

So two solutions are u1(t)=e5t(11)\mathbf{u}_1(t) = e^{5t}\begin{pmatrix}1\\1\end{pmatrix} and u2(t)=et(1−1)\mathbf{u}_2(t) = e^{t}\begin{pmatrix}1\\-1\end{pmatrix}, and by superposition the general solution is

y(t)=α1e5t(11)+α2et(1−1).\mathbf{y}(t) = \alpha_1e^{5t}\begin{pmatrix}1\\1\end{pmatrix} + \alpha_2e^{t}\begin{pmatrix}1\\-1\end{pmatrix}.

(That this is the general solution — that every solution has this form — is true but not proved here.) Substituting t=0t = 0 and matching the initial condition,

α1(11)+α2(1−1)=(1−2),α1+α2=1,α1−α2=−2.\begin{align*} \alpha_1\begin{pmatrix}1\\1\end{pmatrix} + \alpha_2\begin{pmatrix}1\\-1\end{pmatrix} &= \begin{pmatrix}1\\-2\end{pmatrix}, \\ \alpha_1 + \alpha_2 &= 1, \\ \alpha_1 - \alpha_2 &= -2. \end{align*}

Adding gives 2α1=−12\alpha_1 = -1, so α1=−12\alpha_1 = -\frac12 and α2=32\alpha_2 = \frac32. Therefore

y(t)=−12e5t(11)+32et(1−1).\mathbf{y}(t) = -\frac{1}{2}e^{5t}\begin{pmatrix}1\\1\end{pmatrix} + \frac{3}{2}e^{t}\begin{pmatrix}1\\-1\end{pmatrix}.

Checking at t=0t=0: −12(1,1)T+32(1,−1)T=(1,−2)T-\frac12(1,1)^T + \frac32(1,-1)^T = (1,-2)^T, as required.

One reason for caring about first-order systems is that every linear differential equation can be turned into one, by introducing the derivatives as new variables.

Example. Convert d2ydt2+4dydt−5y=0\dfrac{d^2y}{dt^2} + 4\dfrac{dy}{dt} - 5y = 0 into a system of first-order equations, and solve it both ways.
Define y1=yy_1 = y and y2=dy1dt=dydty_2 = \dfrac{dy_1}{dt} = \dfrac{dy}{dt}. Differentiating y2y_2 and using the original equation,

dy2dt=d2ydt2=5y−4dydt=5y1−4y2,\frac{dy_2}{dt} = \frac{d^2y}{dt^2} = 5y - 4\frac{dy}{dt} = 5y_1 - 4y_2,

so the second-order equation is equivalent to

dy1dt=y2,dy2dt=5y1−4y2,that isdydt=Ay,A=(015−4).\begin{align*} \frac{dy_1}{dt} &= y_2, \\ \frac{dy_2}{dt} &= 5y_1 - 4y_2, \end{align*} \qquad\text{that is}\qquad \frac{d\mathbf{y}}{dt} = A\mathbf{y}, \quad A = \begin{pmatrix} 0 & 1 \\ 5 & -4\end{pmatrix}.

Matrix method. The characteristic equation is

∣−λ15−4−λ∣=−λ(−4−λ)−5=λ2+4λ−5=0,\begin{align*} \begin{vmatrix} -\lambda & 1 \\ 5 & -4-\lambda\end{vmatrix} &= -\lambda(-4-\lambda) - 5 \\ &= \lambda^2 + 4\lambda - 5 = 0, \end{align*}

with roots λ1=−5\lambda_1 = -5 and λ2=1\lambda_2 = 1. Solving (A+5I)v1=0(A+5I)\mathbf{v}_1 = \mathbf{0} gives v1=(−1,5)T\mathbf{v}_1 = (-1,5)^T and (A−I)v2=0(A - I)\mathbf{v}_2 = \mathbf{0} gives v2=(1,1)T\mathbf{v}_2 = (1,1)^T, so

y(t)=α1e−5t(−15)+α2et(11),\mathbf{y}(t) = \alpha_1e^{-5t}\begin{pmatrix}-1\\5\end{pmatrix} + \alpha_2e^{t}\begin{pmatrix}1\\1\end{pmatrix},

and reading off the first component, y(t)=y1(t)=−α1e−5t+α2ety(t) = y_1(t) = -\alpha_1e^{-5t} + \alpha_2e^{t}.

Calculus method. Guessing y=eλty = e^{\lambda t} directly in the original equation gives the characteristic equation λ2+4λ−5=0\lambda^2 + 4\lambda - 5 = 0 with roots −5-5 and 11, so y(t)=α1e−5t+α2ety(t) = \alpha_1e^{-5t} + \alpha_2e^{t}.

The two answers agree, and notice that the two characteristic equations are literally identical — the matrix method's det⁡(A−λI)=0\det(A - \lambda I) = 0 reproduces the calculus method's auxiliary equation exactly. For a single equation the calculus method is obviously quicker. The matrix method earns its keep because it handles a much larger class of problems: turning one high-order equation into a system is easy, but turning a system back into one high-order equation is extremely awkward. The matrix method as described fails if AA is not diagonalisable; the repair uses Jordan forms, which is a second-year topic.

Example. The atoms in a laser exist in an "excited state" or a "ground state". The laser is initially pumped so that 80%80\% of its atoms are excited and 20%20\% are in the ground state. During operation, 70%70\% of the excited atoms decay to the ground state per second, while 40%40\% of the ground state atoms are pumped up per second. Find the percentage in each state at time tt.
Let x1(t)x_1(t) and x2(t)x_2(t) be the percentages in the excited and ground states. Excited atoms leave at rate 0.7x10.7x_1 and arrive from the ground state at rate 0.4x20.4x_2, so

dx1dt=−0.7x1+0.4x2,dx2dt=0.7x1−0.4x2,dxdt=Ax,A=(−0.70.40.7−0.4).\begin{align*} \frac{dx_1}{dt} &= -0.7x_1 + 0.4x_2, \\ \frac{dx_2}{dt} &= 0.7x_1 - 0.4x_2, \end{align*} \qquad \frac{d\mathbf{x}}{dt} = A\mathbf{x}, \quad A = \begin{pmatrix} -0.7 & 0.4 \\ 0.7 & -0.4\end{pmatrix}.

(The printed course notes write this matrix with entries −70,40,70,−40-70, 40, 70, -40, which contradicts the eigenvalue they then quote; the rates are per second as decimals, not percentages. Use the matrix above.) The columns of AA sum to zero — no atoms are created or destroyed — so det⁡A=0\det A = 0 and λ1=0\lambda_1 = 0 is an eigenvalue; the other is λ2=tr⁡(A)=−1.1\lambda_2 = \operatorname{tr}(A) = -1.1. For λ1=0\lambda_1 = 0 we solve −0.7v1+0.4v2=0-0.7v_1 + 0.4v_2 = 0, giving v1=(4,7)T\mathbf{v}_1 = (4,7)^T; for λ2=−1.1\lambda_2 = -1.1, A+1.1I=(0.40.40.70.7)A + 1.1I = \begin{pmatrix}0.4&0.4\\0.7&0.7\end{pmatrix} gives v1+v2=0v_1 + v_2 = 0 and v2=(−1,1)T\mathbf{v}_2 = (-1,1)^T. So

x(t)=α1(47)+α2e−1.1t(−11).\mathbf{x}(t) = \alpha_1\begin{pmatrix}4\\7\end{pmatrix} + \alpha_2e^{-1.1t}\begin{pmatrix}-1\\1\end{pmatrix}.

Applying x(0)=(80,20)T\mathbf{x}(0) = (80,20)^T,

4α1−α2=80,7α1+α2=20,\begin{align*} 4\alpha_1 - \alpha_2 &= 80, \\ 7\alpha_1 + \alpha_2 &= 20, \end{align*}

and adding gives 11α1=10011\alpha_1 = 100, so α1=10011=9111\alpha_1 = \frac{100}{11} = 9\tfrac{1}{11} and α2=4α1−80=−48011=−43711\alpha_2 = 4\alpha_1 - 80 = -\frac{480}{11} = -43\tfrac{7}{11}. Therefore

x1(t)=111(400+480e−1.1t),x2(t)=111(700−480e−1.1t),\begin{align*} x_1(t) &= \frac{1}{11}\left(400 + 480e^{-1.1t}\right), \\ x_2(t) &= \frac{1}{11}\left(700 - 480e^{-1.1t}\right), \end{align*}

which correctly gives x1(0)=88011=80x_1(0) = \frac{880}{11} = 80 and x2(0)=22011=20x_2(0) = \frac{220}{11} = 20. As t→∞t \to \infty the exponential dies and the laser settles into a steady state with 40011=36411%\frac{400}{11} = 36\tfrac{4}{11}\% excited and 70011=63711%\frac{700}{11} = 63\tfrac{7}{11}\% in the ground state. Notice that the steady state is a scalar multiple of v1\mathbf{v}_1, the eigenvector for λ=0\lambda = 0 — the zero eigenvalue is exactly the direction that does not decay, and every other direction is scrubbed away exponentially. This observation is the whole content of the next section.

8.3.3 [X] Markov chains#

Matrices are equally useful for discrete-time dynamical systems, where the state at stage k+1k+1 depends only on the state at stage kk.

Example. A psychologist tests the learning ability of rats by having them run a maze. She starts with 100100 rats, none of which has run the maze before. On average, 10%10\% of the rats that fail at one attempt succeed on the next, while 95%95\% of the rats that succeed at one attempt succeed again. Approximately how many rats succeed on the 3rd, 20th and 50th runs?
Let x1(k)x_1(k) and x2(k)x_2(k) be the numbers succeeding and failing on the kkth run. Then

x1(k+1)=0.95x1(k)+0.10x2(k),x2(k+1)=0.05x1(k)+0.90x2(k),x(k+1)=Ax(k),A=(0.950.100.050.90).\begin{align*} x_1(k+1) &= 0.95x_1(k) + 0.10x_2(k), \\ x_2(k+1) &= 0.05x_1(k) + 0.90x_2(k), \end{align*} \qquad \mathbf{x}(k+1) = A\mathbf{x}(k), \quad A = \begin{pmatrix} 0.95 & 0.10 \\ 0.05 & 0.90\end{pmatrix}.

Iterating, the unique solution is x(k)=Akx(0)\mathbf{x}(k) = A^k\mathbf{x}(0), and here x(0)=(0,100)T\mathbf{x}(0) = (0, 100)^T since initially no rat has succeeded. So we need AkA^k, which by the powers proposition means diagonalising. The characteristic equation is

λ2−(0.95+0.90)λ+(0.95×0.90−0.10×0.05)=0λ2−1.85λ+0.85=0(λ−1)(λ−0.85)=0,\begin{align*} \lambda^2 - (0.95 + 0.90)\lambda + (0.95 \times 0.90 - 0.10\times 0.05) &= 0 \\ \lambda^2 - 1.85\lambda + 0.85 &= 0 \\ (\lambda - 1)(\lambda - 0.85) &= 0, \end{align*}

so λ1=1\lambda_1 = 1 and λ2=0.85\lambda_2 = 0.85. For λ1=1\lambda_1 = 1, A−I=(−0.050.100.05−0.10)A - I = \begin{pmatrix}-0.05&0.10\\0.05&-0.10\end{pmatrix} gives v1=2v2v_1 = 2v_2, so v1=(2,1)T\mathbf{v}_1 = (2,1)^T; for λ2=0.85\lambda_2 = 0.85, A−0.85I=(0.100.100.050.05)A - 0.85I = \begin{pmatrix}0.10&0.10\\0.05&0.05\end{pmatrix} gives v2=(−1,1)T\mathbf{v}_2 = (-1,1)^T. Hence

M=(2−111),D=(1000.85),M−1=13(11−12),M = \begin{pmatrix}2&-1\\1&1\end{pmatrix}, \quad D = \begin{pmatrix}1&0\\0&0.85\end{pmatrix}, \quad M^{-1} = \frac{1}{3}\begin{pmatrix}1&1\\-1&2\end{pmatrix},

using det⁡M=3\det M = 3. Then

x(k)=MDkM−1x(0)=(2−111)(1000.85k)⋅13(11−12)(0100)=(2−111)(1000.85k)(10032003)=(2−111)(10032003(0.85)k)=1003(2(1−(0.85)k)1+2(0.85)k).\begin{align*} \mathbf{x}(k) &= MD^kM^{-1}\mathbf{x}(0) \\ &= \begin{pmatrix}2&-1\\1&1\end{pmatrix}\begin{pmatrix}1&0\\0&0.85^k\end{pmatrix}\cdot\frac{1}{3}\begin{pmatrix}1&1\\-1&2\end{pmatrix}\begin{pmatrix}0\\100\end{pmatrix} \\ &= \begin{pmatrix}2&-1\\1&1\end{pmatrix}\begin{pmatrix}1&0\\0&0.85^k\end{pmatrix}\begin{pmatrix} \tfrac{100}{3} \\ \tfrac{200}{3}\end{pmatrix} \\ &= \begin{pmatrix}2&-1\\1&1\end{pmatrix}\begin{pmatrix} \tfrac{100}{3} \\ \tfrac{200}{3}(0.85)^k\end{pmatrix} \\ &= \frac{100}{3}\begin{pmatrix} 2\left(1 - (0.85)^k\right) \\ 1 + 2(0.85)^k \end{pmatrix}. \end{align*}

Checking at k=0k=0 gives 1003(0,3)T=(0,100)T=x(0)\frac{100}{3}(0, 3)^T = (0,100)^T = \mathbf{x}(0), and at k=1k=1 it gives 1003(0.30,1.70)T=(10,90)T\frac{100}{3}(0.30, 1.70)^T = (10, 90)^T, which agrees with computing Ax(0)A\mathbf{x}(0) directly. Evaluating:

kk (0.85)k(0.85)^k x1(k)x_1(k) rats succeeding
33 0.61410.6141 25.7325.73 ≈26\approx 26
2020 0.03880.0388 64.0864.08 ≈64\approx 64
5050 0.00030.0003 66.6566.65 ≈67\approx 67

Therefore about 2626, 6464 and 6767 rats succeed on the 3rd, 20th and 50th runs. As k→∞k \to \infty we have (0.85)k→0(0.85)^k \to 0 and x(k)→1003(2,1)T=(6623,3313)T\mathbf{x}(k) \to \frac{100}{3}(2,1)^T = (66\tfrac23, 33\tfrac13)^T, so in the long run about 6767 rats succeed on any given run. Once again the limit is a scalar multiple of the eigenvector for λ=1\lambda = 1, the eigenvalue of largest magnitude, and every other eigenvalue contributes a term that decays like ∣λi∣k|\lambda_i|^k.

Note

Definition
A Markov chain is a system modelled by x(k+1)=Ax(k)\mathbf{x}(k+1) = A\mathbf{x}(k), where x(k)\mathbf{x}(k) records the number of individuals in each of nn states at time kk, and the n×nn\times n matrix AA has all entries non-negative with every column summing to 11; the entry aija_{ij} is the probability that an individual moves from state jj to state ii.

The column sums being 11 is just the statement that everybody has to end up somewhere — no individuals are created or destroyed. The behaviour we saw in the rat example is typical: for any such matrix, λ=1\lambda = 1 is an eigenvalue and is the eigenvalue of largest magnitude, and in almost all cases Akx(0)A^k\mathbf{x}(0) converges to a multiple of the corresponding eigenvector. Strikingly, that limit depends only on the total number of individuals and not at all on how they were distributed at the start. We finish by proving the first of these claims.

Note

Lemma
If λ\lambda is an eigenvalue of AA, then λ\lambda is also an eigenvalue of ATA^T.

Proof. Determinants are unchanged by transposition, and (A−λI)T=AT−λI(A - \lambda I)^T = A^T - \lambda I since IT=II^T = I. Hence

det⁡(AT−λI)=det⁡((A−λI)T)=det⁡(A−λI),\det(A^T - \lambda I) = \det\big((A - \lambda I)^T\big) = \det(A - \lambda I),

so AA and ATA^T have the same characteristic polynomial and therefore the same eigenvalues. ■\blacksquare

Note

Theorem
Suppose AA is an n×nn\times n matrix in which every column sums to 11. Then AA has 11 as an eigenvalue.

Proof. The hypothesis is that a1j+a2j+⋯+anj=1a_{1j} + a_{2j} + \cdots + a_{nj} = 1 for each column jj. But the jjth column sum of AA is exactly the jjth row sum of ATA^T, so multiplying ATA^T by the all-ones vector gives

AT(11⋮1)=(11⋮1).A^T\begin{pmatrix}1\\1\\\vdots\\1\end{pmatrix} = \begin{pmatrix}1\\1\\\vdots\\1\end{pmatrix}.

The all-ones vector is non-zero, so 11 is an eigenvalue of ATA^T, and by the lemma it is therefore an eigenvalue of AA. ■\blacksquare

Be careful with what that proof does and does not give you. It shows 11 is an eigenvalue of AA, but the all-ones vector is the eigenvector of ATA^T, not of AA; in general it is not an eigenvector of AA. In the rat example the eigenvector of AA for λ=1\lambda = 1 was (2,1)T(2,1)^T, nothing like (1,1)T(1,1)^T. To find the steady state you must still solve (A−I)v=0(A - I)\mathbf{v} = \mathbf{0} properly.

To summarise the working method for the whole chapter:

  • To find eigenvalues, subtract λ\lambda from each diagonal entry and solve det⁡(A−λI)=0\det(A - \lambda I) = 0. Check your characteristic polynomial against tr⁡(A)\operatorname{tr}(A) and det⁡A\det A before going further, and remember that for a triangular matrix the eigenvalues are simply the diagonal entries.
  • To find eigenvectors, row reduce A−λIA - \lambda I and read off a basis for its kernel. The eigenvector is only determined up to a non-zero multiple.
  • To test diagonalisability, compare the geometric multiplicity dim⁡ker⁡(A−λI)\dim\ker(A - \lambda I) with the algebraic multiplicity for each eigenvalue. Distinct eigenvalues guarantee success, but repeated eigenvalues can still succeed, so you must check.
  • To diagonalise, put the eigenvectors in the columns of MM and the corresponding eigenvalues in the matching diagonal positions of DD — matching being the part people get wrong.
  • To iterate or to solve dydt=Ay\frac{d\mathbf{y}}{dt} = A\mathbf{y}, work in the eigenvector basis, where each coordinate evolves independently as λk\lambda^k or eλte^{\lambda t}, and the long-run behaviour is dictated entirely by the eigenvalue of largest magnitude.