So far in Linear Transformations we have studied linear maps T:V→W where the domain and codomain could be completely different spaces. In this chapter we specialise to the case T:V→V, where a vector and its image live in the same space, so that it actually makes sense to ask how T(v) compares to v itself. Two questions drive everything that follows:
Given a map T, are there vectors v∈V that are related in a very simple way to their images T(v)?
[X] Is there a choice of basis for V that makes the matrix representing T take a very simple form?
The answer to both is yes, and remarkably it is the same answer. The simplest possible relationship between v and T(v) is that they are parallel; T does nothing to v except stretch it.
Note
Definition
Let T:V→V be a linear map. If a scalar λ and a non-zero vector v∈V satisfy
T(v)=λv,
then λ is called an eigenvalue of T and v is called an eigenvector of T for the eigenvalue λ.
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 λ. 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 is that T(0)=λ0 holds for every scalar λ, 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 is genuinely informative; it says exactly that kerT={0}, i.e. that T is not one-to-one.
Example. For infinitely differentiable real-valued functions f, the derivative
D(f)=f′,where f′(x)=dxdf for x∈R,
defines a linear map D (we checked in Section 7.5 that differentiation is linear). The exponential function satisfies
D(eλx)=λeλx,
so eλx is an eigenvector of D with eigenvalue λ. 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 dxdy=ay in Ordinary Differential Equations and wrote down y=Ceax, you were computing an eigenvector of D.
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 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 and the natural vector spaces are the complex spaces Cn 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) be a square matrix. If a scalar λ∈C and a non-zero vector v∈Cn satisfy
Av=λv,
then λ is an eigenvalue of A and v is an eigenvector of A for the eigenvalue λ.
Example. For the diagonal 2×2 matrix
A=(λ100λ2),
the standard basis vectors e1=(10) and e2=(01) satisfy
Ae1Ae2=(λ10)=λ1e1,=(0λ2)=λ2e2.
Therefore e1 is an eigenvector with eigenvalue λ1 and e2 is an eigenvector with eigenvalue λ2. Geometrically, if λ1=3 and λ2=−2, then this matrix stretches everything on the x-axis by a factor of 3 and flips everything on the y-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.
Therefore v is an eigenvector of A for the eigenvalue λ=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.
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 λ is an eigenvalue of a square matrix A if and only if
det(A−λI)=0,
and then v is an eigenvector of A for λ if and only if v is a non-zero solution of the homogeneous equation (A−λI)v=0; that is, if and only if v∈ker(A−λI) and v=0.
Proof. By definition, an eigenvalue λ and corresponding eigenvector v satisfy Av=λv with v=0. Rearranging,
0=Av−λv=Av−λIv(inserting I so we can factor)=(A−λI)v,
where I is the identity matrix of the same size as A. Now A−λI is a square matrix, and a square homogeneous system has a non-zero solution if and only if its determinant vanishes. Hence λ is an eigenvalue if and only if det(A−λI)=0. Given that, 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}. ■
The insertion of I 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−λ)v, because A−λ is a matrix minus a scalar, which is meaningless. You must turn λ into λ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 λ, together with 0, is exactly ker(A−λI), and a kernel is a subspace by the theorem in Section 7.4.1.
Note
Definition
For an eigenvalue λ of A, the subspace ker(A−λI) is called the eigenspace of A for λ.
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 λ" 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 A is an n×n matrix and λ∈C, then det(A−λI) is a complex polynomial of degree n in λ.
This can be proved by direct expansion of the determinant; it is straightforward but tedious, so we will just look at the n=3 case to see why it happens. We have
det(A−λI)=(a11−λ)[(a22−λ)(a33−λ)−a32a23]−a21[a12(a33−λ)−a32a13]+a31[a12a23−(a22−λ)a13]=−λ3+(terms in λ2,λ and constants).
Notice where the λ3 comes from: only the product of the three diagonal entries contributes a λ3 term, and it arrives with a sign of (−1)3. In general the leading term is (−1)nλn, which is why the degree is exactly n and never less.
Note
Definition
For a square matrix A, the polynomial p(λ)=det(A−λI) is called the characteristic polynomial of A, and the equation p(λ)=0 is called the characteristic equation of A.
Example. Find the characteristic polynomial of
A=135−1−412−12.
Subtracting λ from each diagonal entry and expanding along the first row,
Therefore the characteristic polynomial is p(λ)=−λ3−λ2+16λ+50. A useful sanity check at this point: the coefficient of λn−1 is always (−1)n−1tr(A), the sum of the diagonal entries, and p(0)=detA. Here tr(A)=1−4+2=−1, matching the −λ2 term, and p(0)=50=detA. If either check fails you have made an arithmetic slip; this catches errors far faster than redoing the expansion.
Note
Theorem An n×n matrix A has exactly n eigenvalues in C, counted according to their multiplicities. These eigenvalues are the zeroes of the characteristic polynomial p(λ)=det(A−λI). Proof. The characteristic polynomial has degree n over C by the previous theorem, so by the Factorisation Theorem for complex polynomials it has exactly n zeroes counted with multiplicity. By the fundamental theorem above, those zeroes are exactly the eigenvalues of A. ■
This is where the insistence on complex scalars pays off. Over R the statement is simply false — a rotation matrix has no real eigenvalues at all — but over C every n×n matrix has its full complement of n eigenvalues, no exceptions.
Example. For the matrix A of the previous example, the roots of −λ3−λ2+16λ+50=0 are, to four significant figures, 4.688, −2.844+1.605i and −2.844−1.605i, and these are the three eigenvalues of A.
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×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−λI by subtracting λ from each diagonal entry.
Compute p(λ)=det(A−λI) and solve p(λ)=0 for the eigenvalues.
For each eigenvalue λi in turn, row reduce A−λiI and find a basis for ker(A−λiI).
Example. Find the eigenvalues and eigenvectors of A=(2222).
The characteristic polynomial is
p(λ)=2−λ222−λ=(2−λ)2−4=λ2−4λ=λ(λ−4),
so the eigenvalues are λ1=0 and λ2=4. As promised, a 2×2 matrix has two of them.
For λ1=0 the eigenvectors are the non-zero vectors of ker(A−0I)=kerA. Row reducing,
(222200)R2=R2−R1(202000),
so 2v1+2v2=0, giving v1=−v2 and
kerA=span{(−11)}.
For λ2=4 we have A−4I=(−222−2), which row reduces to a single equation −2v1+2v2=0, so v1=v2 and
ker(A−4I)=span{(11)}.
Therefore the eigenvalues are 0 and 4, with eigenvectors t(−11) and t(11) respectively, for any t=0. Notice that λ=0 being an eigenvalue is exactly the statement that A is singular, which it obviously is — its two rows are identical.
Since 0 turning up as an eigenvalue keeps happening, it is worth boxing the general principle:
λ=0 is an eigenvalue of A⟺kerA={0}⟺detA=0⟺A is not invertible.
Example. Find the eigenvalues and eigenvectors of A=(2−114).
The characteristic equation is
2−λ−114−λ=(2−λ)(4−λ)+1=λ2−6λ+9=(λ−3)2=0,
so there is a single eigenvalue λ=3, of multiplicity 2. For its eigenvectors,
A−3I=(−1−111),
whose rows are identical, so the system collapses to −v1+v2=0 and
ker(A−3I)=span{(11)}.
Therefore the only eigenvalue is 3 and its eigenvectors are t(11) for t=0. Here the eigenvalue has multiplicity 2 as a root, but its eigenspace is only 1-dimensional; there is nowhere near enough eigenvectors to build a basis for C2.
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 λ of A, the algebraic multiplicity of λ is its multiplicity as a root of the characteristic polynomial, and the geometric multiplicity of λ is dimker(A−λ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,
and a matrix is defective exactly when the inequality on the right is strict for at least one eigenvalue. In the example above, λ=3 had algebraic multiplicity 2 but geometric multiplicity 1, 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)=3I has characteristic polynomial (3−λ)2, so λ=3 with algebraic multiplicity 2. But A−3I is the zero matrix, so ker(A−3I)=C2 and
ker(A−3I)=span{(10),(01)}
is 2-dimensional. Therefore the geometric and algebraic multiplicities agree at 2 and the matrix is not defective — indeed every non-zero vector is an eigenvector, since 3I scales everything equally.
Example. Find the eigenvalues and eigenspaces of
A=2−1−1−12−1−1−12,
and determine whether A is defective.
Rather than expand a 3×3 determinant, notice that A=3I−J where J is the 3×3 matrix of all ones. Every row of A sums to 0, so
A111=000=0111,
giving the eigenvalue λ1=0 with eigenvector (1,1,1)T for free. For the rest, A−3I=−J, so
ker(A−3I)=kerJ={v:v1+v2+v3=0},
which is a single equation in three unknowns and hence a 2-dimensional subspace with basis
1−10,10−1.
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)T, as required. So the eigenvalues are 0 (algebraic and geometric multiplicity 1) and 3 (algebraic and geometric multiplicity 2), and since we have found 1+2=3 linearly independent eigenvectors, A is not defective. Therefore A has a repeated eigenvalue and is still perfectly well behaved; contrast this with the earlier (2−114), where the repeated eigenvalue only produced one direction.
Example. Find all eigenvalues and eigenvectors of A=(1−221).
The characteristic equation is
1−λ−221−λ=(1−λ)2+4=λ2−2λ+5=0,
whose roots are
λ=22±4−20=22±4i=1±2i.
So λ1=1+2i and λ2=1−2i. For λ1,
A−(1+2i)I=(−2i−22−2i),
and row reducing (multiply row 1 by i−1=i to get (2,2i), which is −1 times row 2) gives the single equation −2iv1+2v2=0, i.e. v2=iv1. Taking v1=−i gives v2=i(−i)=1, so
v1=(−i1).
Checking, Av1=(−i+2,2i+1)T and (1+2i)(−i,1)T=(−i−2i2,1+2i)T=(2−i,1+2i)T, which agree. Therefore the eigenvectors for 1+2i are t(−i,1)T, and for 1−2i they are t(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=210031004.
Since A−λI is still lower triangular, its determinant is just the product of the diagonal entries:
p(λ)=(2−λ)(3−λ)(4−λ),
so the eigenvalues are 2,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: A−4I=−2100−11000. Row 1 gives v1=0, then row 2 gives v2=v1=0, and v3 is free; so v=(0,0,1)T.
For λ=3: A−3I=−110001001. Row 1 gives v1=0 and row 3 gives v3=−v2; so v=(0,1,−1)T.
For λ=2: A−2I=010011002. Row 2 gives v1=−v2 and row 3 gives v2=−2v3; taking v3=1 gives v2=−2, v1=2, so 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)T. Therefore the eigenvalues are 2,3,4 with eigenvectors (2,−2,1)T, (0,1,−1)T and (0,0,1)T.
Before moving on it is worth cataloguing what can happen for a real 2×2 matrix, since the characteristic polynomial is then a real quadratic and there are only three possibilities:
Discriminant
Eigenvalues
Example above
>0
two distinct real eigenvalues
(2222), eigenvalues 0,4
=0
one real eigenvalue of multiplicity 2
(2−114) and 3I
<0
a conjugate pair of complex eigenvalues
(1−221), eigenvalues 1±2i
Notice that the middle row splits further depending on whether the matrix is defective, which the discriminant alone cannot tell you.
In every example of the last section except the defective one, a 2×2 matrix gave us two linearly independent eigenvectors — and two independent vectors in C2 form a basis for C2, 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×n matrix has n distinct eigenvalues, then it has n linearly independent eigenvectors.
[X] Proof. Let the distinct eigenvalues be λ1,…,λn with corresponding eigenvectors v1,…,vn, and suppose
μ1v1+μ2v2+⋯+μnvn=0.(*)
We show μ1=0; the same argument with the indices permuted gives μ2=⋯=μn=0, which is exactly linear independence.
Apply the matrix (A−λ2I)(A−λ3I)⋯(A−λnI) to both sides of (∗). For any eigenvector vj we have (A−λiI)vj=(λj−λi)vj, so the whole product acts on vj as multiplication by (λj−λ2)(λj−λ3)⋯(λj−λn). If j=1 then one of those brackets is (λj−λj)=0, so every term except the first is annihilated. What survives is
μ1(λ1−λ2)(λ1−λ3)⋯(λ1−λn)v1=0.
The eigenvalues are distinct, so every bracket is non-zero, and v1=0 because it is an eigenvector. Hence μ1=0. ■
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−J above had a repeated eigenvalue and still gave three independent eigenvectors. What we actually need is stated next.
Note
Theorem If an n×n matrix A has n linearly independent eigenvectors, then there exists an invertible matrix M and a diagonal matrix D such that
M−1AM=D.
Further, the diagonal entries of D are the eigenvalues of A and the columns of M are the corresponding eigenvectors, the jth column of M being an eigenvector for the jth diagonal entry of D. Conversely, if M−1AM=D with D diagonal, then the columns of M are n linearly independent eigenvectors of A.
[X] Proof. Let v1,…,vn be n linearly independent eigenvectors and form the matrix M with these as its columns,
M=(v1v2⋯vn).
Multiplying a matrix on the right by M acts column by column, so
Since the columns of M are a basis for Cn, the system Mx=b has a unique solution for every b, so M is invertible. Multiplying AM=MD on the left by M−1 gives M−1AM=D.
Conversely, if M−1AM=D then AM=MD, and comparing the jth columns of each side gives Avj=λjvj; so each column of M is an eigenvector. Finally, the columns of an invertible matrix are always linearly independent. ■
Look carefully at the third line of that proof, because it is where the ordering rule comes from. The jth column of M must be an eigenvector for the jth diagonal entry of D; if you shuffle the eigenvalues in D without shuffling the columns of M to match, the result is simply wrong. This is the most common way to lose marks in this chapter.
Note
Definition
A square matrix A is diagonalisable if there exists an invertible matrix M and a diagonal matrix D with M−1AM=D.
Combining the two theorems gives the practical criterion:
A is diagonalisable⟺A has n linearly independent eigenvectors⟺A is not defective.
In terms of the two multiplicities, A 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 n.
Example. Show that A=(3223) is diagonalisable and find M and D with M−1AM=D.
The characteristic equation is
(3−λ)2−4λ2−6λ+5(λ−5)(λ−1)=0=0=0,
so λ1=5 and λ2=1. For λ1=5, A−5I=(−222−2) gives v1=v2, so v1=(1,1)T. For λ2=1, A−I=(2222) gives v1=−v2, so v2=(1,−1)T. These are linearly independent — guaranteed in advance by the distinct-eigenvalues theorem, since 5=1 — so A is diagonalisable with
D=(5001),M=(111−1).
Checking directly, detM=−2 so M−1=21(111−1), and
Therefore A is diagonalisable with the M and D above.
The choice of M and D is never unique. We could have listed the eigenvalues the other way round, taking
D=(1005),M=(1−111),
and any non-zero multiple of any column of M 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 j of M and entry j of D.
Example. Is A=(2−114) diagonalisable?
We found earlier that its only eigenvalue is 3, with a 1-dimensional eigenspace spanned by (1,1)T. So A has only one linearly independent eigenvector, not two, and is defective. Therefore A is not diagonalisable. Notice we did not need to try and fail to construct M; counting the dimension of the eigenspaces settles it immediately.
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.
since off-diagonal entries of a product of diagonal matrices are all zero. So the result holds for m+1, and hence for all positive integers k. ■
Note
Proposition If A is diagonalisable with M−1AM=D, then
Ak=MDkM−1for all integers k≥1.
Proof. By induction on k. Multiplying the diagonalisation equationM−1AM=D on the left by M and the right by M−1 gives A=MDM−1, which is the case k=1. Assuming the result for k=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,
so the result holds for m+1 and hence for all k≥1. ■
Basically, the telescoping in the middle of that proof is the entire point of diagonalisation. Every adjacent pair M−1M cancels, so a product of k copies of A costs you only oneM, one M−1, and k powers of scalars.
Example. Find Ak for A=(3223).
From the previous section A is diagonalisable with
As a check, substituting k=0 gives I and substituting k=1 gives (3223)=A; and k=2 gives (13121213), which agrees with A2 computed directly. Therefore Ak=21(5k+15k−15k−15k+1). Always run the k=0 and k=1 checks; they cost one line each and catch a transposed M or a swapped eigenvalue instantly.
Example. (Fibonacci.) Let F0=0, F1=1 and Fn+2=Fn+1+Fn. 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),
so with A=(0111) we get (FnFn+1)=An(01). The characteristic equation of A is
−λ111−λ=−λ(1−λ)−1=λ2−λ−1=0,
whose roots are φ=21+5 and ψ=21−5. Since φ=ψ the matrix is diagonalisable, so An=MDnM−1 where D has φn and ψn on its diagonal; every entry of An is therefore a fixed linear combination of φn and ψn. Carrying this through gives Binet's formula
Fn=5φn−ψn.
As a check, A8=(13212134)=(F7F8F8F9), 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 the ψn term dies away and consecutive Fibonacci numbers approach a ratio of φ.
[X] As an aside, diagonalisation also lets us make sense of the exponential of a matrix. Substituting A into the power series
ex=1+x+2!1x2+3!1x3+⋯,
replacing 1 by I, and writing A=MDM−1, the same telescoping as before gives
I+MDM−1+2!1(MDM−1)2+⋯=M(I+D+2!1D2+⋯)M−1,
and the bracket is diagonal with entries eλi. So for a diagonalisable matrix,
eA=Meλ1⋱eλnM−1.
One can define sinA, cosA 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,
with y1(0) and y2(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=(a11a21a12a22),
the system becomes the single matrix equation
dtdy=Ay,y(0) 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 called the state vector.
This is the obvious generalisation of the scalar equation dtdy=ay with y(0)=y0, whose solution you already know to be y=y0eat. So it is entirely plausible to guess an exponential solution of the form y=veλt for a constant scalar λ and constant vector v. Substituting the guess,
dtdy=λveλteλt(Av−λv)=Aveλt=0,
and since eλt=0 for all t, the guess works exactly when (A−λI)v=0.
Note
Proposition y(t)=veλt is a solution of dtdy=Ay if and only if λ is an eigenvalue of A and v is an eigenvector for λ.
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) and u2(t) are solutions of dtdy=Ay, then so is any linear combination of them.
Proof. Let y(t)=α1u1(t)+α2u2(t) for scalars α1,α2. Then
dtd(α1u1+α2u2)=α1dtdu1+α2dtdu2=α1Au1+α2Au2(each ui solves the equation)=A(α1u1+α2u2),
which is what we needed. ■
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 dtdy=Ay where A=(3223), and then the particular solution with y(0)=(1−2).
We already know the eigenvalues and eigenvectors of this matrix:
λ1=5,v1=(11),λ2=1,v2=(1−1).
So two solutions are u1(t)=e5t(11) and u2(t)=et(1−1), and by superposition the general solution is
y(t)=α1e5t(11)+α2et(1−1).
(That this is the general solution — that every solution has this form — is true but not proved here.) Substituting t=0 and matching the initial condition,
α1(11)+α2(1−1)α1+α2α1−α2=(1−2),=1,=−2.
Adding gives 2α1=−1, so α1=−21 and α2=23. Therefore
y(t)=−21e5t(11)+23et(1−1).
Checking at t=0: −21(1,1)T+23(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 dt2d2y+4dtdy−5y=0 into a system of first-order equations, and solve it both ways.
Define y1=y and y2=dtdy1=dtdy. Differentiating y2 and using the original equation,
with roots λ1=−5 and λ2=1. Solving (A+5I)v1=0 gives v1=(−1,5)T and (A−I)v2=0 gives v2=(1,1)T, so
y(t)=α1e−5t(−15)+α2et(11),
and reading off the first component, y(t)=y1(t)=−α1e−5t+α2et.
Calculus method. Guessing y=eλt directly in the original equation gives the characteristic equation λ2+4λ−5=0 with roots −5 and 1, so y(t)=α1e−5t+α2et.
The two answers agree, and notice that the two characteristic equations are literally identical — the matrix method's det(A−λ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 A 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% of its atoms are excited and 20% are in the ground state. During operation, 70% of the excited atoms decay to the ground state per second, while 40% of the ground state atoms are pumped up per second. Find the percentage in each state at time t.
Let x1(t) and x2(t) be the percentages in the excited and ground states. Excited atoms leave at rate 0.7x1 and arrive from the ground state at rate 0.4x2, so
(The printed course notes write this matrix with entries −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 A sum to zero — no atoms are created or destroyed — so detA=0 and λ1=0 is an eigenvalue; the other is λ2=tr(A)=−1.1. For λ1=0 we solve −0.7v1+0.4v2=0, giving v1=(4,7)T; for λ2=−1.1, A+1.1I=(0.40.70.40.7) gives v1+v2=0 and v2=(−1,1)T. So
x(t)=α1(47)+α2e−1.1t(−11).
Applying x(0)=(80,20)T,
4α1−α27α1+α2=80,=20,
and adding gives 11α1=100, so α1=11100=9111 and α2=4α1−80=−11480=−43117. Therefore
which correctly gives x1(0)=11880=80 and x2(0)=11220=20. As t→∞ the exponential dies and the laser settles into a steady state with 11400=36114% excited and 11700=63117% in the ground state. Notice that the steady state is a scalar multiple of v1, the eigenvector for λ=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.
Matrices are equally useful for discrete-time dynamical systems, where the state at stage k+1 depends only on the state at stage k.
Example. A psychologist tests the learning ability of rats by having them run a maze. She starts with 100 rats, none of which has run the maze before. On average, 10% of the rats that fail at one attempt succeed on the next, while 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) and x2(k) be the numbers succeeding and failing on the kth run. Then
Iterating, the unique solution is x(k)=Akx(0), and here x(0)=(0,100)T since initially no rat has succeeded. So we need Ak, which by the powers proposition means diagonalising. The characteristic equation is
so λ1=1 and λ2=0.85. For λ1=1, A−I=(−0.050.050.10−0.10) gives v1=2v2, so v1=(2,1)T; for λ2=0.85, A−0.85I=(0.100.050.100.05) gives v2=(−1,1)T. Hence
Checking at k=0 gives 3100(0,3)T=(0,100)T=x(0), and at k=1 it gives 3100(0.30,1.70)T=(10,90)T, which agrees with computing Ax(0) directly. Evaluating:
k
(0.85)k
x1(k)
rats succeeding
3
0.6141
25.73
≈26
20
0.0388
64.08
≈64
50
0.0003
66.65
≈67
Therefore about 26, 64 and 67 rats succeed on the 3rd, 20th and 50th runs. As k→∞ we have (0.85)k→0 and x(k)→3100(2,1)T=(6632,3331)T, so in the long run about 67 rats succeed on any given run. Once again the limit is a scalar multiple of the eigenvector for λ=1, the eigenvalue of largest magnitude, and every other eigenvalue contributes a term that decays like ∣λi∣k.
Note
Definition
A Markov chain is a system modelled by x(k+1)=Ax(k), where x(k) records the number of individuals in each of n states at time k, and the n×n matrix A has all entries non-negative with every column summing to 1; the entry aij is the probability that an individual moves from state j to state i.
The column sums being 1 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 is an eigenvalue and is the eigenvalue of largest magnitude, and in almost all cases Akx(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 λ is an eigenvalue of A, then λ is also an eigenvalue of AT.
Proof. Determinants are unchanged by transposition, and (A−λI)T=AT−λI since IT=I. Hence
det(AT−λI)=det((A−λI)T)=det(A−λI),
so A and AT have the same characteristic polynomial and therefore the same eigenvalues. ■
Note
Theorem Suppose A is an n×n matrix in which every column sums to 1. Then A has 1 as an eigenvalue.
Proof. The hypothesis is that a1j+a2j+⋯+anj=1 for each column j. But the jth column sum of A is exactly the jth row sum of AT, so multiplying AT by the all-ones vector gives
AT11⋮1=11⋮1.
The all-ones vector is non-zero, so 1 is an eigenvalue of AT, and by the lemma it is therefore an eigenvalue of A. ■
Be careful with what that proof does and does not give you. It shows 1 is an eigenvalue of A, but the all-ones vector is the eigenvector of AT, not of A; in general it is not an eigenvector of A. In the rat example the eigenvector of A for λ=1 was (2,1)T, nothing like (1,1)T. To find the steady state you must still solve (A−I)v=0 properly.
To summarise the working method for the whole chapter:
To find eigenvalues, subtract λ from each diagonal entry and solve det(A−λI)=0. Check your characteristic polynomial against tr(A) and detA before going further, and remember that for a triangular matrix the eigenvalues are simply the diagonal entries.
To find eigenvectors, row reduce A−λ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 dimker(A−λ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 M and the corresponding eigenvalues in the matching diagonal positions of D — matching being the part people get wrong.
To iterate or to solve dtdy=Ay, work in the eigenvector basis, where each coordinate evolves independently as λk or eλt, and the long-run behaviour is dictated entirely by the eigenvalue of largest magnitude.