dynamical systems and matrix algebrabehrend/math223/dynsys.pdf · dynamical systems and matrix...

71
Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies to linear dynamical systems. We treat the discrete and the continuous case. 1

Upload: others

Post on 26-Jun-2020

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Dynamical Systems and Matrix Algebra

K. Behrend

August 12, 2018

Abstract

This is a review of how matrix algebra applies to linear dynamicalsystems. We treat the discrete and the continuous case.

1

Page 2: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Contents

Introduction 4

1 Discrete Dynamical Systems 41.1 A Markov Process . . . . . . . . . . . . . . . . . . . . . . . . . 4

A migration example . . . . . . . . . . . . . . . . . . . . . . . 4Translating the problem into matrix algebra . . . . . . . . . . 4Finding the equilibrium . . . . . . . . . . . . . . . . . . . . . 7The line of fixed points . . . . . . . . . . . . . . . . . . . . . . 9

1.2 Fibonacci’s Example . . . . . . . . . . . . . . . . . . . . . . . 11Description of the dynamical system . . . . . . . . . . . . . . 11Model using rabbit vectors . . . . . . . . . . . . . . . . . . . . 12Starting the analysis . . . . . . . . . . . . . . . . . . . . . . . 13The method of eigenvalues . . . . . . . . . . . . . . . . . . . . 13Finding the eigenvalues . . . . . . . . . . . . . . . . . . . . . . 17Finding the eigenvectors . . . . . . . . . . . . . . . . . . . . . 18Qualitative description of the long-term behaviour . . . . . . . 20The second eigenvalue . . . . . . . . . . . . . . . . . . . . . . 20Exact solution . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Finding the constants . . . . . . . . . . . . . . . . . . . . . . . 24More detailed analysis . . . . . . . . . . . . . . . . . . . . . . 25The Golden Ratio . . . . . . . . . . . . . . . . . . . . . . . . . 26

1.3 Predator-Prey System . . . . . . . . . . . . . . . . . . . . . . 27Frogs and flies . . . . . . . . . . . . . . . . . . . . . . . . . . . 27The model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Solving the system . . . . . . . . . . . . . . . . . . . . . . . . 29Discussion of the solution . . . . . . . . . . . . . . . . . . . . 31The phase portrait . . . . . . . . . . . . . . . . . . . . . . . . 32The method of diagonalization . . . . . . . . . . . . . . . . . . 34Concluding remarks . . . . . . . . . . . . . . . . . . . . . . . . 39

1.4 Summary of the Method . . . . . . . . . . . . . . . . . . . . . 40The method of undetermined coefficients . . . . . . . . . . . . 41The method of diagonalization . . . . . . . . . . . . . . . . . . 41The long term behaviour . . . . . . . . . . . . . . . . . . . . . 42

1.5 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . 44A 3-dimensional dynamical system . . . . . . . . . . . . . . . 44The powers of a matrix . . . . . . . . . . . . . . . . . . . . . . 49

2

Page 3: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

1.6 More on Markov processes . . . . . . . . . . . . . . . . . . . . 531.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

2 Continuous Dynamical Systems 602.1 Flow Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 602.2 Discrete Model . . . . . . . . . . . . . . . . . . . . . . . . . . 612.3 Refining the Discrete Model . . . . . . . . . . . . . . . . . . . 622.4 The continuous model . . . . . . . . . . . . . . . . . . . . . . 632.5 Solving the system of differential equations . . . . . . . . . . . 64

One homogeneous linear differential equation . . . . . . . . . . 64Our system of linear differential equations . . . . . . . . . . . 65

2.6 Phase Portrait . . . . . . . . . . . . . . . . . . . . . . . . . . . 692.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

3

Page 4: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Introduction

This notes are in somewhat preliminary form. The content is not yet stable.Watch for updates.

1 Discrete Dynamical Systems

1.1 A Markov Process

A migration example

Let us start with an example. Consider the populations of the two citiesVancouver and Richmond. The following graphic shows the yearly migrationpatterns.

Vancouver

Richmond

5%

10%

Figure 1: Yearly migration patterns between Vancouver and Richmond

This means that every year, 5% of the population of Richmond moves toVancouver and 10% of the Vancouver population moves to Richmond. Weneglect all other effects on the populations of the two cities: no one gets bornor dies, no one moves elsewhere, no one moves from outside Vancouver orRichmond to one of the two cities. Let us measure population size in multipleof 1,000.

Translating the problem into matrix algebra

To describe the populations, we will use population vectors. These will bevectors

(vr

), where v is the Vancouver population and r the Richmond popu-

lation. Thus a population vector of(300100

)represents a population of 300,000

in Vancouver and 100,000 in Richmond.

4

Page 5: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

If the population vector in the current year, 2007, is(300100

), then next year

the population vector will be(275125

). This is because 30 kilo-people (10% of

300 kilo-people) move from Vancouver to Richmond and 5 kilo-people (5% of100 kilo-people) move from Richmond to Vancouver, resulting in a net gainof 25 kilo-people for Richmond.

Translating Figure 1 into equations, we arrive at

v2008 = .9 v2007 + .05 r2007

r2008 = .1 v2007 + .95 r2007

To save space, let us write the year 2007 as n and the year 2008 as n + 1.Then we can rewrite these equations as

vn+1 = .9 vn + .05 rn

rn+1 = .1 vn + .95 rn

because the Vancouver population next year consists of 90% of the Vancouverpopulation this year and 5% of the Richmond population this year. Simi-larly, the Richmond population next year consists of 95% of the Richmondpopulation this year plus 10% of the Vancouver population this year.

In vector form:(vn+1

rn+1

)=

(.9 vn + .05 rn.1 vn + .95 rn

)=

(.9 .05.1 .95

)(vnrn

)Thus we see that the change in the population vector from one year to thenext is given by a matrix transformation:

Population Vectors

R2

T

Figure 2: The matrix transformation T takes population vectors as inputand as output

5

Page 6: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

The vector space of population vectors is R2. Of course, many vectorsin R2 do not make sense as population vectors, such as vectors with nega-tive or irrational components. But it is still better to work with R2, ratherthan the set of sensible population vectors, because we can freely take linearcombinations in R2.

The linear transformation is therefore

T : R2 → R2

The input vector space and the output vectors space are both equal to R2.Let us write A for the matrix of T :

M(T ) = A

We have seen that

A =

(.9 .05.1 .95

)We multiply population vectors by the matrix A to go from one year to thenext. (

vn+1

rn+1

)= A

(vnrn

)If we write ~p =

(vr

)we can write this even shorter as

~pn+1 = A~pn (1)

We call A the transition matrix of the dynamical system.The main feature of such a dynamical system is that the input and output

vectors are of the same type. In our case, they are both population vectors.So we can iterate the transformation. We can compute the population vectortwo years from now (just plug Equation (1) into itself):

~pn+2 = A~pn+1 = A(A~pn) = A2~pn

Or 10 years from now:~pn+10 = A10 ~pn

If we declare the current year to be year 0, then the population vector 10years from now is

~p10 = A10 ~p0

6

Page 7: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

With our above example:

~p10 =

(v10r10

)= A10

(v0r0

)=

(.9 .05.1 .95

)10(300100

)To compute the powers of a matrix is in general not so easy. Of course,

we can just compute by brute force, but there is a better way, which givesus more insight: the method of eigenvalues.

Finding the equilibrium

Let us plot the population development for this example. Here are the firstfour values (they are rounded off to the nearest 1,000):(

v0r0

)=

(300100

)(v1r1

)=

(.9 .05.1 .95

)(300100

)=

(275125

)(v2r2

)=

(.9 .05.1 .95

)(275125

)=

(254146

)(v3r3

)=

(.9 .05.1 .95

)(254146

)=

(236164

)We see that the Vancouver population decreases, as the Richmond populationincreases. Figure 3 shows a plot of the first 100 values of the populationvector. It looks like the population vectors keep getting closer together. Themore time goes by, the smaller is the difference between ~pn and ~pn+1 = A~pn.If n gets very large, there is almost no difference between ~pn and A~pn. So itlooks like the the population vector approaches a fixed point. As the years goby, we get closer and closer to a certain population vector ~p∞ which satisfiesthe property

A~p∞ = ~p∞ (2)

To find the vector ~p∞ =(vr

), we rewrite this equation:(

.9 .05

.1 .95

)(vr

)=

(vr

)(3)(

.9 .05

.1 .95

)(vr

)=

(1 00 1

)(vr

)7

Page 8: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

(300,100)

v

r

400

400

300

200

300

100

02001000

Figure 3: Phase portrait with initial condition(300100

).

8

Page 9: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

(.9 .05.1 .95

)(vr

)−(

1 00 1

)(vr

)=

(00

)(.9− 1 .05− 0.1− 0 .95− 1

)(vr

)=

(00

)(−.1 .05.1 −.05

)(vr

)=

(00

)This is a homogeneous system of equations for the indeterminants v and r,which we easily solve using Gaussian elimination:(

−.1 .05.1 −.05

)R1+R2

→(−.1 .050 0

)·(−10)→

(1 −.50 0

)We read off the general solution:

v = .5 r

r = r (free)(4)

There are infinitely many fixed points, one for every value of r. We are ata fixed point, if the Vancouver population is half the size of the Richmondpopulation. In this case we say that the system is in equilibrium.

To find the actual equilibrium point, i.e., the population vector at whichthe populations stabilize, we use our initial condition. Since we know thatthe total population always stays at 300+100=400, we get the additionalequation v + r = 400. We get a new system of equations:

v − .5r = 0v + r = 400

This system has the unique solution(vr

)=

(133267

)(we have rounded these numbers). A close examination of Figure 3 revealsthat the population vectors do seem to approach the vector ~p∞ =

(133267

).

The line of fixed points

Let us see what happens if we start with different population vectors (butkeeping the same dynamical system from Figure 1). In Figure 4 the tra-jectories of the population vectors are plotted for the initial conditions~p0 =

(300100

),(200100

),(100100

),(

50200

),(

50300

),(

50400

).

9

Page 10: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

r

v

400

400

300

200

300

100

02001000

(100,100) (200,100) (300,100)

(50,200)

(50,300)

(50,400)

Figure 4: The phase portrait for various initial population vectors

10

Page 11: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

We observe that in every case the population vector approaches a fixedpoint. The limiting point always satisfies the fixed point equation (2). Thesolution to (2) is always the same, as long as we are talking about the sametransition matrix. The solution is (4). It describes a line L in the populationvector space R2:

v

r v = .5 r

The line of fixed points L

This line is the line of fixed points of the transition matrix A. In fact, alltrajectories approach this line of fixed points as the years go by, as we see inFigure 4.

Let us do the above calculation starting with Equation (3) once again.

A~p = ~p

A~p = I~p

I~p− A~p = ~0

(I − A)~p = ~0

So the fixed points of A are the vectors in the null space of I − A.

1.2 Fibonacci’s Example

Description of the dynamical system

Fibonacci considered the following problem. We breed rabbits, starting withone pair of rabbits. Every month, each pair of rabbits produces one pair ofoffspring. After one month, the offspring is adult, and will start reproduction.Describe the long term behaviour of the rabbit population. Again, we neglect

11

Page 12: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

