Application: Systems of Linear Differential Equations
When several quantities change at rates that depend linearly on each other, such as temperatures in neighbouring rooms or masses joined by springs, you get a system . In the eigenvector basis the system falls apart into separate one-variable equations, each solved by an exponential. This is how engineers find a structure's vibration modes and how a physics engine can understand what its springs will do.
One equation, then many
The scalar equation has the solution (see Differential Equations). Now let be a vector and a constant matrix:
If is an eigenvector, , then is a solution: its derivative is . If is diagonalizable with eigenpairs , every solution is a combination of these:
The are the coordinates of in the eigenvector basis, found by solving . Equivalently: substitute , and the system becomes , decoupled equations .
Example: heat flowing between two rooms
Two rooms share a wall, and each also loses heat to the outside. Let be their temperatures above the outdoor temperature. Each room cools at rate 2 and gains heat from the other at rate 1:
Start with room 1 at 10 degrees above outside and room 2 at 0: . So
The mode, the difference between the rooms, dies three times faster than the mode, the shared average. After a short while both rooms have about the same temperature and cool together like . Let's check the formula against SciPy's numerical solver:
import numpy as np
from scipy.integrate import solve_ivp
A = np.array([[-2.0, 1.0], [1.0, -2.0]])
sol = solve_ivp(lambda t, x: A @ x, (0, 3), [10.0, 0.0], t_eval=[0.5, 1, 2, 3],
rtol=1e-10, atol=1e-12)
for t, x1, x2 in zip(sol.t, *sol.y):
f1 = 5 * np.exp(-t) + 5 * np.exp(-3 * t)
f2 = 5 * np.exp(-t) - 5 * np.exp(-3 * t)
print(f"t={t:3.1f} solver ({x1:.5f}, {x2:.5f}) formula ({f1:.5f}, {f2:.5f})")t=0.5 solver (4.14830, 1.91700) formula (4.14830, 1.91700)
t=1.0 solver (2.08833, 1.59046) formula (2.08833, 1.59046)
t=2.0 solver (0.68907, 0.66428) formula (0.68907, 0.66428)
t=3.0 solver (0.24955, 0.24832) formula (0.24955, 0.24832)
Stability can be read off the eigenvalues: if every eigenvalue has negative real part, every solution decays to 0. One eigenvalue with positive real part is enough for most solutions to blow up.
Coupled springs and normal modes
Two equal masses () sit between two walls, joined wall–spring–mass–spring–mass–spring–wall, every spring with stiffness . Newton's law gives a second-order system:
It is the same matrix. Along an eigenvector with eigenvalue , the equation becomes , a simple harmonic oscillator with angular frequency (Second-Order Linear Equations):
| Mode | Eigenvalue | Eigenvector | Frequency | Motion |
|---|---|---|---|---|
| 1 | −1 | both masses swing together | ||
| 2 | −3 | masses swing against each other |
These are the normal modes. Every motion is a mix of them. Pulling mass 1 out to and letting go from rest gives . The two frequencies are not in a rational ratio, so the motion never exactly repeats, and energy sloshes back and forth between the masses:
import numpy as np
import matplotlib.pyplot as plt
A = np.array([[-2.0, 1.0], [1.0, -2.0]])
values, P = np.linalg.eigh(A) # eigenvalues sorted: -3, -1
omegas = np.sqrt(-values)
c = np.linalg.solve(P, [1.0, 0.0]) # modal coordinates of x(0)
t = np.linspace(0, 30, 1500)
x = P @ (c[:, None] * np.cos(np.outer(omegas, t))) # sum of c_i cos(w_i t) v_i
plt.figure(figsize=(7, 3.5))
plt.plot(t, x[0], label="mass 1"); plt.plot(t, x[1], label="mass 2")
plt.xlabel("t"); plt.legend(); plt.title("Two coupled springs")
print("mode frequencies:", [round(float(w), 4) for w in omegas])
print("x(5) =", [round(float(v), 4) for v in P @ (c * np.cos(omegas * 5))])mode frequencies: [1.7321, 1.0]
x(5) = [-0.219, 0.5027]
In software
- Game physics: cloth, soft bodies and ropes are big spring networks. The stiffest mode (largest ) limits the time step an explicit integrator can take, which is why engines use implicit or position-based solvers (Springs, Integrators).
- Engineering and audio: finite-element packages compute the lowest normal modes of bridges and buildings; physical-modelling synthesizers sum modes to make bells and drums sound real.
- Control and robotics: a controller is designed so that all eigenvalues of the closed-loop matrix have negative real parts.
- Graph diffusion: heat spreading on a network is with the graph Laplacian ; its eigenvectors are the basis of spectral clustering and graph neural networks.
For the solver side see ODEs in SciPy. A closed form for any , including non-diagonalizable ones, is the matrix exponential.
Exercises
Exercise 1: Solve a system
Solve with .
Answer
, i.e. , .
Solution
The eigenvalue makes this system unstable: the part grows without bound.
Exercise 2: Stable or not?
For which of these is every solution of decaying to 0? (a) , (b) , (c) .
Answer
Only (a).
Solution
(a) is triangular with eigenvalues −1, −2: both negative, so everything decays. (b) has , : real part 0, the solutions rotate forever without decaying. (c) has eigenvalue , so the second coordinate grows like .
Exercise 3: Stiffer springs
Masses joined to the walls by springs of stiffness 2 and to each other by a spring of stiffness 1 give . Find the normal modes and their frequencies.
Answer
In-phase mode with ; out-of-phase mode with .
Solution
The middle spring is only stretched in the out-of-phase mode, which is why that mode is faster.
Exercise 4: Check with a solver
Integrate the system of Exercise 1 numerically up to and compare with the closed form.
Answer
Both give .
Solution
import numpy as np
from scipy.integrate import solve_ivp
A = np.array([[1.0, 2.0], [2.0, 1.0]])
sol = solve_ivp(lambda t, x: A @ x, (0, 1), [3.0, 1.0], rtol=1e-11, atol=1e-12)
x1, x2 = sol.y[:, -1]
e3, em = np.exp(3.0), np.exp(-1.0)
print(f"solver: ({x1:.4f}, {x2:.4f})")
print(f"formula: ({2 * e3 + em:.4f}, {2 * e3 - em:.4f})")solver: (40.5390, 39.8032)
formula: (40.5390, 39.8032)
Test yourself
If , which function solves ?
A system has eigenvalues −4 and −0.5. Which mode dominates for large ?
- The −4 mode
- The −0.5 mode
- Both equally
- Neither: the solution grows
For , an eigenvalue −9 of corresponds to an oscillation with angular frequency…
- 9
- −9
- 3
- 81