Complex Eigenvalues
A real matrix can have complex eigenvalues, and then the eigenvalue method produces complex solutions. As with complex characteristic roots, the real and imaginary parts of one complex solution give two real solutions, and the trajectories rotate: spirals and centers.
From one complex solution to two real ones
If is real and () has eigenvector , then
has real part and imaginary part
and both are real solutions. The conjugate eigenvalue gives nothing new. The general solution of a system is .
Example
has , so . For : gives . Therefore
The real part shrinks the trajectories, the imaginary part rotates them: a spiral sink, turning clockwise.
import numpy as np
A = np.array([[-1.0, 2.0], [-2.0, -1.0]])
lam, V = np.linalg.eig(A)
print("eigenvalues:", lam)
v = V[:, 0] / V[0, 0] # scale so the first entry is 1
print("eigenvector for", lam[0], ":", v)
t = 0.7
x1 = np.real(np.exp(lam[0] * t) * v)
print("Re part at t = 0.7:", np.round(x1, 6), " formula:", np.round(np.exp(-t) * np.array([np.cos(2*t), -np.sin(2*t)]), 6))eigenvalues: [-1.+2.j -1.-2.j]
eigenvector for (-1+2.0000000000000004j) : [ 1.-0.j -0.+1.j]
Re part at t = 0.7: [ 0.084403 -0.48936 ] formula: [ 0.084403 -0.48936 ]
Direction of rotation
To see which way a spiral or center turns, evaluate the vector field at a convenient point, such as : here , pointing down, so the motion is clockwise. No eigenvector computation is needed.
Example: a center
(the spring ) has . Trajectories are ellipses , the energy levels of the spring. Every solution is periodic with period .
import numpy as np
from scipy.integrate import solve_ivp
A = np.array([[0.0, 1.0], [-4.0, 0.0]])
sol = solve_ivp(lambda t, x: A @ x, (0, np.pi), [1.0, 0.0], t_eval=np.linspace(0, np.pi, 5), rtol=1e-11, atol=1e-12)
for t, (x, y) in zip(sol.t, sol.y.T):
print(f"t = {t:.4f}: ({x: .5f}, {y: .5f}) 4x^2 + y^2 = {4*x*x + y*y:.6f}")t = 0.0000: ( 1.00000, 0.00000) 4x^2 + y^2 = 4.000000
t = 0.7854: (-0.00000, -2.00000) 4x^2 + y^2 = 4.000000
t = 1.5708: (-1.00000, 0.00000) 4x^2 + y^2 = 4.000000
t = 2.3562: ( 0.00000, 2.00000) 4x^2 + y^2 = 4.000000
t = 3.1416: ( 1.00000, -0.00000) 4x^2 + y^2 = 4.000000
After one period the solution returns to .
In software
- Rotation with damping, , is the continuous-time picture behind many oscillating systems in simulation: orbiting cameras with easing, damped wobble effects, and the oscillating modes of a bridge model.
- In numerical linear algebra, real Schur forms keep complex eigenvalue pairs as real blocks for exactly this reason: two real solutions instead of one complex one.
Exercises
Exercise 1: Classify
Find the eigenvalues of and classify the origin.
Answer
: a center.
Solution
, , so .
Exercise 2: Real solutions
For , write the general real solution.
Answer
.
Solution
. For : gives . Real part: ; imaginary part: , which is minus the second vector above. A spiral source turning counterclockwise.
Exercise 3: Decay per turn (code)
For the spiral sink of the lesson (), by what factor does the distance to the origin shrink in one full turn?
Answer
.
Solution
One turn takes , and the length is multiplied by (here is a scaled rotation, so the norm is exactly times the initial norm).
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, np.pi), [1.0, 0.0], rtol=1e-12, atol=1e-14)
print(round(np.linalg.norm(sol.y[:, -1]), 6), round(np.exp(-np.pi), 6))0.043214 0.043214
Test yourself
Eigenvalues make the origin a…
- center
- spiral sink
- spiral source
- saddle
How do you get two real solutions from the complex solution ?
- Take its modulus and argument
- Take its real part and its imaginary part
- Multiply by
- Use the conjugate eigenvalue
For with , the rotation is…
- clockwise
- counterclockwise
- impossible to tell
- absent