all kinds of effects. For example, no rabbit ever dies. And we always considerpairs of rabbits. Figure 5 summarizes the dynamics.

Juveniles

Adults

100%

100%

100%

Figure 5: Rabbit breeding according to Fibonacci

Every month, all juveniles turn into adults, all adults give rise to an equalnumber (100%) of juveniles, and 100% of the adults stay around. This time,of course, the total number of rabbits is not constant, but increases quiterapidly.

Model using rabbit vectors

To model this dynamical system, we use the space of rabbit vectors ~r =(ja

)∈ R2. The first component of the rabbit vector gives the number of

juvenile pairs, the second component the number of adult pairs of rabbits.Translating Figure 5 into equations, we get:

jn+1 = an

an+1 = jn + an

In vector form (jn+1

an+1

)=

(0 11 1

)(jnan

)or, even shorter

~rn+1 =

(0 11 1

)~rn

This time, the transition matrix of the dynamical system is

A =

(0 11 1

)12

Page 13: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

The initial condition is ~r0 =(10

), one pair of juvenile rabbits, no adult

rabbits. We can summarize the dynamical system in the equations

~rn+1 =

(0 11 1

)~rn

~r0 =(10

) (5)

We can formally write down the solution to (5) as

~rn = An~r0

or explicitly: (jnan

)=

(0 11 1

)n(10

).

But this is not very illuminating: we do not know much about the powers of(0 11 1

), and we do not have a formula for the entries of

(0 11 1

)n. At this stage,

the only thing we could do would be to keep multiplying(0 11 1

)over and over

with itself.

Starting the analysis

To get an idea of what is going on, let us calculate the first few rabbit vectors:

n 0 1 2 3 4 5 6 7 8

jn 1 0 1 1 2 3 5 8 13an 0 1 1 2 3 5 8 13 21

(6)

For example, the seventh rabbit vector is ~r7 =(

813

). After 7 months there

are 8 juvenile and 13 adult pairs of rabbits.The sequence (an)n=0,1,2... = (0, 1, 1, 2, 3, 5, 8 . . . ) is the famous Fibonacci

sequence.Let us plot these rabbit vectors, see Figure 6.

The method of eigenvalues

Rabbit vectors do not stabilize. Still, there is a similarity with the behaviourof the population vectors from Figure 3 or 4. Examining Figure 6, the rabbitvectors do seem to get closer and closer to a certain line, see Figure 7.

13

Page 14: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

5

10

20

5 10 j

a

Figure 6: Rabbit vectors ~r0, . . . , ~r8

The line L is called an eigenspace of our dynamical system, or better, aneigenspace of the transition matrix A (it is a one-dimensional vector space).Can we find the line L? The idea is similar to the fixed point equation (2),above.

Suppose that we have a rabbit vector ~rn, which is actually on the lineL. With our initial condition, this will never happen, the rabbit vectors willnever reach L, they only get closer and closer. But, suppose, anyway, that~rn is on L, then the next rabbit vector ~rn+1 (and all future rabbit vectors)will also be on L. That is precisely the distinguishing property of the lineL. The actual rabbit vectors get closer and closer to L, but our ‘imaginary’

14

Page 15: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

5

10

20

5 10 j

a L

Figure 7: The line L

rabbit vector, once it is on L, stays on L:

if ~rn is on L, then ~rn+1 is also on L

Or, using Equation (5) we can say

if ~rn is on L, then A~rn is also on L

Let us drop the subscript, as we are anyway talking about an ‘imaginary’rabbit vector, which is not on the list ~r0, ~r1, ~r2, . . ..

if ~r is on L, then A~r is also on L

15

Page 16: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Another way to say the same thing is

both ~r and A~r are on the same line

Yet another way to say this is that

A~r is a scalar multiple of ~r

If ~r 6= ~0, then ~r will span the line L, and so if A~r is also on L, then A~r hasto be a scalar multiple of ~r. So there exists a scalar λ ∈ R, such that

A~r = λ~r (7)

Figure 8 gives a graphical representation of this equation.

j

aThe Eigenspace L

r

Ar λr

Figure 8: On the line L we have A~r = λ~r

With λ = 1, we get the fixed point equation (2). But there is one bigdifference: In Equation (2), we knew the value of λ, namely 1. This time wedo not know the value of λ. In Equation (7), both ~r and λ are unknown.Only the matrix A is known, it is

(0 11 1

).

16

Page 17: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Finding the eigenvalues

To solve (7), rewrite it as follows:(0 11 1

)(ja

)= λ

(ja

)(8)

Now we do the same calculation as in (3):(0 11 1

)(ja

)= λ

(ja

)(

0 11 1

)(ja

)= λ

(1 00 1

)(ja

)(

0 11 1

)(ja

)=

(λ 00 λ

)(ja

)(λ 00 λ

)(ja

)−(

0 11 1

)(ja

)=

(00

)(λ −1−1 λ− 1

)(ja

)=

(00

)(9)

We first find λ, then the rabbit vector(ja

). Remember that we want the

rabbit vector(ja

)to span the line L. So it has to be non-zero. Therefore,

the matrix (λ −1−1 λ− 1

)has to have some non-zero vector in its null space. This is the main idea.We need a non-zero vector to span the line L, so Equation (9) has to havea non-trivial solution vector

(ja

). The coefficient matrix of the system (9),

which is (λ −1−1 λ− 1

)has to be singular. To check if this matrix is singular, we use the determinant.The matrix is singular, if the determinant is zero. So we are looking for valuesof λ, such that

det

(λ −1−1 λ− 1

)= 0

The determinant is easily calculated:

det

(λ −1−1 λ− 1

)= λ(λ− 1)− 1 = λ2 − λ− 1

17

Page 18: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

The quadratic polynomial λ2 − λ− 1 is called thecharacteristic polynomial of the matrix A =

(0 11 1

).

Its roots are called the eigenvalues of A.

Using the quadratic formula, we see that the solutions to

λ2 − λ− 1 = 0 (10)

areλ1 = 1+

√5

2λ2 = 1−

√5

2

These are the two eigenvalues of the matrix A =(0 11 1

).

Which one of these two eigenvalues are we looking for? Let us haveanother look at Figure 8. We see that λ~r is larger than ~r, so the scalar λ hasto be greater than 1. So λ2 = 1−

√5

2, which is less than zero, is wrong. So we

have found the value of λ, namely

λ = λ1 = 1+√5

2≈ 1.618 .

If a rabbit vector happens to be on the line L, then one month later it isstill on the line L, but bigger by a factor of λ1 = 1+

√5

2. For our actual rabbit

vectors ~r0, ~r1, ~r2 . . . from our list (6), this is only approximately true. If n is

large, then, ~rn+1 ≈ 1+√5

2~rn. As n gets larger, this approximation gets better.

Finding the eigenvectors

Let us now find the line L. Remember that a vector(ja

)will span the line

L if it is a non-zero solution of Equation (8), or equivalently, (9). Plugging

in the value λ1 = 1+√5

2, for λ, we obtain the equation(1+√5

2−1

−1 1+√5

2− 1

)(ja

)=

(00

)(11)

Let us row reduce the coefficient matrix(1+√5

2−1

−1 1+√5

2− 1

)→(

1 1−√5

2

0 0

)

18

Page 19: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Note that we already knew that there was going to be a free variable: thewhole point of choosing a λ solving (10), was to make sure that (9) hasnon-trivial solutions. The general solution to (11) is(

ja

)=

(√5−12a

a

)where a is the free variable. Any non-zero value for a gives us a spanningvector for L. To avoid fractions, let us pick a = 2. Thus, the vector

~v1 =

(√5− 12

)spans the line L.

Because λ1 and ~v1 solve the eigenvalue equation, we have

A~v1 = λ1v1 (12)

It may be worth checking that this is true:(0 11 1

)(√5− 12

)= 1+

√5

2

(√5− 12

)(13)

In fact, both sides evaluate to(

2√5+1

).

The all important equation (12), or equivalently (13), is expressed inwords by saying that

~v1 =(√

5−12

)is an eigenvector of the matrix A =

(0 11 1

)with corresponding eigenvalue λ1 = 1+

√5

2.

The slope of L in the ja-coordinate system is

a

j=

2√5− 1

=1 +√

5

2≈ 1.618

This agrees with Figure 7.The line L consists of all solutions of (11).

The line L is called the eigenspace of the matrixA =

(0 11 1

)with respect to the eigenvalue λ1 = 1+

√5

2.

19

Page 20: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Qualitative description of the long-term behaviour

Because our rabbit vectors ~r0, ~r1, ~r2, . . . get closer and closer to the line L,the slope of these rabbit vectors approaches the value 1+

√5

2. We conclude

thatlimn→∞

anjn

= 1+√5

2.

Note. It is a coincidence that the slope of the eigenspace has the same valueas the corresponding eigenvector.

We have succeeded in describing two major facts about the long termbehaviour of the rabbit population:

(i) the slope of the rabbit vectors gets closer and closer to the slope ofthe eigenspace L, which means that the proportion of adult to juvenilerabbits approaches the value 1+

√5

2≈ 1.618, in the long run.

(ii) as n grows, the approximation ~rn+1 ≈ 1+√5

2~rn gets better and better.

Thus both the adult and the juvenile population grow approximatelyby a factor of 1+

√5

2≈ 1.6.18 every month.

The answer to the second question is given by the eigenvalue λ1 = 1+√5

2,

the answer to the first question is given by the corresponding eigenspaceL = span~v1, with slope 1+

√5

2.

The second eigenvalue

in fact, we can do much better. We can find exact formulas for the numbersof adult and juvenile rabbits in month n. Do do this, we need to study theother eigenvalue λ2, which we discarded in the above discussion. Let us findthe corresponding line of eigenvectors. Plugging in the value λ2 = 1−

√5

2into

Equation 9, we get (1−√5

2−1

−1 1−√5

2− 1

)(ja

)=

(00

)(14)

This time the coefficient matrix reduces to(1−√5

2−1

−1 1−√5

2− 1

)→(

1 1+√5

2

0 0

)The general solution is (

ja

)=

(−1+

√5

2a

a

)20

Page 21: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

This time, let us choose a = −2, to minimize fractions and negative numbers.We obtain the vector

~v2 =

(1 +√

5−2

)which spans a line M , through the origin, the eigenspace of the eigenvalueλ2 = 1−

√5

2.

Thus we have found an eigenvector ~v2 of the matrix A with correspondingeigenvalue λ2:

A~v2 = λ2~v2

Again, it is a good idea to check our calculation:(0 11 1

)(1 +√

5−2

)= 1−

√5

2

(1 +√

5−2

)This time, both sides evaluate to

( −2√5−1

).

j

a

L = span v1

M = span v2

v1

v2

Figure 9: The two eigenspaces L and M

Let us recap: we set out to solve Equation (8). We found two solutionsfor λ: the eigenvalues λ1 and λ2, and for each of the two values of λ, we

21

Page 22: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

found a whole line of solutions for(ja

): the corresponding eigenspaces. In

each eigenspace we picked a basis vector: ~v1 in L, the eigenspace of λ1, and ~v2in M , the eigenspace of λ2. We have succeeded in finding a basis B = (~v1, ~v2)of the space of rabbit vectors R2, consisting of eigenvectors for the transitionmatrix A =

