Systems of Differential Equations#
A single scalar equation has the familiar solution . The constant is a growth rate: negative means decay to , positive means explosive growth. Many models couple several unknowns at once — concentrations of chemicals, positions of masses on springs, currents in a circuit, or components of a robot state. Those systems are still first-order and linear, but the right-hand side is a matrix times a vector:
Here is the state at time , and is a fixed matrix of constant coefficients. Component-wise this is equations
so each rate depends on every component when is dense. The equations are coupled: you cannot solve for without knowing , and vice versa.
Why eigenvalues enter. Week 10 diagonalized as whenever has independent eigenvectors. Change variables to the eigen-coordinates (so ). Differentiating and substituting:
Because is diagonal, the system for decouples into independent scalar ODEs:
Each eigen-direction evolves on its own with its own exponential rate . Transforming back with reassembles the solution in the original coordinates. That is the whole strategy of this week: diagonalize, solve scalar problems, change back.
Initial condition. The system is first-order, so one vector pins down the solution completely. In eigen-coordinates that means , the vector of coefficients .
The Solution Formula#
Suppose is diagonalizable with eigenvalues and corresponding independent eigenvectors (columns of ). The general solution of is
Each term is an eigenvector times a scalar exponential whose rate is the matching eigenvalue. The constants are fixed by the initial condition:
In matrix form that is , so — solve one linear system once, then the solution is known for every .
Matrix exponential view. The same formula can be written compactly as . When ,
Expanding recovers the sum of above. You do not need the matrix-exponential series for this course — the eigen-sum is the practical formula — but it explains why diagonalization is the natural tool for continuous-time dynamics just as it was for discrete powers in Week 10.
Complex eigenvalues. If a real matrix has a complex conjugate pair , the corresponding complex exponential combines into real solutions that oscillate at frequency while growing or decaying with envelope . The real part still governs stability; the imaginary part sets the oscillation rate.
Stability#
Long-run behavior of every solution is read from the eigenvalues of . Write each eigenvalue as with real part . Then , so:
| Eigenvalues of | Long-run behavior of | Classification | |---|---|---| | Every | All terms decay to | Stable (asymptotically stable origin) | | Some | At least one term grows without bound | Unstable | | Some , none positive | Oscillation or constants (no decay, no growth from those modes) | Marginally stable / neutrally stable (with care) |
The decisive rule for this course:
- Stable if every eigenvalue has negative real part — every solution as .
- Unstable if any eigenvalue has positive real part — generic solutions explode.
- Purely imaginary eigenvalues (, ) produce sustained oscillation: neither grows nor decays. Pure zero eigenvalues produce constant modes along the corresponding eigenvectors.
A single unstable eigenvalue ruins the system: even if ten modes decay, the one growing mode dominates for large . Conversely, stability requires all eigenvalues to lie in the open left half-plane.
Intuition from the scalar case. For , stability is simply . The matrix case is the same test applied to every eigen-direction independently — that is why diagonalization converts a hard coupled question into easy sign checks.
Preview of Week 12. When is symmetric (real), every eigenvalue is real, so there is no oscillatory pair. Stability then reduces to “are all eigenvalues negative?” Symmetric matrices with nonpositive eigenvalues are a clean special case of the table above; Week 12 develops the spectral theory that makes those eigenvalues especially well-behaved.
Example: A Two-Component System#
Work a full example end to end. Let
Step 1 — eigenvalues. Trace and , so
Eigenvalues: , . Both are real and negative, so the origin is stable — every solution will decay to .
Step 2 — eigenvectors. For :
For :
So
Step 3 — coefficients from .
Step 4 — solution formula.
Check : both components match. As , both exponentials vanish, so , confirming stability from the signs of .
Contrast — an unstable matrix. Replace by :
has eigenvalues and . The same algebra with and produces solutions that grow without bound — unstable. The eigenvectors stay the same; only the signs of the rates flip.
Contrast — pure oscillation. The rotation generator
has eigenvalues . Solutions are rotations: circles the origin at constant radius (sustained oscillation, neither decay nor growth). Purely imaginary eigenvalues sit on the stability boundary.
Knowledge check#
A system du/dt = Au has eigenvalues -1 and -3. What is its long-run behavior?
Browser lab#
Simulate a stable and an unstable system side by side.
import numpy as np
import matplotlib.pyplot as plt
A_stable = np.array([[-1., 0.], [0., -3.]])
A_unstable = np.array([[1., 0.], [0., 2.]])
def simulate(A, u0, t):
eigvals, eigvecs = np.linalg.eig(A)
c = np.linalg.solve(eigvecs, u0)
U = np.zeros((len(t), 2))
for i, ti in enumerate(t):
U[i] = (eigvecs @ (c * np.exp(eigvals * ti))).real
return U
t = np.linspace(0, 3, 100)
u0 = np.array([1.0, 1.0])
U_stable = simulate(A_stable, u0, t)
U_unstable = simulate(A_unstable, u0, t)
fig, axes = plt.subplots(1, 2, figsize=(10, 4))
axes[0].plot(t, U_stable)
axes[0].set_title("Stable: eigenvalues -1, -3")
axes[1].plot(t, U_unstable)
axes[1].set_title("Unstable: eigenvalues 1, 2")
plt.tight_layout()
plt.show()
The left panel decays to zero (negative eigenvalues). The right panel explodes (positive eigenvalues). The lab uses the eigen-sum formula from this lesson: solve , then plot at each .
Quiz#
The general solution of du/dt = Au is u(t) = a sum of terms c_i e^{λ_i t} times the corresponding ___ of A.