Discrete Dynamical Systems -- Adapted from VLA Module 

> with(LinearAlgebra):


A discrete dynamical system is a sequence of vectors x[0], x[1], x[2], `...` related to one another by a square matrix A as follows: 

x[`+`(k, 1)] = Typesetting:-delayDotProduct(A, x[k], true),   for k = 0, 1, 2, ... 

If we think of k as representing time in some units, we can think of a dynamical system as describing the evolving behavior over time of the set of variables represented by the vectors x[k]. We refer to this behavior as the "dynamics" of the "system" of vectors x[k].  


Example 1: To determine the long-term behavior of the vectors we'll examine the eigenvector decomposition: 

> Ex1 := Matrix([[525/1000,15/100],[-1875/10000,975/1000]]);

Matrix(%id = 18446744078105328926)

First we find the eigenvalues and associated eigenvectors of A: 

> h,P := Eigenvectors(Ex1);

Vector[column](%id = 18446744078190776062), Matrix(%id = 18446744078190776182)

Therefore we have the eigenvector decomposition 

 x[k] = Typesetting:-delayDotProduct(`*`(a[1], `*`(`^`(`/`(9, 10), k))), Vector[column](%id = 18446744078190771606), true) + Typesetting:-delayDotProduct(`*`(a[2], `*`(`^`(`/`(3, 5), k))), Vector[column](%id = 18446744078190772086), true)  

Since both eigenvalues are less than one in absolute value, then both `^`(`/`(9, 10), k) and `^`(`/`(3, 5), k) have limit 0.  Now the vector x[k] tends toward the zero vector in the limit every x[0], so both the x-coordinate population and the y-coordinate population tends to 0. We sometimes say that the points x[k] are "attracted to the origin."  Furthermore, since `<`(`/`(3, 5), `/`(9, 10)), then as long as a[1] is not 0, then the points x[k] will be close to Typesetting:-delayDotProduct(`*`(a[1], `*`(`^`(`/`(9, 10), k))), Vector[column](%id = 18446744078173733342), true) for large k, which tells us that x[k] approaches the origin along a line with direction vector ie y=(5/2) x. 


We plot the "trajectory" of the vectors x[k], which is a plot of the points x[0], x[1], x[2], `...` 



Note:  while we don't typically need the coefficients  a[1] and a[2], we could compute them as follows if we need them in applications: 

> x0 := Vector([1.5,1]);

Vector[column](%id = 18446744078190768606)

> a := P^(-1).x0;

Vector[column](%id = 18446744078190770406) (1.1)



Example 2: To determine the long-term behavior of the vectors we'll examine the eigenvector decomposition: 

> Ex2 := Matrix([[9/10,-12/100],[-5/10,8/10]]);

Matrix(%id = 18446744078190803894)


> h,P := Eigenvectors(Ex2);

Vector[column](%id = 18446744078105327726), Matrix(%id = 18446744078105327966)


The eigenvector decomposition is x[k] = `+`(Typesetting:-delayDotProduct(`*`(a[1], `*`(`^`(`/`(11, 10), k))), Vector[column](%id = 18446744078173734902), true), Typesetting:-delayDotProduct(`*`(a[2], `*`(`^`(`/`(3, 5), k))), Vector[c..., where the values of a[1] and a[2] depend on x[0]. Since the larger eigenvalue of B is 11/10, the points x[k] eventually move away from the origin and get arbitrarily far away. An associated eigenvector is Vector[column](%id = 18446744078173735262), which tells us that as long as a[1] is nonzero, then eventually the trajectory follows the line through the origin y=-`/`(5, 3)x.  



However, note what happens below when the initial vector x[0] is an eigenvector associated with the smaller eigenvalue (ie a[1]=0).  In this case we die off along the y= `/`(5, 2)x line. 

> x0 := Vector([.4,1]):



Example 3: To determine the long-term behavior of the vectors we'll examine the eigenvector decomposition: 

> Ex3 := Matrix([[9/10,2/10],[1/10,8/10]]);

Matrix(%id = 18446744078190813902)


> h,P := Eigenvectors(Ex3);

Vector[column](%id = 18446744078190802214), Matrix(%id = 18446744078190803174)

Thus x[k] = `+`(Typesetting:-delayDotProduct(`*`(a[1], `*`(`^`(1, k))), Vector[column](%id = 18446744078173736702), true), Typesetting:-delayDotProduct(`*`(a[2], `*`(`^`(.7, k))), Vector[column](%id = 1844....   

The larger eigenvalue is 1 so, for most starting positions, the system tends towards the line y=1/2 x associated to the eigenvector Vector[column](%id = 18446744078173736958).  We can say a bit more than this as `^`(1, k)=1 and so  

x[k] = `+`(Vector[column](%id = 18446744078173737918), Typesetting:-delayDotProduct(`*`(a[2], `*`(`^`(.7, k))), Vector[column](%id = 18446744078173738038), true)) 


which is the line parallel to Vector[column](%id = 18446744078173738278)(since `^`(.7, k)changes over time) and through the tip of Vector[column](%id = 18446744078173738518)ie the place on y=1/2 x given by the starting position and a parallel transport there.  So eventually we hit that line and then stay fixed there forevermore (unless a[1] 

=0 in which case we die off along the y=-x line).  For most starting populations, in the limit the populations will achieve the ratio of 2 of population a for each 1 of population b. 




Example 4: Here is a system whose dynamics are more complicated: 

> Ex4 := Matrix([[8/10,5/10],[-1/10,1]]);

Matrix(%id = 18446744078190813542)


We sometimes say that the points are  "attracted to the origin along a spiral." The spiral behavior is caused by the presence of complex eigenvalues.