(0 11 1

).

Let us emphasize that the two eigenvalues are unique, but the correspond-ing eigenvectors are not. We are free to choose any spanning vectors ~v1, ~v2of the eigenspaces we like, but there is nothing we can do about the valuesλ1, λ2 of the eigenvalues.

Exact solution

The point is that if we start with either the rabbit vector ~v1 or ~v2, the futurebehaviour of the dynamical system is easy to describe: every time we multiply~v1 by the transition matrix A, we are really just multiplying by the scalarλ1, so

An~v1 = λn1~v1 , (15)

by applying (12) n times over. Writing this out, it becomes(0 11 1

)n(√5− 12

)= (1+

√5

2)n(√

5− 12

)The rabbit vector retains its direction, but gets longer by a factor of λ1, ateach iteration.

By the same token, if we start with ~v2, the future is clear:

An~v2 = λn2~v2 , (16)

or written out: (0 11 1

)n(1 +√

5−2

)= (1−

√5

2)n(

1 +√

5−2

)Because λ2 = 1−

√5

2is negative, the rabbit vector changes direction, each time

we multiply by λ2. Also, because the absolute value of λ2 = 1−√5

2is less than

1, the vector gets shorter at each iteration. But it always stays on the lineM .

Now, the crucial fact is that every rabbit vector ~r is a linear combinationof the two basic rabbit vectors ~v1 and ~v2. Since we know what happens to

22

Page 23: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

r0

r1r2

r3

j

aL

M

Figure 10: Three iterations of a rabbit vector ~r0. Notice how the M -component gets smaller and changes direction each time, and how the L-component keeps growing

~v1 and ~v2, and the transition from on month to the next is linear, we knowwhat happens to every rabbit vector. if, say

~r0 = c1~v1 + c2~v2 (17)

Then

~rn = An~r0

= An(c1~v1 + c2~v2) plug in (17)

= c1An~v1 + c2A

n~v2 rules for matrix multiplication

= c1λn1~v1 + c2λ

n2~v2 from (15) and (16)

= λn1c1~v1 + λn2c2~v2

23

Page 24: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Thus we have solved our dynamical system:(jnan

)= (1+

√5

2)nc1

(√5− 12

)+ (1−

√5

2)nc2

(1 +√

5−2

)(18)

In Figure 10, we have tried to sketch the situation: we have started witha vector ~r0, and have plotted three iterations of the dynamical system. Eachof the four rabbit vectors, we have written as a sum of its component alongL and its component along M . For example, ~r0 = c1~v1 + c2~v2, so c1~v1 is thecomponent along L and c2~v2, the component along M . The vector c1~v1 stayson L, the vector c2~v2 stays on M , but the linear combination ~r0 = c1~v1 +c2~v2moves around in the plane.

Finding the constants

The only thing still missing from (18) are the values of the constants c1 andc2. These we get from the initial condition, Equation (17), or by plugging inn = 0 into (18): (

10

)= c1

(√5− 12

)+ c2

(1 +√

5−2

)This inhomogeneous linear system is solved using the augmented coefficientmatrix: ( √

5− 1 1 +√

52 −2

∣∣∣∣ 10

)→(

1 −1√5− 1 1 +

√5

∣∣∣∣ 01

)→

→(

1 −1√5√

5

∣∣∣∣ 01

)→(

1 −15 5

∣∣∣∣ 0√5

)→(

1 00 1

∣∣∣∣∣√5

10√5

10

)The unique solution is (

c1c2

)=

(√5

10√5

10

)Plug this into (18) to obtain the final formula for ~rn(

jnan

)=√5

10

((1+√5

2)n(√

5− 12

)+ (1−

√5

2)n(

1 +√

5−2

))(19)

24

Page 25: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

For example, just looking at the second components, we get a formula forthe Fibonacci numbers:

an =√55

((1+√5

2)n − (1−

√5

2)n)

More detailed analysis

Now that we have Formula (19), we can give a more rigourous analysis ofthe long term behaviour of the dynamical system. The most important in-formation is contained in the two eigenvalues.

Since λ1 = 1+√5

2≈ 1.618 is greater than 1, we have

limn→∞

λn1 =∞ .

Since λ2 = 1−√5

2≈ −0.618 has absolute value less than 1, we have

limn→∞

λn2 = 0 .

Hence, the second summand of (19) converges to the zero vector:

limn→∞

((1−√5

2)n(

1 +√

5−2

))=

(00

)and so contributes less and less to ~rn, as n gets larger. So we can write(

jnan

)≈√5

10(1+√5

2)n(√

5− 12

)Thus we confirm what we saw above: in the long run, rabbit vectors just getrescaled by the factor λ1 = 1+

√5

2≈ 1.618, and

limn→∞

anjn

= 2√5−1 = 1+

√5

2≈ 1.618 .

We also get an approximate formula for Fibonacci numbers:

an ≈√52

(1+√5

2)n

and the limiting behaviour of successive Fibonacci numbers:

limn→∞

an+1

an= 1+

√5

2

All of this is because the bigger eigenvalue λ1 ends up dominating (19).

25

Page 26: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

The Golden Ratio

The number 1+√5

2is known as the golden ratio. It is one of the most famous

numbers in the history of art and mathematics (see wikipedia for moreinformation).

1-x

x

1

1

L

Figure 11: A golden rectangle. The small rectangle obtained by cutting off asquare from the golden rectangle is another golden rectangle. The diagonalof the golden rectangle is the eigenspace L

A golden rectangle, is a rectangle with the property that if you cut off asquare, the remaining rectangle is similar to, i.e., has the same shape as, theoriginal rectangle. Referring to Figure 11, suppose the shorter side of thegolden rectangle has length 1 and the larger length x, then

x : 1 = 1 : 1− x

the longer side the of the big rectangle x, is in the same relation to the shorterside 1, as the longer side 1, of the small rectangle is to its shorter side, 1−x.Rewriting this equality of relations in terms of fractions gives

x =1

1− x

26

Page 27: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

orx2 − x− 1 = 0

which is the characteristic equation (10) of the transition matrix A of theFibonacci dynamical system. The positive solution is

x =1 +√

5

2

which is the ratio of the long side to the short side of the golden rectangle,and is therefore called the golden ratio.

1.3 Predator-Prey System

Frogs and flies

Predator-Prey systems are often used as examples of linear dynamical sys-tems, even though this is usually not realistic. Here, we will try to describean example where a linear dynamical system may not be too far fetched (thenumbers are made up).

We follow the polulation growth of two animal species, frogs and fliesin a certain habitat. The frog population measures in millions and the flypopulation in billions, so we will take millions (106) as units for the size ofthe frog population and billions (109) as units to measure the size of the flypopulation. We check the population size once a year.

Flies have, in the absence of frogs, a growth rate of 122%. This means thatthe fly population will be larger by 22% after one year, if it not diminishedby the presence of frogs.

Frogs will prey on flies, and we assume that the decrease of the fly pop-ulation as a result of this, is directly proportional to the number of frogspresent. In fact, the impact of the predation by frogs on the fly populationis −36%. This means that the presence of 100 million frogs will diminishthe fly population by 36 billion. In other words, every frog will eat 360 fliesper year. The frogs are perfect predators: they will hunt down and eat therequired number of flies, no matter how scarce they are. They will not eatmore flies if flies are abundant.

Thus, there is no direct effect of a change of the fly population on thenumber of frogs. The way the fly population affects the frog population is byaffecting the reproduction rate of frogs. To justify that the increase of thefrog population due to the presence of flies depends linearly on the number of

27

Page 28: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

flies (in other words, that the increase of the frog population is proportionalto the number of flies), we assume that the frogs pretty much saturate theponds and lakes in the habitat with frog eggs and tadpoles each spring, andthat the tadpoles (which also eat flies) are not good hunters at all. Thenumber of tadpoles hatching in the spring is constant, and the number oftadpoles surviving to grow into frogs depends directly on the number of fliesthat are around. If there are three times as many flies, there will be threetimes as many surviving tadpoles. We will take the increase of the frogpopulation in response to the fly population to be 24%. Thus, 100 billionflies will result in 24 million tadpoles surviving to become frogs.

[Note that this increase is assumed to be independent of the numberof frogs. This may be the most unrealistic aspect of this model. Morerealistically, the number of tadpoles present in the spring would depend onthe number of frogs present, and the survival rate of tadpoles would dependon the fly population. So the increase of the frog population as a result ofthe presence of flies would depend on both the frog and fly population, butthis effect is not linear. The simplest dependence would be proportional tothe product of the two populations.]

Finally, we need the growth rate of the frog population in the absence offlies. It is 38%. This means that if there are no flies for the tadpoles or frogsto feed on, the frog population will decrease by 62% every year.

The problem we will solve is to find out what the long term behaviour ofthe frog and fly populations are. Under what conditions do these two speciesthrive, or under what conditions do they become extinct.

The model

We model the populations using frog-fly-vectors, or f -vectors. The f -vectorsare vectors

(gy

)∈ R2, where g counts the units of frogs (so g = 3 means 3

million frogs), and y counts the units of flies (so y = 5 means 5 billion flies).The values of g and y next year, i.e. gn+1 and yn+1 are given in terms of thevalues of g and s this year, by

gn+1 = .38gn + .24yn

yn+1 = −.36gn + 1.22yn

Or in matrix-vector notation:

~fn+1 =

(.38 .24−.36 1.22

)~fn

28

Page 29: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

The transition matrix of this dynamical system is

A =

(.38 .24−.36 1.22

)and the frog-fly vector after n years is given in terms of the initial frog-flyvector by

~fn = An ~f0

Solving the system

To find the eigenvalues of the transition matrix A, find its characteristicpolynomial:

det

(λ− .38 −.24.36 λ− 1.22

)= (λ− .38)(λ− 1.22) + .36 · .24

= λ2 − (.38 + 1.22)λ+ .38 · 1.22 + .36 · .24

= λ2 − 1.6λ+ .55

Use the quadratic formula to solve this quadratic equation for λ.

λ = 12(1.6±

√1.62 − 4 · .55)

= 12(1.6±

√2.56− 2.2)

= 12(1.6±

√.36)

= 12(1.6± .6)

= .8± .3

This gives us the two eigenvalues

λ1 = 1.1 λ2 = .5

The eigenspace E1 of λ1 is the null space of the matrix(1.1− .38 −.24.36 1.1− 1.22

)=

(.72 −.24.36 −.12

)−→

(3 −10 0

)One free variable means that E1 is one-dimensional. A convenient basis forE1 is the vector

~v1 =

(13

)29

Page 30: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

so

E1 = span~v1 = span

(13

)The eigenspace E2 of λ2 is the null space of the matrix(

.5− .38 −.24.36 .5− 1.22

)=

(.12 −.24.36 −.72

)−→

(1 −20 0

)One free variable means that E2 is one-dimensional. A convenient basis forE2 is the vector

~v2 =

(21

)so

E2 = span~v2 = span

(21

)We note that (~v1, ~v2) is a basis for the space R2 of all f -vectors. Now we

are ready to write down the general solution. If the initial f vector is

~f0 = c1~v1 + c2~v2 (20)

then the n-th f -vector is

~fn = An ~f0

= An(c1~v1 + c2~v2)

= c1An~v1 + c2A

