Learning Objectives
By the end of this section you will be able to:
- Explain why the educated guess turns the coupled system into the algebraic problem .
- Compute eigenvalues and eigenvectors of a matrix by hand from .
- Build the general solution and fit the constants to an initial condition.
- Interpret the sign of each eigenvalue as a growth or decay rate, and each eigenvector as the direction of an uncoupled mode.
- Verify the eigen-method solution against direct numerical integration in Python and PyTorch.
The Big Picture: Why Eigenvalues?
"A linear system is two coupled equations — until you look in the right directions. In the eigen-directions the system uncouples, and each piece becomes a one-dimensional ODE you already know how to solve."
Suppose you are tracking two interacting populations, two springs joined by a coupling, or two reservoirs of charge that bleed into one another. The state at time is a vector , and the rule of motion is
Each component depends on all the others through the off-diagonal entries of . That coupling is what makes the system feel hard. Direct substitution gets you a tangled algebra problem; the method of undetermined coefficients gives you nothing useful.
The eigenvalue method is the change of perspective that breaks the coupling. Instead of asking "what does do?" we ask: are there directions in state space along which the matrix acts like a pure stretch? If yes, motion along such a direction stays on that direction forever — it is effectively one-dimensional. And in one dimension we already know the answer: .
The slogan
Find the special directions; ride them. Every solution of a linear constant-coefficient system is a linear combination of pure-exponential rides along eigenvectors.
The Educated Guess: Try
For the scalar equation the solution is . So it is reasonable to ask: can the vector system have a solution of the form
where is some (yet-unknown) scalar and is some constant vector?
Differentiate the guess and plug it in:
For the guess to satisfy at every , the factor cancels and we are left with a statement that involves no at all:
This is the eigenvalue equation. A pair satisfying it is an eigenvalue–eigenvector pair. The miracle is that we traded an equation involving derivatives in time for one piece of linear algebra that has no time in it at all. Time will come back in through the factor — but only after the algebra is solved.
Why the cancellation matters
The differential equation says "velocity at time equals times the state at time ." If the trajectory stays on the line through, then both sides scale together as time passes and the relationship between them is just a number . Removing time from the requirement is exactly what an eigenvector is for.
What an Eigenvector Means, Geometrically
Forget calculus for a moment. Take any 2D vector and apply the matrix to it. The result is almost always a vector that points in a different direction than . The matrix rotated and stretched it.
An eigenvector of is one of the rare directions where the rotation part disappears — stays parallel to , only its length is multiplied. The stretch factor is the eigenvalue :
For a generic matrix there are usually two such directions, and they are the natural "axes" for everything the matrix does.
Play, then read on
Drag the slider above. The orange arrow is ; the cyan arrow is . Almost everywhere they disagree by some angle — the panel reports it as . When you snap to either eigen-direction the angle drops to 0° (or 180° for a negative eigenvalue): same line, same direction, length scaled by the eigenvalue.
The Characteristic Polynomial
How do we find the eigenvalues without guessing? Rewrite the eigenvalue equation as
We need a non-zero in the null space of . A square matrix has a non-trivial null space if and only if its determinant is zero. So must satisfy
For a matrix this expands to a quadratic — the characteristic polynomial:
Two quantities decide everything: the trace and the determinant . The eigenvalues are the roots
Three cases, one formula
The discriminant decides the qualitative story:
- : two distinct real eigenvalues — pure exponential modes (node or saddle).
- : complex conjugate pair — oscillation with envelope (spiral or center).
- : one repeated real eigenvalue — borderline case, calls for a generalised eigenvector.
Finding an eigenvector once you have an eigenvalue
Substitute back into . The two rows of are guaranteed to be linearly dependent (that is the whole point of the determinant being zero), so you only need one of them. Pick the first row and solve for the ratio . The eigenvector is defined only up to a scalar, so any convenient scaling works.
Building the General Solution
Once we have two eigenpairs and , each of and solves . Because the system is linear, any constant-coefficient combination also solves it:
Two free constants are exactly what a 2-D first-order system has room for — one for each component of the initial state. To fix them, impose . Setting gives
That is a linear equation for . As long as are independent, it has a unique solution — exactly the projection of onto the eigenbasis.
The big picture in one diagram
Worked Example: A 2×2 Saddle
Solve the initial-value problem
Click to expand the full hand calculation
and . So
Factor: , so . Two real eigenvalues of opposite sign — saddle territory.
. The first row gives , i.e. . Take .
Sanity: ✓.
. First row: , so . Take .
Sanity: ✓.
must equal :
Subtract the equations: , then .
At : ✓.
Differentiate component-wise: . And equals the same thing because and by construction. ✓
As the term blows up while . So every trajectory eventually lines up with the unstable direction . As the opposite happens — trajectories swing toward the stable direction . This is the signature of a saddle: one direction repels, the other attracts.
Interactive Eigenvalue-Method Explorer
Tweak the four entries of . The panel recomputes , decomposes the initial condition , prints the symbolic solution , and draws the trajectory in the phase plane together with the two component plots and .
Three experiments worth doing
- Saddle. The default settings reproduce the worked example. Drag onto the dashed line — the trajectory now collapses straight into the origin along that one direction (the unstable mode has been zeroed out).
- Stable node. Click the "Stable node" preset. Both eigenvalues are negative. Watch both component plots decay monotonically.
- Spiral. Click "Stable spiral." The eigenvalues become complex — the symbolic display switches to the real form , the phase trajectory winds in, and the component plots become damped sinusoids.
Plain Python with NumPy
The mechanical pipeline of the eigenvalue method translates into about ten lines of NumPy. Read each card carefully — the same five steps you did by hand appear verbatim in the code.
Running the script prints, in order: the eigenvalues , two normalised eigenvectors (proportional to and ), the coefficients , and a table of sampled values for . At you should see — both components have started to chase the unstable eigen-direction .
Independent verification: brute-force Euler
Symbolic and library answers can be wrong if you typed the matrix wrong. A short forward-Euler loop computes with no eigenstructure anywhere in sight — agreement to two or three decimal places means the eigen-derivation is correct.
The Same Idea in PyTorch
Why bother with PyTorch when NumPy works? Three reasons. First, the whole pipeline above runs on a GPU with a one-line device change. Second, every intermediate tensor flows through autograd, so you can back-propagate through the eigen-decomposition — useful if itself is being learned by a neural network. Third, broadcasting lets you evaluate at thousands of times in a single vectorised call.
From script to neural ODE
Wrap in , feed observed trajectories as training data, and back-propagate the squared error of against measured points. You have just built the simplest possible linear neural ODE: the network's job is to discover the matrix whose eigenvalues and eigenvectors reproduce the data. The eigenvalue method is not a relic — it is the smallest differentiable simulation you can write.
Three Cases of Eigenvalues
The discriminant of the characteristic polynomial splits the possibilities into three cases, each with a distinct picture.
| Discriminant Δ | Eigenvalues | Solution form | Geometry |
|---|---|---|---|
| Δ > 0 | λ₁, λ₂ real, distinct | c₁ e^(λ₁ t) v₁ + c₂ e^(λ₂ t) v₂ | Node (same sign) or saddle (opposite sign) |
| Δ < 0 | α ± iβ (complex conjugates) | e^(α t) ( A₁ cos βt + A₂ sin βt ) | Spiral if α≠0, center if α=0 |
| Δ = 0 | λ repeated, real | e^(λ t) ( v + t (A − λ I) v ) | Degenerate node |
Sections 23.04, 23.05, and 23.06 dig into each case with a separate worked example. The eigenvalue method itself does not change — only how you interpret the algebra changes.
Why the three pictures all come from one formula
Complex exponentials are just sums of sines and cosines via Euler. Repeated roots are the borderline where the two solutions and collapse onto each other, requiring a second linearly-independent solution that you can read off by differentiating with respect to . Both moves come straight out of the same scalar formula — only the eigenvalue changes character.
Common Pitfalls
Forgetting to scale the eigenvector consistently
Eigenvectors are only defined up to a scalar. If you change from to , the constant will change by a factor of — that is fine. What is not fine is mixing scalings between the' general-solution' expression and the' initial-condition' step. Pick a scaling and use it everywhere.
Using det(A − λI) = 0 with a sign error
Always write the diagonal entries as , not . A sign mistake here flips the trace and produces eigenvalues with the wrong sign — your "stable spiral" becomes an unstable spiral.
Stopping at eigenvalues — forgetting eigenvectors
The eigenvalues by themselves tell you the qualitative picture (stable, unstable, oscillatory). To write down a specific solution you must also find and . A common mistake on exams is writing (scalars), which is dimensionally wrong — the answer must be a vector.
Complex eigenvalues but real solutions
If the matrix has real entries, complex eigenvalues come in conjugate pairs and so do their eigenvectors. Take the real and imaginary parts of one complex solution to get two real, linearly independent solutions and . Do not try to fit the initial condition with complex constants — you will produce algebra noise that almost cancels.
Summary
The eigenvalue method converts a coupled linear ODE system into pure algebra. The whole pipeline is six bullet points long:
- Guess .
- Substitute into . The factor cancels and you are left with .
- Solve for the eigenvalues. For : roots of .
- Find an eigenvector for each from the null space of .
- Assemble the general solution .
- Fit the constants by solving .
Coming up next: Section 23.03 turns the algebra into pictures — the phase portrait. We will see how the sign and type of the eigenvalues paint the entire global geometry of trajectories: where they come from, where they go, and how to read stability off a single sketch.