Phase Portraits

2D systems, trajectories, and nullclines

The Phase Plane

A phase portrait captures the complete qualitative behavior of a two-dimensional autonomous system. Instead of plotting solutions against time, we plot the state variables against each other, revealing the geometry of the flow: spirals, saddles, nodes, and centers emerge as trajectories weave through the phase plane.

Every point in the phase plane represents a state of the system, and the vector field assigns a velocity to each state. By tracing trajectories from different initial conditions, we see how the system evolves without solving a single equation analytically.

Phase Portrait Visualizer

Explore classic 2D linear systems by selecting a preset and clicking on the phase plane to launch trajectories from different initial conditions. The vector field arrows show the instantaneous direction of motion at each point; trajectories are integrated forward using the fourth-order Runge-Kutta method.

dx/dt = -x + 2y, dy/dt = -2x - y

Click anywhere on the phase plane to place an initial condition and watch the trajectory evolve.

Key insight: The qualitative shape of trajectories -- whether they spiral inward, diverge outward, or orbit in closed loops -- is determined entirely by the eigenvalues of the coefficient matrix. Real eigenvalues produce nodes and saddles; complex eigenvalues produce spirals and centers.

Nullcline Analysis

Nullclines are curves where one component of the velocity is zero. On an x-nullcline, the horizontal velocity vanishes (dx/dt = 0), so the flow is purely vertical. On a y-nullcline, the vertical velocity vanishes (dy/dt = 0), so the flow is purely horizontal. Equilibria occur where nullclines intersect.

Predator-Prey: dx/dt = x(3 - x - 2y), dy/dt = y(2 - x - y)

Click on the phase plane to add trajectories. Nullclines divide the plane into regions with distinct flow directions.

Key insight: Nullclines partition the phase plane into regions where the signs of dx/dt and dy/dt are constant. By checking which direction the flow moves in each region, you can sketch the qualitative behavior of the system without solving anything -- a technique called qualitative analysis.

Linear System Classifier

For a linear system x' = Ax, the behavior near the origin is completely determined by the trace and determinant of the matrix A. The trace-determinant plane provides a complete classification: the parabola det = tr²/4 separates real eigenvalues (nodes) from complex eigenvalues (spirals), while the sign of the trace determines stability, and the sign of the determinant distinguishes saddles from all other types.

Stable Spiral
trace: -2.000
det: 5.000
eig: -1.000 +/- 2.000i
disc: -16.000

Adjust the matrix entries [a b; c d] to explore different linear system classifications. The left panel shows the trace-determinant diagram; the right panel shows the corresponding phase portrait.

Key insight: Move the sliders and watch the dot on the trace-determinant diagram traverse different classification regions. Crossing the parabola transitions between nodes and spirals; crossing the trace = 0 axis switches between stable and unstable; crossing the det = 0 axis produces a saddle point. This classification extends to nonlinear systems near hyperbolic equilibria via linearization.

Key Takeaways

  • Phase portraits -- plotting trajectories in the state space reveals the global qualitative behavior of a 2D system without solving it analytically
  • Vector fields -- the velocity field assigns a direction and speed to every point in the phase plane, guiding trajectories forward in time
  • Nullclines -- curves where one velocity component vanishes divide the plane into regions of qualitatively distinct flow, and equilibria lie at their intersections
  • Linear classification -- the trace and determinant of a 2x2 matrix completely classify the phase portrait as a stable/unstable node, spiral, center, or saddle
  • Eigenvalue geometry -- real eigenvalues yield nodes and saddles, complex eigenvalues yield spirals and centers, and the real part determines stability