n~v2

= c1λn1~v1 + c2λ

n2~v2

= 1.1nc1(13

)+ 0.5nc2

(21

)=

((1.1)nc1 + 2(.5)nc23(1.1)nc1 + (.5)nc2

)Thus, the frog population is given by

gn = (1.1)nc1 + 2(.5)nc2

and the fly population by

yn = 3(1.1)nc1 + (.5)nc2

The constants c1 and c2 are to be determined from ~f0, by solving (20). Sinceno initial condition is given, we cannot solve for c1 and c2, so we leave thesolution in the general form:(

gnvn

)= 1.1nc1

(13

)+ 0.5nc2

(21

)30

Page 31: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Discussion of the solution

Of course, the actual frog-fly vector ~f0 has to have positive components. Thatdoes not mean that c1 and c2 have to be positive.

Let us remark that limn→∞(1.1)n = ∞ and limn→∞(.5)n = 0. So, ifc1 > 0, then, no matter what c2 is, eventually the term 1.1nc1

(13

)will outgrow

the term 0.5nc2(21

)in the formula

~fn = 1.1nc1(13

)+ 0.5nc2

(21

)and both the frog and the fly population will grow at a rate of 1.1 or 110%per year. Moreover, the proportion of units of frogs to units of flies will getcloser and closer to 1 : 3.

On the other hand, if c1 < 0, then

limn→∞

1.1nc1

(13

)=

(−∞−∞

)which means that both populations will die out. The boundary case, whenc1 = 0 implies that ~fn = 0.5nc2

(21

), and the populations will also die out

eventually, but much slower.What is the meaning of c1 > 0 in terms of the initial f -vector ~f0? For

this, we go back to Equation (20), which we rewrite as(g0y0

)= c1

(13

)+ c2

(21

)or as

g0 = c1 + 2c2

y0 = 3c1 + c2

Let us eliminate c2 from these two equations by solving the second equationfor c2, and plugging the result into the first equation. We get:

g0 = c1 + 2(y0 − 3c1)

which we rearrange to2y0 − g0 = 5c1

So now we see that c1 > 0 if and only if 2y0 − g0 > 0, or, in other words,2y0 > g0, or y0 >

12g0.

31

Page 32: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Remember that c1 > 0 was the case of survival of both species. Weconclude that if initially there are more than half as many units of flies asunits of frogs, both species will thrive and in the long run, they will bothgrow at a rate of 110% per year. This means that in the beginning thereneed to be more than 500 million flies for every 1 million frogs. Moreover,in the long run, there will be approximately 3 billion flies for every 1 billionfrogs.

The phase portrait

We can get a better picture if we consider the phase portrait of the dynamicalsystem. The phase portrait is a graphical representation of the long termbehaviour of the dynamical system for different initial conditions. ThusFigure 4 is a phase portrait of the Vancouver-Richmond dynamical system.

The eigenspace analysis will help us sketch the phase portrait. We startby graphing the eigenspaces (Figure 12).

Some of the trajectories are very easy to sketch: if an f -vector is on oneof the eigenspaces, it stays there. If it is on E1, it gets bigger, as the yearsgo by (by a factor of 1.1 each year), if it is on E2, it gets smaller every year(by a factor of 0.5). On E1, the f -vectors move away from the origin, on E2,they move towards the origin. We indicate these observations in Figure 13.

What do the other trajectories look like? They are not lines, but curves.We can determine the asymptotic behaviour of these trajectories. Let usrecall the solution of the dynamical system:

~fn = 1.1nc1

(13

)+ 0.5nc2

(21

)As we have discussed, in the positive time line (as n→ +∞), the first term

1.1nc1

(13

)gets larger, whereas the second term 0.5nc2

(21

)goes to zero

(because 1.1 > 1 and 0.5 < 1). So the vector ~fn gets closer and closer to theline spanned by

(13

), which is E1. In other words, E1 is an asymptote of all

the trajectories.Let us see what happens as time runs backwards, i.e., as n → −∞. We

have

limn→−∞

1.1n = limn→∞

1.1−n = limn→∞

(1

1.1)n = lim

n→∞(10

11)n = 0

32

Page 33: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

g

y

E1 = span v1

E2 = span v2

v1

v2

1

1

3

2

32

Figure 12: The two eigenspaces

and

limn→−∞

0.5n = limn→∞

0.5−n = limn→∞

(1

0.5)n = lim

n→∞2n =∞

So along the negative time line, the behaviour is exactly the opposite: the

term 1.1nc1

(13

)goes to zero and the term 0.5nc2

(21

)gets bigger and big-

ger. Hence, as time goes backwards, the vector ~fn gets closer and closer tothe line spanned by

(21

), which is E2. So E2 is also an asymptote of all

the trajectories. We can thus roughly sketch a few more trajectories as inFigure 14.

The physically meaningful range of f -vectors (the first quadrant, whereboth g and y are greater than zero) is shaded light grey, the region leadingto eventual extinction is shaded dark grey. We see that, in fact, the fliesbecome extinct before the frogs do. (But, of course, after the trajectory

33

Page 34: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

g

y

E1

E2

Figure 13: The trajectories along the two eigenspaces

passes through the g-axis at y = 0, it ceases to be meaningful, as y, thenumber of flies cannot become negative).

We also see that if ~f0 starts out very close to E2, so that there are onlyslightly more flies than necessary to keep the populations from going extinct,the populations will first decrease, before they recover and start to grow.

Figure 15 is produced by a computer and contains more realistic trajec-tories. But note that we can get a pretty good qualitative picture withoutthe help of the computer.

The method of diagonalization

We have used the standard coordinate system in the space of frog-fly vectors.The standard coordinates are called g and y. The eigenbasis B = (~v1, ~v2)defines a new coordinate system in the vector space of frog-fly vectors. Let

34

Page 35: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

g

y

Figure 14: Very rough sketch of some more trajectories

us call T the linear transition transformation. The transformation T takesfrog-fly vectors this year as input, and outputs the frog-fly vectors of nextyear.

Recall the formula

[T ]E = P [T ]B P−1 (21)

Here [T ]E is the standard matrix of T . It is the matrix A, which was givenby the description of the dynamical system:

[T ]E = A =

(.38 .24−.36 1.22

)The matrix [T ]B has a very nice form: Note that

T (~v1) = A~v1 = λ1~v1 = 1.1~v1 = 1.1~v1 + 0~v2

35

Page 36: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

-40

x

40

40

20

0

20

-20

-40

0-20

Figure 15: A more realistic phase portrait done by computer. The blackcurves are the trajectories, the little red arrows give the direction of thetrajectories.

because ~v1 is an eigenvector of A with eigenvalue λ1 = 1.1. Thus

[T (~v1)]B =

(1.10

)(22)

For the same reason, we have

T (~v2) = A~v2 = λ2~v2 = 0.5~v2 = 0~v1 + 0.5~v2

36

Page 37: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

so

[T (~v2)]B =

(0

0.5

)(23)

Equations (22) and (23) give us the two columns of [T ]B:

[T ]B =

(1.1 00 0.5

)

The matrix of T with respect to the eigenbasis B is diagonalwith the eigenvalues on the diagonal.

The matrix P is the matrix which turns B-coordinate vectors into E-coordinate vectors, it has the vectors ~v1 and ~v2 as columns:

P =

(1 23 1

)Its inverse is

P−1 = 15

(−1 23 −1

)Now Formula (21) reads(

.38 .24−.36 1.22

)=

(1 23 1

)(1.1 00 0.5

)15

(−1 23 −1

)(24)

(It is a good idea to check that this is correct.) The whole point of calculatingthe eigenvalues and the eigenvectors is to obtain the factorization (24). Wealso write it like this:

A = P DP−1 (25)

where D stands for diagonal.Remember that to solve the dynamical system it is enough to calculate

the powers of the matrix A:~fn = An ~f0 (26)

The factorization (25) is useful. For example, for A3:

A3 = (P DP−1)3

= (P DP−1)(P DP−1)(P DP−1)

37

Page 38: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

= P D(P−1 P )D(P−1 P )DP−1 by re-bracketing

= P D I D I DP−1 because P−1P = I

= P DDDP−1 the identity matrix I has no effect

= P D3 P−1

The same works for every n:

An = P Dn P−1 (27)

But the powers of a diagonal matrix are easy:

D3 =

(1.1 00 0.5

)3

=

(1.1 00 0.5

)(1.1 00 0.5

)(1.1 00 0.5

)=

(1.12 0

0 0.52

)(1.1 00 0.5

)=

(1.13 0

0 0.53

)(28)

and in general

Dn =

(1.1n 0

0 0.5n

)Plugging this into (27) gives(

.38 .24−.36 1.22

)n= An = P Dn P−1

= P

(1.1n 0

0 0.5n

)P−1

=

(1 23 1

)(1.1n 0

0 0.5n

)15

(−1 23 −1

)=

(1.1n 2 · 0.5n

3 · 1.1n 0.5n

)15

(−1 23 −1

)= 1

5

(−1.1n + 6 · 0.5n 2 · 1.1n − 2 · 0.5n−3 · 1.1n + 3 · 0.5n 6 · 1.1n − 0.5n

)Thus, we have finally succeeded in computing the powers of the transitionmatrix A. We now simply plug this result into (26) to get the general formula

for ~fn in terms of ~f0

~fn =

(gnyn

)= 1

5

(−1.1n + 6 · 0.5n 2 · 1.1n − 2 · 0.5n−3 · 1.1n + 3 · 0.5n 6 · 1.1n − 0.5n

)(g0y0

)38

Page 39: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

= 15

(−g01.1n + 6g00.5

n + 2y01.1n − 2y00.5

n

−3g01.1n + 3g00.5

n + 6y01.1n − y00.5n

)= 1

5

((−g0 + 2y0)1.1

n + (6g0 − 2y0)0.5n

(−3g0 + 6y0)1.1n + (3g0 − y0)0.5n

)= 1

51.1n

(−g0 + 2y0−3g0 + 6y0

)+ 1

50.5n

(6g0 − 2y03g0 − y0

)From this formula we can also read off the condition that the populations donot die out: the vector multiplying the expression 1.1n has to have positivecomponents, which means that −g0 + 2y0 > 0 and −3g0 + 6y0 > 0. Theseinequalities are both equivalent to 2y0 > g0, which is the same answer weobtained by looking at the phase portrait.

To summarize, let us write down the frog and fly populations after n yearsin terms of the initial populations:

gn = 15(− g0 + 2y0)1.1

n + 15(6g0 − 2y0)0.5

n

yn = 15(−3g0 + 6y0)1.1

n + 15(3g0 − y0)0.5

n

Concluding remarks

A more commonly used model for the predator-prey dynamics, which is oftenmore realistic, is the so-called Lotka-Volterra Model. In our example, it wouldlook something like this:

gn+1 = .38gn + .24gnyn

yn+1 = −.36gnyn + 1.22yn

The growth terms in the absence of the other species are the same as inour linear model, but the cross terms which describe how the two speciesinfluence each other are proportional to the product gnyn. This expressesthe fact that for predation to occur, the predator actually has to encounterthe prey, and the likelihood of that happening depends on the product ofthe two population sizes. But this model is not linear, the vector

( gn+1yn+1

)cannot be obtained from

