Matrix powers and dynamical systems
Take a vector, apply a matrix, and then apply the same matrix again, over and over. That single act — iterating x ← Ax — is the discrete dynamical system behind Markov chains, population models, filters that settle, and recurrences that blow up. The eigenvector picture from the previous part is what makes it tractable: in the eigenbasis the matrix is diagonal, so applying it many times just scales each eigen-direction by a power of its eigenvalue. The size of those eigenvalues is the whole stability story.
The question
What happens if you keep applying the same map?
A matrix is a transformation: it moves every point of the plane somewhere. Most of this series has looked at a single application. This part asks what happens when you do not stop — when the output of one application becomes the input of the next. Write the state after k steps as xk. Then the rule is
and the question is what xk looks like as k grows. Does it drift to the origin, run off to infinity, settle onto a fixed vector, or spin around forever? The astonishing answer is that almost everything is decided by n numbers: the eigenvalues of A.
The reason is the one idea from the previous part. An eigenvector is a direction the map does not turn, only stretches or shrinks. Apply A to one and you get λv; apply it again and you get λ2v; after k applications the eigen-direction has simply been multiplied by λk. Every other vector is a combination of eigen-directions, so its future is the sum of a few simple powers. Matrix powers become scalar powers once you are willing to change coordinates.
One vector, many steps
The orbit of a point under repeated application
Start with a single point x0 and apply A again and again. The resulting sequence of points is called the orbit of x0. The demo below draws that orbit as a trail. Scrub the step slider to walk forward one application at a time, and drag x0 to launch a different orbit. The faded cloud is the series' running example — all of its points are being carried by the same map, so the whole cloud deforms with the step you choose.
Each step is a straight-line jump from the current point to the next, because a matrix acts linearly. The interesting question is the shape those jumps trace out. When the eigenvalues are real the orbit sloshes along the two eigen-directions, climbing the growing one and decaying along the shrinking one. When the eigenvalues are a complex-conjugate pair there is no real eigen-direction at all, and the orbit curls: each step is a rotation combined with a uniform stretch or shrink, which draws a spiral. The dashed lines in the demo are the real eigen-directions; when they disappear, you are looking at a rotation.
Drag x0. The slider scrubs the iterate xk; the dashed lines are the real eigen-directions, and the pink trail is the orbit of x0.
Try the three presets. Settle has both eigenvalues smaller than one in magnitude, so every orbit is pulled inward to the origin. Spiral has a complex pair with modulus less than one, so the orbit winds inward. Explode has an eigenvalue larger than one, so a generic orbit races outward even though one direction may still be shrinking. The readout names the eigenvalues and the behaviour, computed live from A — never assume a matrix is stable just because it looks small.
There is one subtlety worth seeing before the algebra. A vector that is exactly an eigenvector keeps its direction forever and only grows or shrinks. A vector that is a blend of two eigen-directions does not: the larger eigenvalue eventually dominates, and the orbit swings toward that eigen-direction as the other contribution becomes negligible. That swing is why the long-term direction of an orbit is an eigenvector even when the starting point was not.
Powers without multiplying
Diagonalize once, then exponentiate trivially
If you wanted A10 you could multiply A by itself nine times. That works but it teaches nothing, and for large powers it is both slow and numerically wasteful. The eigenbasis turns it into child's play. Suppose A has two independent eigenvectors v1 and v2 with eigenvalues λ1 and λ2. Build the matrix P whose columns are the eigenvectors, and the diagonal matrix D of eigenvalues:
Multiplying a vector by P re-expresses it in the eigen-coordinates, multiplying by D scales each coordinate by its eigenvalue, and multiplying by P-1 translates the answer back to the original axes. That gives the factorization called diagonalization:
The middle equality is the payoff. Because D is diagonal, its n-th power is just the diagonal of n-th powers; the hard problem of multiplying a matrix many times has become the easy problem of raising two scalars to a power. This also gives the closed form for the orbit: if x0 = c1v1 + c2v2, then
Each eigen-direction evolves independently, and the whole orbit is their sum. The demo below does exactly this. It reads the eigenvectors and eigenvalues from A, assembles P, D and P-1, and checks both identities numerically: that P D P-1 reproduces A, and that P Dn P-1 equals the matrix you get by multiplying A out n times. Change n and watch the diagonal entries become the only thing that matters.
The eigenvector frame: v1 and v2 span the axes in which A is diagonal. They are also the directions every orbit converges to or flees along.
The factorization is not always available. It needs as many independent eigenvectors as the space has dimensions; a matrix that is missing one is called defective and cannot be diagonalized, though a nearly-diagonal form always exists. Symmetric matrices are the friendly extreme — their eigenvectors can be chosen perpendicular, which is why diagonalizing them is so stable — and the next part of the series is devoted to them. Repeated eigenvalues are the warning sign: if a two-dimensional matrix has only one eigenvalue but fails to have two independent eigenvectors, P has no inverse and this whole shortcut needs the more general Jordan form.
Settle, cycle or explode
The magnitude of the eigenvalues is the verdict
The closed form xn = ∑ ci λin vi is the entire stability theory. Each term is a fixed vector multiplied by a scalar power. If every |λi| is smaller than one, every term decays to zero and the origin wins. If any |λi| is larger than one, that term grows without bound and the orbit escapes along that eigen-direction. When the largest magnitude is exactly one, the term neither grows nor decays, and the long-term behaviour depends on the finer details of the eigenvalue.
The complex case deserves its own sentence because it is where the geometry turns. Complex eigenvalues always arrive in conjugate pairs, and their modulus is the factor by which every step stretches the plane while their angle is the rotation angle. Modulus below one is a spiral inward, above one is a spiral outward, and exactly one is a pure rotation: the orbit circles forever on an invariant ellipse, never settling. A real eigenvalue of -1 does something similar but in a straight line, flipping the sign of the eigen-direction on every step and producing a period-two bounce.
| Eigenvalues | Long-term behaviour of xk |
|---|---|
| all |λ| < 1 | Settles to the origin — the system is stable |
| any |λ| > 1 | Explodes along that eigen-direction — unstable |
| λ = 1 | A steady non-zero state exists; orbits approach it |
| real λ = -1 | Period-two oscillation, no growth or decay |
| complex pair, |λ| < 1 | Spirals inward to the origin |
| complex pair, |λ| ≥ 1 | Spirals out if > 1, circles forever if = 1 |
| any λ = 0 | That direction is annihilated in a single step |
This is why eigenvalues are the first thing anyone computes about a discrete system. You rarely need the full orbit; you need to know the largest eigenvalue magnitude, because it is the growth rate of everything generic. In the demo above, the readout performs exactly this diagnosis: it prints the eigenvalues from A, computes their magnitudes, and announces whether the system settles, spirals or explodes. Editing A until the largest magnitude crosses one is the moment the orbit switches from collapsing to running away.
Markov chains
Iterating a distribution instead of a point
A Markov chain is the same iteration with a probabilistic reading. The state is a distribution over a few outcomes — a vector of non-negative entries summing to one — and the matrix is a transition table whose columns sum to one: entry Tij is the probability of moving from state j to state i. Multiplying the distribution by T gives the distribution one step later, so the orbit of the distribution is again pk = Tk p0.
Columns summing to one guarantees that the all-ones row is a left eigenvector with eigenvalue one, which forces T to have a right eigenvector for λ = 1 as well. That eigenvector is the stationary distribution: the distribution that the chain maps to itself. If the other eigenvalues are smaller than one in magnitude — which for a nice, irreducible chain they are — every starting distribution is pulled toward it, and the powers of the other eigen-directions decay away. The stationary vector is precisely the λ = 1 eigenvector from the previous section, and the speed of convergence is set by the second-largest eigenvalue magnitude.
The demo starts from a seeded random distribution and applies the three-state transition matrix step by step. The solid bars are the current distribution; the dashed pink ticks are the stationary distribution. Scrub the iteration slider and watch the bars migrate to the ticks. Reset returns you to the same seeded start, so a reload shows the same picture.
Solid bars: the distribution after k steps. Dashed ticks: the stationary distribution, the eigenvector for λ = 1.
This is the engine behind PageRank, where the states are web pages and the transition matrix encodes links, and behind every queueing and language model that carries a probability vector forward one token at a time. The two ingredients are always the same: a matrix whose powers you can reason about, and a dominant-eigenvector computation that finds where the iteration is heading. When the chain is aperiodic and irreducible, that destination is unique and independent of where you started — the stationary distribution forgets the initial condition, which is exactly what makes it useful.
Where this shows up
One iteration, two worlds
Discrete-system stability and filter convergence
A robot estimating its pose runs a filter whose error update is a discrete linear system; whether the estimate settles on the truth is a question about the magnitudes of that system's eigenvalues, and a filter with an eigenvalue on or outside the unit circle diverges. The SLAM chapter of the geometry guide lives inside exactly this loop, and the pose-graph part shows the linear systems that each step must solve.
Stationary distributions and stable recurrence
PageRank-style ranking is the dominant eigenvector of a transition matrix, and the same reasoning governs any recurrence that carries a probability or activation vector forward. Training itself is a dynamical system in the parameters: if the effective eigenvalues of the update grow past one the run diverges, which is why the learning-rate and stability analysis in the scaling chapter matters, and why schedules in LLM serving are tuned to keep the system in a stable regime.
Further reading
- Grant Sanderson, "Eigenvectors and eigenvalues", Essence of Linear Algebra, 3Blue1Brown — the visual foundation this part iterates on.
- Gilbert Strang, 18.06 Linear Algebra, MIT OpenCourseWare — Lecture 22 (diagonalization and powers), Lecture 23 (differential equations and the exponential of a matrix) and Lecture 25 (symmetric matrices).
- Immersive Math, Chapter 9: Linear Mappings and Chapter 10: Eigenvalues and Eigenvectors — the same ideas as draggable figures.
- Sheldon Axler, Linear Algebra Done Right, chapters on eigenvalues and diagonalizability — the theory of when the factorization exists, including defective matrices.