Math 236  •  2 May 2001

Spotted owls and flying squirrels revisited:
applying diagonalization

Introduction

Consider again the linear discrete dynamical system 
 		(Overscript[x,  ->]) (t  +  1)  =  
        A  (Overscript[x,  ->]) (t), 		(Overscript[x,  ->]) (
          0)  =  (Overscript[((Subscript[x, 0])),  ->])  a given state vector.  
 whose coefficient matrix A is:

A = (({{0.4, 0.3}, {-0.325, 1.2}}));

In exact rational form, this is:

a  =  Rationalize[A];  a  //  MatrixForm

We know that (Overscript[x,  ->]) (t) = (({{o(t)}, {s(t)}})) can be expressed in the closed form
				(Overscript[x,  ->]) (t)  =  
        (A^t) (Overscript[((Subscript[x, 0])),  ->]) .
But what does (A^t) actually look like?

The problem

Develop an explicit closed-form formula for (Overscript[x,  ->]) (t) = (({{o(t)}, {s(t)}})) as a function of discrete time t, no matter what the initial state (Overscript[((Subscript[x, 0])),  ->]) .  (In the original notebook, we did this just for a specific (Overscript[((Subscript[x, 0])),  ->]) .)  Use diagonalization of A, if possible.

A solution

First, find the eigenvalues and basis vectors of associated eigenspaces:

esys  =  Eigensystem[a]

N[%]

Note. We want to work with the exact, rational coefficients and not decimal numerical approximations: watch what happens if you try to use the decimal version instead:

Eigensystem[A]

Rationalize[%]

Extract the individual eigenvalues and basis eigenvectors:

λ1  =  Last@First@esys;  λ2  =  
      First@First@esys;
v1  =  Last@Last@esys;  v2  =  First@Last@esys;
{λ1,  v1}
{λ2,  v2}

The vectors v1 and v2 here are not quite the same as the vectors (Overscript[((Subscript[v, 1])),  ->])  = (({{60}, {130}})) and (Overscript[((Subscript[v, 2])),  ->])  = (({{200}, {100}})) used in the original notebok, but rather scalar multiples of them.  It's as if now we are measuring not the same quantities (number of owls and thousands of squirrels) as before, but rather hundreds of such quantities.

Because the 2 × 2 matrix A has two distinct eigenvalues, (ℝ^2) has (Overscript[((Subscript[v, 1])),  ->])  and (Overscript[((Subscript[v, 2])),  ->])  as an eigenbasis.  Hence A is diagonalizable.  The diagonalizing matrix is:

S  =  Transpose[{v1,  v2}];  S  //  MatrixForm

Then the diagonal form is D  =  (S^(-1)) A S of A is as follows (we to avoid conflict with Mathematica's derivative function D, we must use some other name):

diag  =  DiagonalMatrix[{λ1,  λ2}];  
    diag //  MatrixForm

Just as a check:

diag  ===  Inverse[S]  .  a  .  S

Since A  =  S D (S^(-1)), we want to calculate (A^t) as 
				(A^t)  =  S (D^t) (S^(-1 )).                               (*)
Here, of course, we do not realize (D^t) by actually invoking MatrixPower.  Instead, we use our knowledge about what powers of a diagonal matrix look like:

d[t_]  :=  
      DiagonalMatrix[{λ(1^t),  λ(2^t)}]

For example:

d[2]  //  MatrixForm
d[3]  //  MatrixForm

Watch out here: the numerators and denominators are getting big!

Define:

invS  =  Inverse[S];  invS  //  MatrixForm

Then the explict form of the coefficient matrix A provided by the diagonalization is:

S  .  d[t]  .  invS  // Simplify // MatrixForm

In terms of the diagonalization, then, the explicit form of the state vector is given by:

Clear[x]

x[t_]  :=  S  .  d[t]  .  invS  .  x0

Exercise.  Using  (*) and the fact that (D^t) = (({{((Subscript[λ, 1])^t), 0}, {0, ((Subscript[λ, 2])^t)}})), try to use paper and pencil calculations to obtain an explicit, closed form for the first and second coordinate functions o(t) and s(t) of (Overscript[x,  ->]) (t).  (Use the specific values of (Subscript[λ, 1]) and (Subscript[λ, 2 ]) here.)

Continuing our work from above, let's use the diagonalization to track the long-run behavior just for one initial state:

x0  = {100,  175}/100

This is essentially the same initial state as Example 3 in the original notebook [the initial state there was (100,  175)].  We have scaled that original initial state in order to keep the numbers to a reasonable size; again it's as if we changed units so as to measure in 100's.

The closed form formula for (Overscript[x,  ->]) (t) is therefore:

x[t]  // Simplify

N[x[t]]

We compute:

Table[N[x[t]],  {t,  0,  10}]  //  TableForm

These include the same values we obtained in the original notebook (scaled by 100).  In the original notebook we used the eigenvalues and eigenvectors in a somewhat different way, to obtain the closed-form formula via 
				(Overscript[x,  ->]) (t)  =  
        (Subscript[c, 1]) ((Subscript[λ, 1])^t) (Overscript[((Subscript[v, 1])),  ->])   +  
          (Subscript[c, 2]) ((Subscript[λ, 2])^t) (Overscript[((Subscript[v, 2])),  ->])  
where we first solved for (Subscript[c, 1]) and (Subscript[c, 2]) in order to express
				(Subscript[x, 0])  =  
        (Subscript[c, 1]) (Overscript[((Subscript[v, 1])),  ->])   +  
          (Subscript[c, 2]) (Overscript[((Subscript[v, 2])),  ->])  .

Question.  What are the advantages of doing it the new way, via diagonalization?   Disadvantages?