(gnyn

)by multiplying by a matrix with real numbers

as entries. The transition transformation is not a linear transformation, thedynamical system is not linear. It cannot be solved by our methods.

39

Page 40: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

1.4 Summary of the Method

The discrete dynamical system is described by the formula

~xn+1 = A~xn (29)

Here ~x ∈ Rk is the state vector and A ∈ Mk×k(R) is the transition matrix.The solution to (29) is

~xn = An~x0 (30)

where ~x0 is the initial state.To solve the system (or to make the solution (30) explicit), we use the

method of eigenvalues. We start with the characteristic polynomial of thematrix A:

det(λIk − A)

This is a polynomial of degree k in the variable λ with coefficients in R. Theeigenvalues of A are the solutions of the characteristic equation

det(λIk − A) = 0

Suppose the eigenvalues are λ1, . . . , λr (the number of eigenvalues r satisfiesr ≤ k). For each eigenvalue λj the null space of the matrix

λjI − A

or the solution space of the homogeneous system of equations

(λjI − A)~x = ~0

is the eigenspace corresponding to the eigenvalue λj, notation Ej. We find abasis Bj of Ej.

Fact 1 If you put all the basis B1 . . . ,Br of all the eigenspaces E1, . . . , Erof all the eigenvalues λ1, . . . , λr together in one set B, you get a linearlyindependent set of vectors in Rk.

It may or may not be the case that the vectors in the resulting set B spanRk. There may be fewer than k vectors in B. If this happens, the methodbreaks down.

So, we will now assume that there are k vectors in B, so that B spans Rk

and is therefore a basis of Rk, an eigenbasis (with respect to A).

40

Page 41: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Let B = (~v1, . . . , ~vk) be the vectors in B. Each of these vectors is aneigenvector, and we let λ1, . . . , λk be the corresponding eigenvalues. This mayresult in repetitions on the list λ1, . . . , λk, because some of the eigenspacesmay have dimension bigger than 1 (each λj appears on the list (dimEj)-manytimes).

The method of undetermined coefficients

Supposing that we found an eigenbasis B = (~v1, . . . , ~vk) with correspondingeigenvalues λ1, . . . , λk, the general solution to (29) is

~xn = c1λn1~v1 + . . .+ ckλ

nk~vk (31)

The numbers c1, . . . , ck are the (as yet) undetermined coefficients. Everythingelse on the right hand side of (31) is explicitly known at this point (exceptfor n, which is the ‘time variable’).

The coefficients c1, . . . , ck are determined by the initial state ~x0, if theinitial state is given: plug in n = 0 into (31):

~x0 = c1~v1 + . . .+ ck~vk

This gives the inhomogeneous system of linear equations | |~v1 · · · ~vk| |

c1...ck

= ~x0

which we solve for the vector of coefficients ~c =( c1...ck

)The method of diagonalization

Again, supposing that we found an eigenbasis B = (~v1, . . . , ~vk) with corre-sponding eigenvalues λ1, . . . , λk, we write down the change of basis matrix

P =

| |~v1 · · · ~vk| |

41

Page 42: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

and the diagonal matrix

D = [A]B =

λ1 . . . 0...

. . ....

0 . . . λk

and then write down the change of basis formula

A = [A]E = P [A]B P−1 = P DP−1

which gives a formula for An

An = P Dn P−1

recalling that the powers of a diagonal matrix are straightforward to compute.More explicitly, we get

An =

| |~v1 · · · ~vk| |

λ

n1 . . . 0...

. . ....

0 . . . λnk

| |~v1 · · · ~vk| |

−1

Plugging this into (30) we write down the solution:

~xn =

| |~v1 · · · ~vk| |

λ

n1 . . . 0...

. . ....

0 . . . λnk

| |~v1 · · · ~vk| |

−1 ~x0The long term behaviour

Still, we assume that we found an eigenbasis B = (~v1, . . . , ~vk) with corre-sponding eigenvalues λ1, . . . , λk.

Let us make a few simplifying assumptions: we will assume that one ofthe eigenvalues, say λ1 is larger than the absolute value of all the others

λ1 > |λ2| . . . λ1 > |λk|

and that the dimention of the corresponding eigenspace is 1, so that

E1 = span~v1

42

Page 43: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Largest eigenvalue greater than 1. First, let us examine the case thatthe biggest eigenvalue λ1 is larger than 1:

λ1 > 1

We also have to make sure that the initial condition is such that c1 does notvanish

c1 6= 0

Under these assumptions, the long term behaviour of the dynamical systemis determined by λ1 and E1. Considering the general solution

~xn = c1λn1~v1 + . . .+ ckλ

nk~vk

we see that the term c1λn1~v1 outgrows all the others, because λn1 goes to

infinity faster than any of the other terms λn2 , . . . , λnk (which may not even go

to infinity at all). Depending on the numerical values of the entries in c1~v1,the individual components of the state vector ~xn may go to +∞, −∞ or 0.Moreover, the direction of the state vector approaches E1

limn→∞

~xn||~xn||

∈ span~v1

Largest eigenvalue equal to 1. This time let us assume that λ1 = 1.Then all other eigenvalues are less than 1 in absolute value so

limn→∞

λn2 = 0 . . . limn→∞

λnk = 0

and we have

limn→∞

~xn = limn→∞

(c1λn1~v1 + c2λ

n2~v2 + . . .+ ckλ

nk~vk)

= c1( limn→∞

λn1 )~v1 + c2( limn→∞

λn2 )~v2 + . . .+ ck( limn→∞

λnk)~vk

= c1( limn→∞

1n)~v1 + c2 · 0 · ~v2 + . . .+ ck · 0 · ~vk

= c1~v1

so the state vector ~xn converges, and it converges to a point in E1, namelyc1~v1 ∈ span~v1. The limit point on E1 depends on the initial state (whichdetermines c1).

43

Page 44: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Largest eigenvalue less than 1. In this case all the eigenvalues haveabsolute value less than 1. So limn→∞ λ

nj = 0, for all eigenvalues λj, and so

limn→∞

~xn = 0

no matter what the initial state is, in the long term the state vector convergesto the zero vector, all components of the state vector converge to 0.

1.5 Worked Examples

A 3-dimensional dynamical system

The problem Three mobile telephone companies are competing for cus-tomers in Vancouver. Figure 16 shows the yearly patterns according to whichthey lose customers to each other. Suppose the current market shares of thethree companies are: Fido 20%, Telus 40% and Rogers 40%. Give formulaspredicting the market shares after n years. What are the market shares inthe long run? How many years until the market share of Telus drops below12%?

Fido

Telus

Rogers15%

5%

15%

30%5%

30%

Figure 16: The highly competitive market for cell phone customers in Van-couver

The solution Let us use state vectors( xyz

)where x, y and z are the market

shares of Fido, Telus and Rogers, in that order. The migration patterns in

44

Page 45: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Figure 16 translate into the following three equations

xn+1 = 80100xn + 30

100yn + 30

100zn

yn+1 = 5100xn + 55

100yn + 5

100zn

zn+1 = 15100xn + 15

100yn + 65

100zn

or the single matrix equationxn+1

yn+1

zn+1

=1

100

80 30 305 55 515 15 65

xnynzn

Thus, the transition matrix for our dynamical system is

A =1

100

80 30 305 55 515 15 65

=1

20

16 6 61 11 13 3 13

The characteristic polynomial is

det(λI3 − A) = det

λ− 1620

− 620

− 620

− 120

λ− 1120

− 120

− 320

− 320

λ− 1320

= det

1

20

20λ− 16 −6 −6−1 20λ− 11 −1−3 −3 20λ− 13

=

1

8000det

20λ− 16 −6 −6−1 20λ− 11 −1−3 −3 20λ− 13

We have to be very careful with the overall factor 1

20. We cannot ignore

it. In either expression for the determinant it is present: either in manydenominators, or as a factor in front of λ. Let us use the expression with thefractions:

det

λ− 1620

− 620

− 620

− 120

λ− 1120

− 120

− 320

− 320

λ− 1320

=

= (λ− 1620

)(λ− 1120

)(λ− 1320

) + 6·1·3203

+ 6·1·3203− 1·3

202(λ− 16

20)− 6·1

202(λ− 13

20)− 6·3

202(λ− 11

20)

45

Page 46: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

= λ3 − 16+11+1320

λ2 + 11·13+16·13+16·11202

λ− 16·11·13203

+ 36203− 3+6+18

202λ+ 3·16+6·13+18·11

203

= λ3 − 2λ2 + 2520λ− 5

20

= λ3 − 2λ2 + 54λ− 1

4

In general, it is not so easy to find the roots of a cubic polynomial, but inthis case we know that one of the eigenvalues will be 1, because we expectthere to be a state at which the system stabilizes (no customers are lostor gained overall), which means there will be fixed points, and fixed pointsare eigenvectors with eigenvalue 1. And, indeed, a quick calculation showsthat we get 0, if we plug in λ = 1 into λ3 − 2λ2 + 5

4λ− 1

4. To find the other

eigenvalues, we factor out the factor λ−1 from the characteristic polynomial:we do (long) polynomial division of λ3−2λ2+ 5

4λ− 1

4by λ−1 to get λ2−λ+ 1

4,

in other words

λ3 − 2λ2 + 54λ− 1

4= (λ− 1)(λ2 − λ+ 1

4)

Now we are reduced to solving the quadratic λ2−λ+ 14, which is easily done,

and we obtain only one solution λ = 12. So the characteristic polynomial

factors as

det(λI3 − A) = λ3 − 2λ2 + 54λ− 1

4= (λ− 1)(λ− 1

2)2

and so the two eigenvalues are λ1 = 1 and λ2 = 12. We follow the usual

convention that the largest eigenvalue comes first.The eigenspace of λ1 = 1 is the null space of the matrix1− 16

20− 6

20− 6

20

− 120

1− 1120

− 120

− 320

− 320

1− 1320

−→ 4 −6 −6−1 9 −1−3 −3 7

−→1 0 −2

0 1 −13

0 0 0

with one free variable z and general solutionxy

z

=

2z13zz

= z

213

1

As basis for the eigenspace E1 of the eigenvalue λ1 = 1, let us take ~v1 =

( 613

),

so as to avoid unsightly fractions.The space E1 is the space of fixed points. We have found that it is one-

dimensional. We also know that all other eigenvalues are smaller than λ1 = 1

46

Page 47: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

in absolute value, so we know that the state vector will converge to a point

in E1. So the limiting market share vector is c( 613

), for some scalar c. Since

the total market share is 1, we see that c must be c = 110

, and the limitingmarket shares are x∞ = 6

10, y∞ = 1

10, z∞ = 3

10, or Fido 60%, Telus 10% and

Rogers 30%. This answers the second question.The eigenspace of λ2 = 1

2is the null space of the matrix1

2− 16

20− 6

20− 6

20

− 120

12− 11

20− 1

20

− 320

− 320

12− 13

20

−→−6 −6 −6−1 −1 −1−3 −3 −3

−→1 1 1

0 0 00 0 0

with two free variables y and z and general solutionxy

z

=

−y − zyz

= y

−110

+ z

−101

We see that the second eigenspace E2 is 2-dimensional. As a basis for E2 we

