Linear Systems and the Phase Portrait
A linear system of differential equations describes two quantities that evolve together, each rate depending on both:
x′ = ax + by, y′ = cx + dy, compactly r′ = Ar with matrix A = [[a, b], [c, d]].
The behavior of every solution is decided by the eigenvalues of the coefficient matrix A, the roots of λ² − (trace)λ + (determinant) = 0. Real eigenvalues of the same sign give a node (all trajectories flow toward or away from the origin), real eigenvalues of opposite sign give a saddle (trajectories approach along one direction and escape along another), and complex eigenvalues give spirals (rotation with growth or decay) or a center (closed orbits). This calculator computes the eigenvalues and eigenvectors, classifies the equilibrium at the origin, and draws the phase portrait, the family of trajectories in the x-y plane that reveals the system's entire qualitative behavior at a glance.
How to Use the System of Differential Equations Calculator
Enter the four matrix entries a, b, c, d and an initial point (x₀, y₀). The steps form the matrix, compute the trace and determinant, solve the characteristic equation for the eigenvalues, find the eigenvectors when real, classify the equilibrium (node, saddle, spiral, center, and stable versus unstable), and describe the flow. The graph is the phase portrait: your trajectory highlighted, several context trajectories, and the eigenvector directions drawn for real eigenvalues. This is the two-dimensional generalization of the phase line, and it models coupled dynamics like the predator-prey system and the second-order linear equations it can represent.
Worked Example
Take the system x′ = y, y′ = −2x − 3y, with matrix A = [[0, 1], [−2, −3]]. The trace is −3 and the determinant is 2, so the characteristic equation is
λ² + 3λ + 2 = 0 ⇒ λ = −1, −2
Two real, negative eigenvalues mean a stable node: every trajectory decays to the origin, faster along the λ = −2 eigendirection and slower along the λ = −1 direction. This system is actually the second-order equation y″ + 3y′ + 2y = 0 written as a system, an overdamped oscillator, and the phase portrait shows every solution sliding into the origin without overshooting, the signature of overdamping. Change the matrix to have eigenvalues of opposite sign (the saddle chip) and the picture transforms completely: trajectories rush in along the stable eigendirection, then veer away along the unstable one, forming the hyperbolic flow of a saddle point, the type that governs tipping points and instabilities. Complex eigenvalues (the center and spiral chips) produce rotation: pure imaginary eigenvalues give closed elliptical orbits (a center, like an undamped oscillator), while complex eigenvalues with negative real part give inward spirals (a damped oscillator settling to rest).
Why Eigenvalues Classify Everything
The eigenvalues of the matrix A are the complete genetic code of a linear system's behavior, because the general solution is built from exponentials eλt in the eigenvector directions. When the eigenvalues are real, say λ₁ and λ₂, the solution is c₁eλ₁tv₁ + c₂eλ₂tv₂, a combination of motions along the two eigenvectors that grow (positive λ) or decay (negative λ) exponentially. This immediately explains the classification: both negative gives a stable node (everything decays), both positive an unstable node (everything grows), opposite signs a saddle (one direction decays, the other grows). When the eigenvalues are complex, λ = α ± βi, the exponential eλt combines an oscillation (from the imaginary part β, giving rotation at angular frequency β) with an amplitude change eαt (from the real part α), producing spirals that grow if α > 0, decay if α < 0, or maintain constant amplitude closed orbits if α = 0 (a center). The trace and determinant of A give a shortcut: the trace is the sum of eigenvalues and the determinant their product, so a positive determinant with negative trace means two negative eigenvalues (stable node or spiral), a negative determinant means opposite-sign eigenvalues (saddle, always unstable), and the discriminant trace² − 4·det decides real versus complex.
Common Mistakes to Avoid
- Misreading the stability from the eigenvalues. Stability requires all eigenvalues to have negative real part. A single positive (or positive-real-part) eigenvalue makes the equilibrium unstable, even if another is stable, as in a saddle.
- Confusing a center with a spiral. Pure imaginary eigenvalues (zero real part) give closed orbits (a center); complex eigenvalues with nonzero real part give spirals. The real part's sign, not just the imaginary part, determines the type.
- Forgetting the eigenvectors set the geometry. Eigenvalues give the rates; eigenvectors give the directions along which the pure exponential motions occur. Trajectories align with eigendirections as they approach or leave the origin.
- Ignoring the trace-determinant shortcut. You can classify most systems from trace and determinant alone without computing eigenvectors, a fast check that catches errors in the detailed calculation.
- Assuming the origin is the only equilibrium. For a linear homogeneous system with invertible A, the origin is the unique equilibrium. A singular A (zero determinant) has a whole line of equilibria, a degenerate case with different behavior.
Real-World Applications
Linear systems and phase-portrait analysis are foundational to understanding coupled dynamic systems throughout science and engineering. Mechanical vibrations are the classic case: a mass-spring-damper system, written as a first-order system for position and velocity, has eigenvalues that determine whether it is overdamped (real eigenvalues, stable node, no oscillation), underdamped (complex eigenvalues, spiral, decaying oscillation), or undamped (imaginary eigenvalues, center, perpetual oscillation), the same analysis governing suspension systems, buildings in earthquakes, and every resonant structure. Electrical circuits with inductors and capacitors form linear systems whose eigenvalues predict ringing and stability, central to filter and control design.
Frequently Asked Questions
What determines the behavior of a linear system?
The eigenvalues of the coefficient matrix. Real eigenvalues of the same sign give a node, opposite signs give a saddle, and complex eigenvalues give spirals or centers. The eigenvalues' signs (or real parts) decide stability, and the eigenvectors set the directions of the flow.
How do I find the eigenvalues of a 2x2 system?
Solve the characteristic equation λ² − (trace)λ + (determinant) = 0, where trace = a + d and determinant = ad − bc. The two roots are the eigenvalues. The discriminant trace² − 4·det determines whether they are real (positive) or complex (negative).
What is a phase portrait?
A plot of many trajectories in the x-y plane (state space), showing how solutions flow over time. It reveals the equilibrium type, node, saddle, spiral, or center, at a glance, displaying the qualitative behavior of all solutions without needing explicit formulas for any of them.
What is the difference between a node and a saddle?
A node has real eigenvalues of the same sign, so all trajectories flow toward (stable) or away from (unstable) the origin. A saddle has real eigenvalues of opposite sign, so trajectories approach along the stable eigendirection but escape along the unstable one, always making the saddle unstable.
When does the system spiral?
When the eigenvalues are complex, α ± βi. The imaginary part β produces rotation, and the real part α sets the amplitude: α < 0 spirals inward (stable), α > 0 spirals outward (unstable), and α = 0 gives closed orbits (a center). This describes damped and undamped oscillators.
What is a center and is it stable?
A center occurs with pure imaginary eigenvalues (zero real part), giving closed elliptical orbits around the origin, like an undamped pendulum. It is neutrally stable: nearby solutions neither approach nor diverge but circulate forever. Centers are delicate, since any small change can turn them into spirals.
How do the trace and determinant classify the system?
The determinant's sign and the trace together locate the system in the trace-determinant plane: negative determinant means a saddle; positive determinant with negative trace means stable (node or spiral); positive trace means unstable. The discriminant trace² − 4·det distinguishes nodes (real) from spirals (complex).
What do the eigenvectors tell me?
They give the special directions along which solutions are pure exponentials, growing or decaying without changing direction. Trajectories align with the eigenvectors as they approach or leave the origin, so eigenvectors are the asymptotes and axes of the phase portrait, while eigenvalues give the rates of motion along them.
How does this connect to second-order equations?
A second-order linear equation like y″ + py′ + qy = 0 becomes a 2x2 first-order system by setting the velocity as a second variable. Its eigenvalues match the roots of the second-order characteristic equation, so the node/spiral/center classification corresponds exactly to overdamped, underdamped, and undamped oscillation.
Why is eigenvalue analysis useful for nonlinear systems?
Near an equilibrium, a nonlinear system is approximated by its linearization (the Jacobian matrix), and the eigenvalues of that matrix determine the local behavior, whether the equilibrium is a stable node, saddle, or spiral. So the linear analysis here is the foundation for understanding the local dynamics of nonlinear systems throughout science.