Phase Portraits of Linear Systems
Visualize direction fields and trajectories for \(\dot{\mathbf{x}}=A\mathbf{x}\). Click the canvas to integrate trajectories from any initial condition.
The Linear System
A planar linear autonomous system has the form \(\dot{\mathbf{x}}=A\mathbf{x}\), where \(A\) is a constant \(2\times2\) matrix and \(\mathbf{x}=(x,y)^T\). The origin is always an equilibrium. The qualitative behaviour of all solutions — whether they spiral in, radiate outward, oscillate, or approach along straight lines — is determined entirely by the eigenvalues of \(A\).
Classification by Eigenvalues
Let \(\tau=\operatorname{tr}A=a+d\), \(\delta=\det A=ad-bc\), and \(\Delta=\tau^2-4\delta\).
Numerical Method
Trajectories are computed by integrating \(\dot{\mathbf{x}}=A\mathbf{x}\) both forward and backward in time using a 4th-order Runge–Kutta (RK4) method with adaptive step size. Centers are handled by a refined fixed-step integrator to produce accurate closed orbits.
How to Use
- Enter the matrix entries \(a,b,c,d\) in the matrix cells. The direction field and classification update automatically after a short pause.
- Select an example from the dropdown to load a preset matrix with strategic trajectories illustrating the classification.
- Click anywhere on the phase plane to integrate a trajectory through that initial condition (forward and backward). Trajectories are colour-coded.
- Use Generate to redraw the field and clear trajectories; Clear trajectories removes curves while keeping the field.
- Adjust arrow count, scale, opacity, and colour. Toggle grid and initial point markers using the checkboxes.
- Open the Time Series panel to plot \(x(t)\) and/or \(y(t)\) for all current trajectories.
- Download a PNG of the current portrait using Download PNG.