may take the two vectors ~v2 =( −1

10

)and ~v3 =

( −101

).

Since the dimensions of the eigenspaces add up to 3, the eigenvaluemethod works. We have the eigenbasis

~v1 =

613

~v2 =

−110

~v3 =

−101

with corresponding eigenvalues

λ1 = 1 λ2 =1

2λ3 =

1

2

We have now started to list the second eigenvalue twice, because itseigenspace E2 is 2-dimensional.

Since we are given an explicit initial vectorx0y0z0

=

210410410

(32)

let us use the method of undetermined coefficients to solve the dynamicalsystem. The solution isxnyn

zn

= c1λn1~v1 + c2λ

n3~v2 + c3λ

n3~v3

47

Page 48: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

= c11n

613

+ c2(12)n

−110

+ c3(12)n

−101

(33)

For n = 0, we getx0y0z0

= c1

613

+ c2

−110

+ c3

−101

Plugging in (32) we obtain

c1

613

+ c2

−110

+ c3

−101

=

210410410

Or equivalently, 6 −1 −1

1 1 03 0 1

c1c2c3

=

210410410

We use Gaussian elimination on the augmented coefficient matrix6 −1 −1 | 2

10

1 1 0 | 410

3 0 1 | 410

−→1 0 0 | 1

10

0 1 0 | 310

0 0 1 | 110

to obtain the unique solutionc1c2

c3

= 110

131

which we plug into (33) to get the final solutionxnyn

zn

= 110

613

+ 310

(12)n

−110

+ 110

(12)n

−101

= 1

10

613

+ 110

(12)n(

3

−110

+

−101

)

48

Page 49: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

= 110

613

+ 110

(12)n

−431

or in terms of the individual market shares:

xn = 610− 4

10(12)n

yn = 110

+ 310

(12)n

zn = 310

+ 110

(12)n

These are the formulas predicting the market shares after n years. (A goodidea is to check at this point that for n = 0 we do get the initial condition,and for n→∞ we get the limiting market shares.)

Note that yn starts out at 410

and converges to 110

and decreases in amonotone fashion, so there will be a point when yn drops below 12%. Tofind out for what value of n the Telus market share yn drops below 12% weneed to solve the equation 12

100= yn or

12100

= 110

+ 310

(12)n

for n. Isolate the term involving n on one side:

310

(12)n = 2

100

simplify slightly:15(1

2)n = 1

Take the logarithm on both sides:

ln(15)− n ln(2) = 0

and solve for n:

n =ln(15)

ln(2)≈ 3.9

So after n = 4 years, the Telus market share y4 will have dropped below 12%.

The powers of a matrix

The problem. Find a formula for An, where

A =1

3

4 2 28 19 4−10 −20 −5

49

Page 50: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

The solution. We will diagonalize A. The characteristic polynomial of Ais

det(λI3 − A) = det

λ− 43−2

3−2

3

−83

λ− 193−4

3103

203

λ+ 53

= (λ− 4

3)(λ− 19

3)(λ+ 5

3) + 80

27+ 320

27+ 80

9(λ− 4

3)− 16

9(λ+ 5

3) + 20

9(λ− 19

3)

= λ3 − 6λ2 − 399λ+ 380

27+ 400

27+ 84

9λ− 780

27

= λ3 − 6λ2 + 5λ

Again, we are lucky that we can find the roots of the cubic: λ = 0 is anobvious root, which we can easily factor out, and the remaining quadratic isalso easy to factor::

det(λI3 − A) = λ3 − 6λ2 + 5λ = λ(λ2 − 6λ+ 5) = λ(λ− 1)(λ− 5)

We read off the three eigenvalues λ1 = 5, λ2 = 1 and λ3 = 0, keeping withthe convention to take the largest one first.

Now is a good moment to pause and notice that we found 3 differenteigenvalues. We will be able to find an eigenvector for each. These 3 eigen-vectors will have to be linearly independent, by Fact 1 on Page 40. So theywill give us an eigenbasis and so the method of eigenvalues will work.

The eigenspace E1 corresponding to the eigenvalue λ1 = 5 is the nullspace of the matrix5− 4

3−2

3−2

3

−83

5− 193−4

3103

203

5 + 53

−→11 −2 −2−8 −4 −410 20 20

−→1 0 0

0 1 10 0 0

with one free variable z, which we set equal to 1 to obtain the basis

~v1 =

0−11

of E1.

The eigenspace E2 corresponding to the eigenvalue λ2 = 1 is the nullspace of the matrix1− 4

3−2

3−2

3

−83

1− 193−4

3103

203

1 + 53

−→−1 −2 −2−8 −16 −410 20 8

−→1 2 0

0 0 10 0 0

50

Page 51: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

with one free variable y, which we set equal to 1 to obtain the basis

~v2 =

−210

of E2.

The eigenspace E3 corresponding to the eigenvalue λ3 = 0 is the nullspace of the matrix0− 4

3−2

3−2

3

−83

0− 193−4

3103

203

0 + 53

−→−4 −2 −2−8 −19 −410 20 5

−→1 0 1

2

0 1 00 0 0

with one free variable z, which we set equal to 2 to obtain the basis

~v3 =

−102

of E3.

Thus, we have found an eigenbasis B = (~v1, ~v2, ~v3) of R3. The change-of-coordinates-matrix is

P =

| | |~v1 ~v2 ~v3| | |

=

0 −2 −1−1 1 01 0 2

We find its inverse: 0 −2 −1 | 1 0 0

−1 1 0 | 0 1 01 0 2 | 0 0 1

−→1 0 0 | −2

3−4

3−1

3

0 1 0 | −23−1

3−1

3

0 0 1 | 13

23

23

so

P−1 =1

3

−2 −4 −1−2 −1 −11 2 2

Now we have the ingredients for the formula

An = P Dn P−1

51

Page 52: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

where D is the diagonal matrix with the eigenvalues on the diagonal. Weplug in our matrices and we get

An = P Dn P−1

=

0 −2 −1−1 1 01 0 2

5n 0 00 1n 00 0 0n

1

3

−2 −4 −1−2 −1 −11 2 2

=

1

3

0 −2 −1−1 1 01 0 2

5n 0 00 1 00 0 0

−2 −4 −1−2 −1 −11 2 2

=

1

3

0 −2 0−5n 1 05n 0 0

−2 −4 −1−2 −1 −11 2 2

=

1

3

4 2 22 · 5n − 2 4 · 5n − 1 5n − 1−2 · 5n −4 · 5n −5n

which is the answer to the question. Recalling the original value of A, wecan rewrite our answer as

An = (13)n

4 2 28 19 4−10 −20 −5

n

=1

3

4 2 22 · 5n − 2 4 · 5n − 1 5n − 1−2 · 5n −4 · 5n −5n

But we should be careful to specify that this formula only holds for n ≥ 1.This is because only for n ≥ 1 is it true that 0n = 0, which we used in ourabove calculation. For n = 0, we have 0n = 1, and so our above calculationis wrong. The correct answer for this case is A0 = I3, which we know anywaywithout calculation. Because 0 is an eigenvalue of A, the matrix A is singular(its null space is E3, which we calculated above, and saw to be non-trivial),and so A does not have an inverse. Therefore A−1 and all other negativepowers of A do not exist. So An, for n < 0 is not defined.

In the case of a matrix where all eigenvalues are non-zero, you will get aformula which applies for all integers n, positive and negative.

We can also rewrite our answer without fractions, but this will give us

52

Page 53: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

the formula for the n-th power of a different matrix, not A: 4 2 28 19 4−10 −20 −5

n

= 3n−1

4 2 22 · 5n − 2 4 · 5n − 1 5n − 1−2 · 5n −4 · 5n −5n

It is always a good idea to check that our answer makes sense. In general,good cases to check are n = 0 (where we should be getting the identitymatrix) and n = 1 (where we should be getting the matrix we started with).In our case, because the matrix is singular, we can only check our resultagainst n = 1, or other positive powers.

1.6 More on Markov processes

Definition 2 A stochastic matrix is a square matrix A, such that

(i) every entry of A is non-negative,

(ii) every column of A adds to 1.

A discrete dynamical system with a stochastic transition matrix is calleda Markov process, or a Markov chain.

Both the Vancouver-Richmand population problem, and the cell phonecustomer problem were described by a stochastic matrix. If we think ofpopulation dynamics, as in these two examples, the fact that the overallpopulation stays constant implies that the transition matrix is stochastic.This is because the i-th column of the transition matrix describes the outflowfrom the i-th city or phone company. The total migration out of every cityor phone company is 1.

For every stochastic matrix we can draw a graph such as Figure 16 orFigure 1, and for every such graph, we can find the corresponding stochas-tic matrix. The two representations of the dynamical system are entirelyequivalent.

Theorem 3 Let A be a stochastic matrix. Then 1 is an eigenvalue of A. Ifλ is an eigenvalue of A (real or complex), then |λ| ≤ 1.

Proof. Let us prove that 1 is an eigenvalue. Suppose B is a matrix whoserows add to 1. Then you can check that the vector ~v, all of whose entries are1 is an eigenvector of B, with eigenvalue 1. So 1 is a root of the characteristic

53

Page 54: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

polynomial of B. But a matrix and its transpose have the same characteristicpolynomial, and hence the same eigenvalues.

The fact about the other eigenvalues is also not hard to prove, but it isalso intuitive: if there were an eigenvalue λ, with |λ| > 1, the system wouldexhibit long-term overall growth behaviour, which is impossible, because theoverall population stays constant, for a Markov process. �

Theorem 4 (Perrin-Frobenius) Suppose all entries of the stochastic ma-trix A are positive, i.e., non-zero. Then all eigenvalues λ other than 1 satisfy|λ| < 1, and 1 is a simple eigenvalue, i.e., its algebraic multiplicity is equalto 1.

Moreover, there exists a fixed vector all of whose components are positive.

This theorem says that if a Markov process has a positive transition ma-trix (i.e., all entries are positive) then, no matter what the initial condition is,the system will converge to a steady state, and the steady state is unique upto rescaling. (The correct scaling factor can be determined from the overallpopulation.) The ‘moreover’ ensures that none of the individual populationswill die out, or become negative. The solution is physically viable.

Unfortunately, this theorem does not hold if the stochastic matrix haszero entries.

Example 5 Consider the stochastic matrix

A =

2/3 1/2 0 01/3 1/2 0 00 0 1/3 1/20 0 2/3 1/2

.

The associated graph is

