A two-dimensional linear system \(\dot{\mathbf x} = A\mathbf x\) turns a 2×2 matrix into a flow on the plane. Everything about that flow is decided by two numbers, the trace and the determinant of \(A\): they fix the characteristic polynomial, the eigenvalues, and with them the eigenvectors along which the motion runs in a straight line. Type a matrix below and watch the portrait rearrange itself in real time, from saddle to node to spiral to center, following the classification of chapter 5 of Strogatz's Nonlinear Dynamics and Chaos.
Click anywhere to draw the trajectory through that point · drag to pan · scroll to zoom.
Reading the picture
- Eigendirection with \(\lambda \lt 0\): the flow runs inward along it and the eigensolution decays.
- Eigendirection with \(\lambda \gt 0\): the flow runs outward and the eigensolution grows.
- Trajectories you click, nullclines, and any line made entirely of fixed points.
- Solid dot: a Liapunov stable fixed point.
- Open dot: an unstable fixed point. This is the convention used throughout the book.
Classification diagram
The type and stability of every fixed point fit on a single picture whose axes are the determinant \(\Delta\) and the trace \(\tau\). Saddles fill the half plane \(\Delta \lt 0\). For \(\Delta \gt 0\) the parabola \(\tau^2 - 4\Delta = 0\) separates nodes from spirals, and the sign of \(\tau\) decides whether they attract or repel. The borderline cases live on the curves: centers on the positive \(\Delta\) axis, stars and degenerate nodes on the parabola, and non-isolated fixed points on the \(\tau\) axis.
The marker shows where the matrix you typed falls. Saddles, nodes and spirals occupy whole regions, so they survive a small change in the matrix; everything else sits on a curve and does not.
From the matrix to the portrait
Every number drawn above comes from the following chain, recomputed each time you touch a parameter.
The theory behind it
The phase plane
The system assigns the vector \((\dot x, \dot y)\) to every point \((x, y)\), which is a vector field on the plane. Picture a fluid flowing with that local velocity: drop a phase point anywhere and watch where the current carries it. Since \(\dot{\mathbf x} = \mathbf 0\) exactly when \(\mathbf x = \mathbf 0\), the origin is a fixed point for every matrix, and the whole question is how the flow behaves around it.
Straight-line solutions
Look for trajectories of the special form \(\mathbf x(t) = e^{\lambda t}\mathbf v\), which move along a fixed line through the origin with simple exponential growth or decay. Substituting into \(\dot{\mathbf x} = A\mathbf x\) and cancelling \(e^{\lambda t}\) leaves \(A\mathbf v = \lambda\mathbf v\), so these eigensolutions exist exactly when \(\mathbf v\) is an eigenvector of \(A\).
Only two numbers matter
Expanding \(\det(A - \lambda I) = 0\) gives \(\lambda^2 - \tau\lambda + \Delta = 0\) with \(\tau = \operatorname{tr}(A)\) and \(\Delta = \det(A)\), so \(\lambda_{1,2} = \tfrac12\left(\tau \pm \sqrt{\tau^2 - 4\Delta}\right)\). The eigenvalues, and therefore the entire shape of the portrait, depend on nothing but the trace and the determinant.
The general solution
When the eigenvalues are distinct, the eigenvectors are linearly independent and span the plane, so any initial condition splits as \(\mathbf x_0 = c_1\mathbf v_1 + c_2\mathbf v_2\) and the solution is \(\mathbf x(t) = c_1e^{\lambda_1 t}\mathbf v_1 + c_2e^{\lambda_2 t}\mathbf v_2\). It solves the equation, it matches the initial condition, and by the existence and uniqueness theorem it is the only one that does.
Saddles and nodes
If \(\Delta \lt 0\) the eigenvalues are real with opposite signs and the origin is a saddle point: the eigenvector with \(\lambda \gt 0\) spans the unstable manifold, the one with \(\lambda \lt 0\) the stable manifold, and a typical trajectory approaches the unstable manifold as \(t \to \infty\). If both eigenvalues share a sign the point is a node, and trajectories leave the origin tangent to the slow eigendirection, the one with the smaller \(|\lambda|\).
Spirals and centers
Complex eigenvalues \(\lambda = \alpha \pm i\omega\) appear when \(\tau^2 - 4\Delta \lt 0\). Euler's formula turns the exponentials into \(e^{\alpha t}\cos\omega t\) and \(e^{\alpha t}\sin\omega t\), so the trajectories rotate with period \(T = 2\pi/\omega\) while their amplitude follows \(e^{\alpha t}\). A negative \(\alpha\) gives a stable spiral, a positive one an unstable spiral, and \(\alpha = 0\) a center surrounded by closed orbits, the situation of the undamped harmonic oscillator.
Repeated eigenvalues
When \(\lambda_1 = \lambda_2\) there are two possibilities. If two independent eigenvectors survive, then \(A\) simply stretches every vector by the same factor, so \(A = \lambda I\), every direction is an eigendirection and the point is a star node. If only one eigendirection remains, the point is a degenerate node: it is what you get by scissoring the two eigendirections of an ordinary node together, and it sits exactly on the borderline between a node and a spiral.
The language of stability
A fixed point is attracting when every nearby trajectory reaches it as \(t \to \infty\), and Liapunov stable when every nearby trajectory stays nearby for all time. Neither implies the other: a center is Liapunov stable but not attracting, which is called neutrally stable, while the flow \(\dot\theta = 1 - \cos\theta\) on the circle is attracting but not Liapunov stable. A point that is both is called stable, or asymptotically stable.
Following Steven H. Strogatz, Nonlinear Dynamics and Chaos, third edition, chapter 5: Linear Systems.