# Linear Maps in the Plane The map $y_{n+1} = a\,y_n$ from [[MATH310F26(Day 27) - One step at a time, no dice|Day 27]] has one number, $a$, and seven cases. With two populations the same idea needs a matrix, $\mathbf z_{n+1} = J\,\mathbf z_n, \qquad \mathbf z_n = \begin{pmatrix} x_n \\ y_n \end{pmatrix}, \qquad J = \begin{pmatrix} J_{11} & J_{12} \\ J_{21} & J_{22} \end{pmatrix}.$ This is also what any two-variable map looks like close to one of its fixed points, with $J$ its Jacobian there and $\mathbf z$ the distance from the fixed point. That is how it connects to [[Predators and Prey in Seasons]]. The applet opens on that model's Jacobian at the class values, $J = \begin{pmatrix} 1 & -0.4 \\ 0.15 & 1 \end{pmatrix}$. <div class="applet" data-applet="linear-map-2d"></div> ## Reading the applet - **Eigenvalues (bottom).** The eigenvalues of $J$ are drawn in the complex plane with the unit circle $|\lambda| = 1$ dashed and its inside shaded. Drag them. - A complex pair $a \pm ib$ always moves together as a mirror-image pair. - Pull the pair down onto the real axis and it splits into two real eigenvalues, $\lambda_1$ (orange) and $\lambda_2$ (purple), which then move separately along the axis. - Push the two real ones together and lift up to make a pair again. - Near $|\lambda| = 1$, and near $\lambda = -1, 0, 1$ on the real axis, the dots snap onto those values. - **Eigenvectors and shape (top).** The eigenvalues don't fix the whole picture. - With two real eigenvalues, the orange and purple lines through the origin are the eigenvectors. Turn them with the handles. - With a complex pair, the **stretch** and **tilt** sliders set the shape of the dashed ellipse. Each step moves the point around that ellipse, and grows or shrinks it by $|\lambda|$. - **Orbits (top).** Click to add a starting point (up to six). Each orbit is a set of dots, one per step, starting at a ring. - **Time series (middle).** $x_n$ (solid) and $y_n$ (dashed) for the newest orbit. - **Readout.** It gives $J$, its trace and determinant, the eigenvalues, the classification, and whether $J$ is inside the stability triangle (explained below). - **Buttons.** The **start from** buttons load ready-made cases. **run the map** reveals the steps four per second. **autoscale** fits the plot to the orbits. ## How the matrix is built With two real eigenvalues $\lambda_1, \lambda_2$ and eigenvectors at angles $\varphi_1, \varphi_2$, $J = V\begin{pmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{pmatrix}V^{-1}, \qquad V = \begin{pmatrix} \cos\varphi_1 & \cos\varphi_2 \\ \sin\varphi_1 & \sin\varphi_2 \end{pmatrix}.$ Along an eigenvector each step just multiplies by its eigenvalue, so a start on the orange line stays on it and is multiplied by $\lambda_1$ every step. With a complex pair $a \pm ib$, a stretch $\sigma$ and a tilt $\phi$, $J = P\begin{pmatrix} a & -b \\ b & a \end{pmatrix}P^{-1}, \qquad P = \begin{pmatrix} \cos\phi & -\sin\phi \\ \sin\phi & \cos\phi \end{pmatrix}\begin{pmatrix} \sigma & 0 \\ 0 & 1 \end{pmatrix}.$ The middle matrix turns by $\theta = \arg\lambda$ and scales by $|\lambda| = \sqrt{a^2 + b^2}$. $P$ squashes the circle into the ellipse. For the predator–prey Jacobian, $a = 1$, $b = \sqrt{0.06} \approx 0.245$, $\sigma = \sqrt{0.4/0.15} \approx 1.633$ and $\phi = 0$. The applet doesn't trust the sliders for the eigenvalues it prints. It recomputes them from $J$ itself, $\lambda = \tfrac12\operatorname{tr}J \pm \sqrt{\tfrac14(\operatorname{tr}J)^2 - \det J}$. ## When does every orbit go to 0? Every orbit goes to the origin exactly when both eigenvalues are inside the unit circle. In terms of $J s trace and determinant, that is the **stability triangle** $|\det J| < 1 \qquad\text{and}\qquad |\operatorname{tr} J| < 1 + \det J.$ ## Try these > [!question] 1. The predator–prey pair > Start from **predator–prey**. Where are the eigenvalues compared with the unit circle, and what does the orbit do? Now drag the pair. Can you get it inside the circle while staying on the shaded line? > [!success]- Answer > They sit at $1 \pm 0.245i$, with $|\lambda| \approx 1.030$, just outside the circle, so the orbit spirals out. Each loop takes about 26 steps and grows the orbit by a factor of about $2.14$. That matches what the full nonlinear map did near $(20, 15)$. The shaded line $\operatorname{Re}\lambda = 1$ touches the circle only at $\lambda = 1$, so no point on it is inside. Here you can drag the pair off the line and make a stable spiral, but the predator–prey map can't put its pair there. That is the "Pull them inside" result from the predator–prey page. > [!question] 2. Seven cases become how many? > Load **sink**, **source**, **saddle**, **spiral in**, **spiral out**, **circling** and **flip** in turn. For each one, say where the eigenvalues are and what the orbits do. > [!success]- Answer > - **Sink:** both real eigenvalues inside the circle, and every orbit goes straight in. > - **Source:** both outside, and every orbit goes out. > - **Saddle:** one inside and one outside. Orbits come in along the purple line and leave along the orange one. > - **Spiral in** and **spiral out:** a complex pair inside or outside the circle, and the orbits turn while they shrink or grow. > - **Circling:** the pair is on the circle, so orbits go around the dashed ellipse forever. > - **Flip:** $\lambda_1 = -0.85$ is negative, so the orbit jumps to the other side of the origin every step while it shrinks. This is the two-dimensional version of $-1 < a < 0$ from Day 27. > [!question] 3. Exactly seven steps > Load **circling**. What is the angle $\theta$, and what happens after 7 steps? Now drag the pair a little along the circle. Does any orbit still come back exactly? > [!success]- Answer > $\theta = 2\pi/7 \approx 51.43°$, so after 7 steps every orbit has gone once around and is back exactly where it started (in the check, $J^7$ differs from the identity by about $10^{-15}$). Move the pair and $\theta/2\pi$ is no longer a fraction with a small denominator. Orbits still stay on their ellipse, but they never land on the same point twice and the dots slowly fill the whole ellipse. The applet says which of the two is happening. > [!question] 4. Stable, but it grows first > Load **close eigenvectors**. Both eigenvalues, $0.9$ and $0.8$, are inside the circle. Watch the distance from the origin in the time series. Does it only shrink? > [!success]- Answer > No. From the starting point $(0.17, -0.98)$ the orbit first moves *away*. Its distance from 0 reaches about $1.62$ times the start at step 6 before it decays. Over all starting directions the largest growth is about $1.64$. This happens because the two eigenvectors are only $10°$ apart. A start that is short overall can be a big multiple of the orange eigenvector minus a big multiple of the purple one, and the two pieces shrink at different rates, so for a while they no longer cancel. Turn the handles until the eigenvectors are $90°$ apart (as in **sink**) and the growth disappears. The eigenvalues alone tell you where orbits end up, not how they get there. > [!question] 5. Read stability off the matrix > Without looking at the eigenvalue panel, use the trace and determinant in the readout to decide whether **spiral in**, **spiral out** and **flip** go to 0. Then check with the panel. > [!success]- Answer > - **Spiral in:** $\operatorname{tr}J = 1.621$ and $\det J = 0.810$. Then $|\det J| < 1$ and $1.621 < 1.810$, so it goes to 0. > - **Spiral out:** $\det J = 1.082 > 1$, so it does not. > - **Flip:** $\operatorname{tr}J = -0.25$ and $\det J = -0.51$. Then $|\det J| = 0.51 < 1$ and $|\operatorname{tr}J| = 0.25 < 1 - 0.51 = 0.49$, so it goes to 0. > > In 200,000 random $2\times2$ matrices, the triangle test and "both $|\lambda| < 1quot; never disagreed. ## Credits Built for MATH310 Fall 2026 as the two-dimensional sequel to [[The Linear Map and Its Seven Cases]] and the linear picture behind [[Predators and Prey in Seasons]].