11/3((2

1/2

hh 32/3((4

1/2

hh .

No matter the initial condition, the system will converge to an equilib-rium point. But the equilibrium will depend on the initial condition. Theeigenspace E1 is two-dimensional.

3200

0034

54

Page 55: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

are two linearly independent fixed vectors.Thinking in terms of cities and their populations, we can group Cities 1

and 2 into Country A, and Cities 2 and 3 into Country B. Then the equilib-rium point will depend on how the initial population is distributed betweenthe two countries, because there is no interaction between the two countries.

We see that the fact that the graph is not connected is responsible forthe ambiguity in the equilibrium state.

Example 6 Consider the stochastic matrix

B =

1 1/4 00 5/12 00 1/3 1

.

The associated graph is

1 21/3 //1/4oo 3 .

This time the graph is connected, but there are still two linearly independent

equilibria, namely( 100

)and

( 001

).

All that happens in this Markov process is that City 2 gets depleted overtime, and its popultian moves to Cities 1 and 2. The limiting distributiondepends on the initial condition.

The problem with this example is that there is no way for any popultionto move from City 1 to City 3, or from City 3 to City 1.

Because of these two examples, we introduct the following notion.

Definition 7 The stochastic matrix A is called irreducible, if the associ-ated graph is strongly connected, which means that you can get from eachvertex to every other vertex by following along arrows with strictly positivepercentages on them.

So the graph in Example 6 is not strongly connected, the stochastic matrixB is not irreducible. Of course, every positive stochastic matrix as in thePerrin-Frobenius theorem is strongly connected, because there is an arrowfrom every vertex to every other vertex.

Theorem 8 If A is an irreducible stochastic matrix, then the eigenvalue 1is a simple eigenvalue (it is a simple root of the characteristic polynomial).

55

Page 56: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

In particular, the eigenspace E1 is one-dimensional, so the steady state isunique up to scaling.

Moreover, there exists a steady state where all entries are positive.

Example 9 Here is a simple example of a stochastic matrix which is notpositive, but still irreducible.

C =

2/3 1/2 01/3 1/6 1/20 1/3 1/2

,

with associated graph

11/3((2

1/3((

1/2

hh 31/2

hh .

The space of fixed point is span

964

, which is indeed one-dimensional.

Irreducible stochastic matrices can still exhibit undesirable behaviour.

Example 10 Consider the reflection matrix

A =

(0 11 0

).

It is a stochastic matrix. The corresponding graph is

11((2

1

hh .

In fact, A is an irreducible stochastic matrix, you can get from Vertex 1 toVertex 2 and from Vertex 2 to Vertex 1 by following along one of the arrowsin the graph. So we know, by Theorem 8 that there is a unique steady state,up to scaling.

At each iteration, the populations swap completely. Everyone in City 1moves to City 2, and everyone in City 2 moves to City 1. If, initially, thepopulations of the two cities are equal, they will remain equal, and we are inthe (unique) steady state. If we start with an unbalanced initial condition,the population of each city will oscillate, with a period of 2 (all odd years

56

Page 57: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

have the same population, and all even years have the same population,everything repeats after two years). This stochastic matrix has a period of 2.

The eigenvalues of A are 1 and −1. The oscillatory behaviour is due tothe eigenvalue −1, which is not equal to 1, but has absolute value 1.

Example 11 Consider the 3× 3-matrix

B =

0 1 00 0 11 0 0

.

It is a stochastic matrix. The corresponding graph is

1

1 ��

21oo

3 .

1

OO .

Again, B is irreducible, and the steady state corresponds to equal populationin the three cities.

But unless the initial condition is completely balanced, the populationsoscillate, this time with a period of 3. In each city, the population numberrepeats with a cycle of 3 iterations.

The characteristic polynomial of B is λ3 − 1 = (λ − 1)(λ2 + λ + 1). Asexpected (λ− 1) occors with multiplicity 1 in this degree 3 polynomial. Thetwo other eigenvalues are complex, and they both have absolute value 1.Again, the oscillatory behavior is due to these eigenvalues which are not 1,but have absolute value 1.

We can see where the oscillatory behaviour in these two examples comesfrom: the cities can be arranged in a circle, such that all arrows in the circlego around in the same direction, and are all labelled with 1, correspondingto 100% population movement. We have to exclude such graphs, if we wantto assure convergence to a steady state.

Example 12 Consider the irreducible stochastic matrix

C =

0 1 1 00 0 0 1/30 0 0 2/31 0 0 0

57

Page 58: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

whose associated graph looks like this

11

��

21oo

3

1

OO

4 .

1/3

OO

2/3oo

Again, there is oscillatory behaviour, althout it is a bit less obvious. But wecan group the 4 cities into 3 contries, such that we have a cycle of length 3between countries, instead of cities, exactly like in Example 11. In fact, letCity 1 occupy Country A, group Cities 2 and 3 together into Country B, andlet City 4 by its own Country C. This corresponds to partitioning the matrixinto blocks:

C =

0 1 1 00 0 0 1/30 0 0 2/31 0 0 0

,

which looks exactly like B if you ‘squint your eyes’.

Theorem 13 Let A be an irreducible stochastic matrix. Suppose that thereis no way to group the vertices of the associated graph into groups, and thenput the groups into a circle, such that there is 100% population movement inone direction around the circle of groups (ignoring what happens inside eachgroup). Then all eigenvalues λ 6= 1 of A (real and complex) satisfy |λ| < 1.

So in this case, no matter what the initial condition is, the Markov processassociated to A will converge to a steady state, this steady state is uniqueup to scaling, and all of its components are positive.

So under the conditions of this last theorem, we only need to solve thefixed point equation to determine the long-term behaviour of the Markovprocess. The fixed point equation will give us the proportional populations,and we can determine the exact equilibrium populations from the overallpopulation. Moreover, we can be sure that none of the individual populationsdie out or become negative.

Remark 14 In this course, you should assume that all Markov processesyou encounter have a one-dimensional fixed space, and exhibit no oscilla-tory behaviour. You will not be expected to check for irreducibitliy of thestochastic transition matrix, or verify that there is no oscillatory behaviour.

58

Page 59: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

1.7 Exercises

Exercise 1.1 Without calculating the characteristic polynomial of A, de-termine which of λ = 0, 1, 2, 3 are eigenvalues of the matrix

A =

2 1 01 −1 10 1 2

Exercise 1.2 Find all equilibrium points of the dynamical system with tran-sition matrix

A =

2 −1 01 1 10 0 1

Exercise 1.3 Referring to the migration problem between Vancouver andRichmond, find exact formulas for vn and rn. The initial conditions arev0 = 300 and r0 = 100, as in the text.

Exercise 1.4 Repeat the analysis of the Fibonacci system, but assume thatevery adult pair of rabbits produces 2 pairs of offspring every month. (Theinitial condition is the same: 1 juvenile pair.) In particular, find exact for-mulas for jn and an, find limn→∞

anjn

and limn→∞an+1

an

Exercise 1.5 Solve the 2× 2 dynamical system

xn+1 = xn − ynyn+1 = 2xn + 4yn

x0 = 2

y0 = 5

This means to find the formulas for xn and yn in terms of n.

Exercise 1.6 Find the general solution of the dynamical system

~xn+1 = 121

(37 1015 12

)~xn

and sketch the phase portrait. What initial conditions will prevent the systemfrom growing beyond all bounds?

59

Page 60: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Exercise 1.7 Find a formula for(0 11 1

)n, the n-th power of the transition

matrix of the Fibonacci system.

Exercise 1.8 Modify the numbers in the rabbit problem, to make it morerealistic. Assume that the likelihood for an adult pair to produce offspringin one month is only 3 out of 5 or 60%. Also, assume that the death rateof adult rabbits is 50%, which means that out of 100 adult pairs of rabbits,only 50 will survive until the next month. Also, the death rate of juvenilerabbits is 1 in 3, so that the likelihood of a juvenile pair of rabbits to growinto an adult pair of rabbits is 2

3. Determine if the rabbit population will

survive, or if it will die out. Find the limiting growth rate of the population.(Hint: you do not need to find the exact solution of the dynamical system,you only need to find the eigenvalues, to solve this problem.)

Assuming the same birth rate and death rate for adult rabbits, what isthe smallest survival rate for juveniles which will assure the survival of therabbit population?

Exercise 1.9 Solve the 3× 3 dynamical system with transition matrix

A =1

3

7 −2 23 0 10 0 1

and initial condition x0y0

z0

=

515−5

(Hint: one of the eigenvalues of A is 2.)

Exercise 1.10 Find a formula for An, where A =

2 1 01 1 10 1 2

2 Continuous Dynamical Systems

2.1 Flow Example

Two cubic metres (2m3) of a pollutant are spilled into Upper Lake. Predictthe time dependence of the concentration of the pollutant in Lower Lake.

60

Page 61: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

At what point in time does the concentraion of the pollutant in Lower Lakereach its maximal value? Will Lower Town on Lower Lake have to closeits beach? (The health board considers a concentration of 0.008 ppb (partsper billion) of this particular chemical to be safe for swimming, but requiresbeaches to be closed, if the concentration exceeds this value.) If so, for howlong will the beach need to be closed?

Spill: 2m3 pollutant

Beach Resort:

Lower Lake

50 km3

100 km3

Upper Lake

River: 3km3 per day

maximal concentration of pollutant: 0.008 ppb

Figure 17: The lay of the land

Upper Lake has a volume of 50 km3, Lower Lake a volume of 100 km3. Ariver flows into Upper Lake, connects the two lakes and flows out of LowerLake. The river flows at a rate of 3 km3 per day.

Let us use state vectors(xy

), where x is the amount of pollutant in Upper

Lake and y the amount of pollutant in Lower Lake, both measured in m3.The state vector will be time dependent.

2.2 Discrete Model

If we model the situation with a discrete dynamical system, with time intervalone day, we obtain the following:

xn+1 = xn − 350xn (34)

yn+1 = yn + 350xn − 3

100yn (35)

The amount of pollutant in Upper Lake tomorrow, xn+1, is equal to theamount of pollutant in Upper Lake today, xn, minus the amount of pollutant

61

Page 62: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

which has flown into Lower Lake, via the river. The concentration of pol-lutant in Upper Lake today is xn

50m3

km3 . The amount of water carried by theriver to Lower Lake during the day is 3 km3. This water contains

3 km3 xn50

m3

km3=

3

50xnm

3

of the pollutant. So the decrease of pollutant in Upper Lake is equal to 350xn

(measured in m3, which are the correct units for the components of the statevector). This justifies Formula (34).

The change in the pollutant in Lower Lake consists of the inflow fromUpper Lake, which is 3

50, minus the outflow, which is 3 yn

100, because the con-

centration of the pollutant in Lower Lake is yn100

.

2.3 Refining the Discrete Model

If we look closer at the system described by (34) and (35), we see that itis not as accurate as it might be: when calculating the amount of pollutantflowing out of Upper Lake during a day, we assumed that the concentrationof the pollutant in upper lake is xn

50for the whole day. This does not take into

account that the concentration decreases during the day. If xn50

is correct inthe morning, it will not be correct any more in the evening, because pollutanthas been flowing out all day.

To get a more accurate decription, we may decide to decrease the timeinterval to half a day. How would this affect the description of the system?

The main change we will make is the following: instead of writing xn forthe pollutant in Upper Lake after n days, we will write x(t), for the amountof pollutant in Upper Lake at time t. Now we think of t as continuouslyvarying: t ∈ R. We measure time in days, so t = 5 stands for 5 days (whichused to be n = 5). With this new notation, the above system reads like this:

x(t+ 1) = x(t)− 350x(t)

y(t+ 1) = y(t) + 350x(t)− 3

100y(t)

If we change the time interval to half a day, the river carries half as muchwater in half a day. So the new system is:

x(t+ 12) = x(t)− 1

2350x(t)

y(t+ 12) = y(t) + 1

2350x(t)− 1

23

100y(t)

62

Page 63: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Of course, we could be even more accurate by looking at the system everyhour. The day has 24 hours, so if we model the system using hours for ourtime interval, we get:

x(t+ 124

) = x(t)− 124

350x(t)

y(t+ 124

) = y(t) + 124

350x(t)− 1

243

100y(t)

The other change we make is that we look at the change that happensduring our time interval, instead of the absolute numbers:

x(t+ 124

)− x(t) = − 124

350x(t)

y(t+ 124

)− y(t) = 124

350x(t)− 1

243

100y(t)

If we divide by the time interval, we get:

x(t+ 124

)− x(t)124

= − 350x(t)

y(t+ 124

)− y(t)124

= 350x(t)− 3

100y(t)

2.4 The continuous model

As we decrease the time interval it gets cumbersome to write larger and largerfractions ( 1

1440for minutes, 1

86400for seconds), so let us write h for the time

interval:

x(t+ h)− x(t)

h= − 3

50x(t)

y(t+ h)− y(t)

h= 3

50x(t)− 3

100y(t)

Note that the right hand side does not depend on h at all. If we take thelimit h→ 0, we get the instantaneous rates of change on the left hand side,also known as the derivatives:

dx

dt(t) = lim

h→0

x(t+ h)− x(t)

h= − 3

50x(t)

dy

dt(t) = lim

h→0

y(t+ h)− y(t)

h= 3

50x(t)− 3

100y(t)

63

Page 64: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

Thus we arrive at the continuous model:

dx

dt(t) = − 3

50x(t) (36)

dy

dt(t) = 3

50x(t)− 3

100y(t) (37)

Or, in matrix notation:(dxdt

(t)dydt

(t)

)=

(− 3

500

350

− 3100

)(x(t)y(t)

)If we don’t write the dependence on t explicitely, we can write this evenshorter as

d

dt

(xy

)=

(− 3

500

350

− 3100

)(xy

)Writing ~x for the state vector

(xy

)this becomes

ddt~x =

(− 3

500

350

− 3100

)~x

The transition matrix is

A =

(− 3

500

350

− 3100

)With this notation the dynamical system becomes:

ddt~x(t) = A~x(t)

Often abbreviated to

~x ′(t) = A~x(t)

This is known as a homogeneous system of linear differential equations.

2.5 Solving the system of differential equations

One homogeneous linear differential equation

One homogeneous linear differentail eqaution

x′(t) = λx(t)

64

Page 65: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

is easy to solve. The general solution is

x(t) = ceλt

for an undetermined constant c, which can be determined from x(0), if x(0)is given.

For example, the initial value problem

x′(t) = 15x(t) (38)

x(0) = 3 (39)

has the solutionx(t) = 3e15t (40)

It is easy to check that (40) is a solution of (38) and (39): taking the derivativeof (40) gives x′(t) = 15 · 3e15t, and plugging (40) back into this gives x′(t) =15x(t), which is (38). Plugging in 0 for t in (40) gives (39).

The concentration of the pollutant in Upper Lake has nothing to do withwhat happens in Lower Lake. Equation (36) is a single differential equationfor the function x(t), giving the pollutant in Upper Lake. The solution is

x(t) = 2e−350t

because the initial condition was given as x(0) = 2: the amount of pollutantspilled into Upper Lake was 2m3.

Our system of linear differential equations

Suppose the state vector has n components, ~x ∈ Rn, and the transitionmatrix A is n × n. If we can find a basis B = (~v1, . . . , ~vn) of Rn consistingof eigenvectors for A, with corresponding eigenvalues λ1, . . . , λn, then thegeneral solution to

~x ′(t) = A~x(t) (41)

is

~x(t) = c1eλ1t~v1 + . . .+ cne

λnt~vn (42)

Let us check that (42) is, indeed, a solution to (41). What does (41) say? It saysthat taking the derivative of the state vector gives the same result as multiplying the state

65

Page 66: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

vector by the transition matrix. So what we are claiming is that if we start with the statevector

c1eλ1t~v1 + . . .+ cne

λnt~vn (43)

we get the same result by differentiating, as when we multiply by A. Let us check this.Differentiating (43) we get

λ1c1eλ1t~v1 + . . .+ λncne

λnt~vn

because the ci are constants, and the eigenvectors ~vi don’t depend on t, either. Multiply-ing (43) by A we get

A(c1e

λ1t~v1 + . . .+ cneλnt~vn

)= c1e

λ1tA~v1 + . . .+ cneλntA~vn

= c1eλ1tλ1~v1 + . . .+ cne

λntλn~vn

because A~vi = λi~vi, by the eigenvalue property. This is, indeed, the same result we gotby differentiating.

In our example, the transition matrix is

A =

(− 3

500

350

− 3100

)It is lower triangular, so the eigenvalues are on the diagonal:

λ1 = − 3100

λ2 = − 350

we have listed − 3100

first, because it is larger than − 350

. Find the correspond-ing eigenspaces: E1, the eigenspace of λ1, is the null space of(

− 3100

+ 350

0− 3

50− 3

100+ 3

100

)=

(3

1000

− 350

0

)−→

(1 00 0

)so

E1 = span

(01

)For λ2 we get(

− 350

+ 350

0− 3

50− 3

50+ 3

100

)=

(0 0− 3

50− 3

100

)−→

(1 1

2

0 0

)so

E2 = span

(1−2

)

66

Page 67: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

So our eigenbasis is

~v1 =

(01

)~v2 =

(1−2

)Plugging these values into (42) we get(

x(t)y(t)

)= c1e

− 3100

t

(01

)+ c2e

− 350t

(1−2

)To compute c1 and c2, plug in t = 0:(

x(0)y(0)

)= c1

(01

)+ c2

(1−2

)The initial values are x(0) = 2 and y(0) = 0, so this gives the inhomogeneoussystem for ~c:

c1

(01

)+ c2

(1−2

)=

(20

)Solving it (

0 1 | 21 −2 | 0

)−→

(1 0 | 40 1 | 2

)gives c1 = 4 and c2 = 2. Our final solution is

(x(t)y(t)

)= 4e−

3100

t

(01

)+ 2e−

350t

(1−2

)(44)

The formula for the pollutant in Upper Lake

x(t) = 2e−350t

we already knew. The formula for the amount of pollutant in Lower Lake is

y(t) = 4e−3

100t − 4e−

350t

If we consider this formula for y(t), we notice several things:

(i) y(0) = 0,

(ii) y(t) > 0, for all t > 0, because e−3

100t > e−

350t, because − 3

100> − 3

50.

(iii) as t→∞ both summands of y(t) approach 0, so limt→∞ y(t) = 0.

67

Page 68: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

By these observations, it is clear that y(t) must reach a maximum for somepositive point in time t. To find it, let us differentiate y(t)

y′(t) = − 4·3100e−

3100

t + 4·350e−

350t

and set y′(t) = 04·3100e−

3100

t = 4·350e−

350t

which givese−

3100

t = 2e−350t

Take the logarithm:− 3

100t = ln 2− 3

50t

this gives3

100t = ln 2

or

tmax =100 ln 2

3≈ 23.1

So the maximum concentration of the pollutant in Lower Lake is reachedafter about 23 days. How much pollutant is in Lower Lake at this point intime? This value is given by y(tmax) and is equal to

y(tmax) = 4e−3

100tmax − 4e−

350tmax

= 4e−3

100100 ln 2

3 − 4e−350

100 ln 23

= 4e− ln 2 − 4e−2 ln 2

= 4 · 2−1 − 4 · 2−2

= 2− 1

= 1

So the maximum amount of pollutant in Lower Lake is 1m3. This cor-responds to a concentration of 1

100m3

km3 , or 0.01 ppb, because there are 1billion=10003 cubic metres in 1 cubic kilometre. So the maximal concen-tration of the pollutant will exceed the maximal allowable value of 0.008 ppb.The beach will certainly need to be closed.

The maximal allowable concentration 0.008 ppb corresponds to an amountof y = 0.8m3 of the pollutant in lower lake. To find out exactly on whichdays the beach needs to be closed we would have to solve the equation

y(t) = 0.8

68

Page 69: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

or4e−

3100

t − 4e−350t = 0.8

This is not possible with elementary methods. We are reduced to ‘trial anderror’. We use a computer to calculate values of y(t):

t 1 2 3 4 5 6 7 8 9 10 11 12 13 14

y .11 .22 .32 .40 .48 .55 .61 .67 .72 .76 .81 .84 .88 .90

t 15 16 17 18 19 20 21 22 23 24 25 26 27

y .92 .95 .96 .97 .98 1.00 .99 1.00 1.00 1.00 .998 .990 .988

t 27 28 29 30 31 32 33 34 35 36 37 38

y .988 .986 .976 .970 .956 .942 .938 .920 .912 .900 .884 .872

t 38 39 40 41 42 43 44 45 46 47 48 49

y .872 .855 .837 .828 .818 .797 .784 .771 .757 .738 .724 .708

We see that the beach on Lower Lake will have to be closed from day 11until day 42, i.e., for 32 days in total. The beach resort in Lower Town has10 days to prepare for this emergency.

Of course, even this continuous model is very far from perfect. We haveentirely neglected the time it takes for the pollutant to get evenly distributedthroughout the lakes, which may be considerable, in real life. Also, we haveignored the time it takes the water to flow down the river from Upper Laketo Lower Lake.

2.6 Phase Portrait

Both eigenvalues of the transition matrix are negative. If λ < 0, then ast → +∞, eλt → 0. This implies that both terms in the formula for ~x(t)decay in the long term. So the state vector gets smaller and smaller, itapproaches ~0:

limt→+∞

= ~0

The origin is an attractor for all trajectories.As t→ +∞, the term with the larger eigenvalue takes over, so the slope

of the state vector approaches the slope of ~v1 =(01

). So as the trajectories

approach the origin, they sqeeze closer and closer to E1, getting farther awayfrom E2 in the process.

69

Page 70: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

As t→ −∞, the term with the smaller eigenvalue takes over, so the slopeof the state vector approaches the slope of ~v2 =

(1−2). So if we follow the

trajectories backwards, they align themselves more and more with E2 (eventhough they do not get closer to E2). This can be seen in Figure 18.

2.7 Exercises

Exercise 2.1 Solve the discrete dynamical system described by (34)and (35) with the initial condition given in the text. Find explicitel formulasfor xn and yn. Compare your answer with the solution of the continuousmodel (44).

Exercise 2.2 Solve the initial value problem

x′(t) = 10x(t) + 4y(t)

y′(t) = x(t) + 10y(t)

x(0) = 4

y(0) = 0

Exercise 2.3 Consider the same dynamical system as in the text (with thesame initial condition), except that the sizes of the two lakes are interchanged.Repeat the analysis in the text. Solve the continuous dynamical system, andsketch the phase portrait. Is the beach safe?

Exercise 2.4 Consider the same dynamical system as in the text, exceptthat there is a third lake, Middle Lake, in between Upper Lake and LowerLake. The volume of Middle Lake is 150 km3. Solve the initial value problem.

70

Page 71: Dynamical Systems and Matrix Algebrabehrend/math223/DynSys.pdf · Dynamical Systems and Matrix Algebra K. Behrend August 12, 2018 Abstract This is a review of how matrix algebra applies

-4

4

4

2

02

-2

-4

0-2

Figure 18: The phase portrait of the lake system

71