Hide help
$(x_1,y_1) = $ , $(x_2,y_2)=$
The one-dimensional analogue of this dynamical system is $z_{n+1}=a z_n$. Recall that the behavior of this system is dictated by the parameter $a$: If $|a|<$ , then $z_n$ approaches zero as $n$ increases, whereas if $|a|>$ , $|z_n|$ approaches infinity as $n$ increases. We want to find a way to understand the two-dimensional system in a similar way, but we now have four parameters instead of one. What are the four parameters?
The starting point for analyzing the behavior of the two-dimensional system is re-writing it in a format similar to the one-dimensional system. We want to write it as a single equation, where the state variables at time $n+1$ are equal to one "parameter" times the state variables at time $n$. To do this, we use vectors and matrices. We start by writing the state variables as a vector. We will use two formats for writing vectors. Either $$(x_n, y_n)$$ or $$\begin{bmatrix} x_n\\ y_n \end{bmatrix}$$ will denote the vector of state variables. Typically, the first format will be used when we are discussing the vector in isolation. The second format will be used when a matrix is involved.
Our objective is now to write the two-dimensional dynamical system as $$\begin{bmatrix} x_{n+1}\\ y_{n+1} \end{bmatrix}=A\begin{bmatrix} x_n\\ y_n \end{bmatrix}$$ To determine the matrix $A$, we need to understand matrix-vector multiplication.
Let's revisit the dynamical system from the first problem. above: \begin{align*} x_{n+1} &= 3.5 x_{n} - y_{n}, \qquad \text{for $n=0,1,2, \ldots$}\\ y_{n+1} &= x_{n} + y_{n} \end{align*} Rewrite this dynamical system in terms of a matrix-vector product:
Let's call this matrix $A$, so that we can write the dynamical system as \begin{gather*} \vc{x}_{n+1} = A\vc{x}_n, \qquad \text{for $n=0,1,2,\ldots$} \end{gather*} where \begin{align*} A = \begin{bmatrix}_&_\\_&_\end{bmatrix} \qquad \text{and} \qquad \vc{x}_n = \begin{bmatrix} x_{n}\\ y_{n} \end{bmatrix}. \end{align*}
The matrix equation $\vc{x}_{n+1} = A \vc{x}_n$ is shorthand for many equations, one for $n=0$, one for $n=1$, etc. The specific versions for $n=0$ and $n=1$ give the equations for $\vc{x}_1$ and $\vc{x}_2$: $\vc{x}_1=$ , $\vc{x}_2 = $
As in the first problem, above, we'll use the initial condition $\vc{x}_0 = \left[\begin{matrix}1\\1\end{matrix}\right]$ to calculate $\vc{x}_1$ and $\vc{x}_2$. This time, since we've rewritten the dynamical system as a matrix-vector multiplication, we can easily ask the computer to do the work for us with the programing language R.
To enter the matrix $A$ in R, type the following command:
A=matrix(c(_, _, _, _), 2, 2, byrow=TRUE)
Once you've entered that command in the console, you can just enter A in the console to view the matrix and make sure it turned out as you expected. R also outputs row and column headings like [,1] to show you the index corresponding to each row and column.
Create the initial condition vector by entering x0 = c(1,1) in the console. The next step is to tell R that we want $\vc{x}_1 = A \vc{x}_0$. Caution: we cannot use the command x1 = A*x0 in R. Instead, in R, A*x0 means to multiply the components of $A$ with the components of $\vc{x}_0$ (recycling the components of $\vc{x}_0$ since there are fewer components). The correct command for calculating $\vc{x}_1$ in R is
x1 = A %*% x0
The result is: $\vc{x}_1 =$ , $\vc{x}_2 =$ , $\vc{x}_{10} =$