For the last three lessons, time came in whole steps. We iterated a matrix, xn+1=Axn, and found that eigenvalues decide everything: ∣λ∣>1 means growth, ∣λ∣<1 means decay, and complex λ means rotation. But a falling ball, a swinging pendulum and a swirling fluid don’t hop from frame to frame. Their state changes continuously, following a velocity rule like x′=Ax. Your simulator then chops that continuous motion back into steps of size h. This lesson connects the two pictures. The object that does it is the matrix exponentialeAt, the continuous-time version of An. It ties together everything in this module (eigenvectors, diagonalization, complex eigenvalues, determinants), it is the master key to linear systems of ODEs, and it explains exactly what Euler, RK4 and every other time-stepper you’ve written are trying to compute.
▶ VideoPart 1: from hopping to flowing, Euler's limit, and the series for e^(At)captions only
Transcript
This is the last lesson of Linear Algebra, Reloaded, and the bridge into differential equations. Its hero is the matrix exponential.
For the last three lessons we iterated a matrix: x n plus one equals A times x n. Time came in whole steps, and the state hopped from point to point.
Now let time flow continuously. Instead of a jump rule we get a velocity rule: the rate of change of x is A times x. At every point, the matrix tells you which way to move.
Jumps became a smooth curve. Our question for this lesson: what plays the role of A to the n, when time is continuous?
Start with one number instead of a vector. The equation y prime equals k y says the growth rate is proportional to the size. Its solution, from calculus, is e to the k t times y naught.
Now pretend you don't know that, and use Euler's method with step h. Each step adds h times the slope, so it multiplies y by one plus h k. After n steps, y is one plus h k to the n, times y naught. That is discrete dynamics again.
Take k equal to one and run to t equals two. With h equal to one half, Euler lands near five. With a quarter, near six. With a tenth, six point seven. The polygons creep up toward the true curve, which ends at e squared, about seven point four.
With h equal to t over n, this is exactly the compound interest limit from calculus. Compound more and more often, and one plus t over n, to the n, becomes e to the t. Euler's method, in the limit of tiny steps, computes the exponential.
Calculus two gave us a second description of the exponential: its power series. One, plus x, plus x squared over two factorial, plus x cubed over three factorial, and so on. It converges for every x.
The series only uses adding, scaling and multiplying, and all three make sense for square matrices. So we simply define e to the A t by the same series, with the identity matrix in place of one. It converges for every matrix.
Differentiate term by term. The derivative of A t is A. The derivative of A t squared over two is A squared t. Factor out one A, and the original series comes back: the derivative of e to the A t is A times e to the A t.
So x of t equals e to the A t times x naught has derivative A times x of t, and at time zero it equals x naught. That is the solution of x prime equals A x. The answer to our question: e to the A t is the continuous version of A to the n.
In part two we put this matrix in motion: rotations, saddles and spirals, and what it all means for RK4 and for fluid solvers.
From hopping to flowing
Here are the two kinds of linear dynamics side by side.
Discrete
Continuous
Rule
xn+1=Axn
dtdx=Ax
Meaning
A says where to jump
A says which way to move, and how fast
Solution
xn=Anx0
x(t)=eAtx0
Eigen-mode
λnv
eλtv
Decays when
∣λ∣<1
Reλ<0
In the continuous rule, A turns a position into a velocity. At every point x of the plane, the arrow Ax tells a particle sitting there which way to go. Picture a whole field of arrows, a vector field, and the solution curves are the paths you’d trace by following the arrows. You’ll study general vector fields in 2.6 Vector Fields, Flow Lines & Streamlines. Here the field is linear, which is why linear algebra can solve it exactly.
The bottom two rows of the table are the real story of this lesson. Along an eigenvector v with Av=λv, the discrete system multiplies by λ each step, while the continuous system grows like eλt. So “inside the unit circle” for maps becomes “in the left half-plane” for flows. To see why, start with one number instead of a vector.
The scalar case: Euler’s method meets compound interest
The equation y′=ky says the growth rate is proportional to the size. You know its solution from calculus:
y′=ky,y(0)=y0⟹y(t)=ekty0.
Now pretend you don’t know that, and run forward Euler with step h. Each step adds h times the slope:
yn+1=yn+h(kyn)=(1+hk)yn⟹yn=(1+hk)ny0.
Euler’s method has turned the continuous equation into a discrete dynamical system with multiplier 1+hk. To reach a fixed time t, take n steps of size h=t/n:
yn=(1+nkt)ny0.
This is the compound interest formula: a rate k for time t, compounded n times. As n→∞, take logarithms and use ln(1+u)=u−u2/2+⋯:
ln(1+nkt)n=n(nkt−2n2k2t2+⋯)=kt−2nk2t2+⋯⟶kt.
So (1+kt/n)n→ekt. In the limit of tiny steps, Euler’s method computes the exponential. The leftover term also tells you how fast: (1+kt/n)n≈ekt(1−2nk2t2), so the relative error shrinks like 1/n, i.e. like h. That’s what “Euler is first order” means.
🐍 PythonEuler's method is compound interest
⌘/Ctrl + Enter
The last column settles down to a constant, which is the 1/n law in action.
✅ Concept check
Forward Euler with step $h$ applied to the system $\vec x' = A\vec x$ produces which sequence?
Why: Euler turns $\vec x' = A\vec x$ into the discrete system with matrix $I + hA$. Everything you learned about $A^n$ in lessons 1.5 to 1.7 now applies to $(I+hA)^n$.
The exponential as a power series
Calculus II gave you a second description of ex, its Taylor series about 0:
ex=k=0∑∞k!xk=1+x+2!x2+3!x3+4!x4+⋯
The ratio test shows it converges for everyx: the ratio of consecutive terms is ∣x∣/(k+1)→0. Two properties follow directly from the series:
Derivative. Differentiating term by term, dtdekt=dtd∑j!kjtj=j≥1∑(j−1)!kjtj−1=kekt.
Product rule. Multiplying two series and collecting terms (the binomial theorem does the bookkeeping) gives eaeb=ea+b. Hold on to this one. It quietly uses ab=ba, and it will fail for matrices.
The series uses only three operations: adding, scaling by numbers, and multiplying. All three make sense for square matrices. So we define the matrix exponential by the same series, with the identity matrix I playing the role of 1:
Let’s compute a few directly from the definition.
Diagonal matrices. Powers of a diagonal matrix are diagonal, Dk=diag(λ1k,λ2k), so the series runs separately down the diagonal:
A diagonal system x1′=λ1x1, x2′=λ2x2 is just two unrelated scalar equations, and eDt solves each one.
Nilpotent matrices. For the shear N=[0010], we have N2=0, so the series stops after two terms:
eNt=I+Nt=[10t1].
Notice the t: no exponentials at all, just linear growth. This is the fingerprint of a matrix that can’t be diagonalized, which you met in 1.6 Change of Basis & Diagonalization.
Useful properties. Straight from the series, with A commuting with itself:
eA⋅0=I.
eA(s+t)=eAseAt: flowing for time s then time t is the same as flowing for s+t.
So eAt is always invertible, with (eAt)−1=e−At: you can always run the flow backward.
If AB=BA, then eA+B=eAeB. If AB=BA, this generally fails. We’ll come back to this when we talk about fluid solvers.
Why eAt solves x′=Ax
Differentiate the series term by term, exactly as in the scalar case. The derivative of k!Aktk is (k−1)!Aktk−1:
dtdeAt=A+A2t+2!A3t2+⋯=A(I+At+2!A2t2+⋯)=AeAt.
Now set x(t)=eAtx0. Then
x′(t)=AeAtx0=Ax(t),x(0)=Ix0=x0.
(Uniqueness takes one more line: if y is any solution, then dtd(e−Aty)=−Ae−Aty+e−AtAy=0, since A commutes with e−At, so e−Aty(t) is constant and equal to x0. The general theory is in 3.7 Existence & Uniqueness.)
So eAt really is the continuous version of An. It is the matrix that carries the state at time 0 to the state at time t.
Computing eAt by diagonalization
Summing a series by hand is rarely practical. Diagonalization does the work. If A=PDP−1, with the eigenvectors in the columns of P and the eigenvalues on the diagonal of D, then the P−1P pairs cancel inside powers:
Ak=(PDP−1)(PDP−1)⋯(PDP−1)=PDkP−1.
Put that into the series and factor P out on the left and P−1 on the right:
The geometric meaning is the same as for An in 1.6 Change of Basis & Diagonalization: switch to eigen-coordinates (P−1), let each coordinate grow independently by eλit, and switch back (P). Equivalently, write x0=c1v1+c2v2 in the eigenbasis. Then
The second form is the eigen-mode expansion, with c1=c2=21 (which is P−1x0). For large t the e3t mode dominates and the trajectory lines up with v1=(1,2). This is a saddle: one eigenvalue positive, one negative.
✅ Concept check
For $A = \operatorname{diag}(2, -1)$, what is the top-left entry of $e^{At}$ at $t = \ln 3$?
Why: $e^{At} = \operatorname{diag}(e^{2t}, e^{-t})$, and $e^{2\ln 3} = 3^2 = 9$. (The other diagonal entry is $e^{-\ln 3} = 1/3$.)
(This identity holds for every square matrix, diagonalizable or not.) Since the determinant is the area scaling factor, the flow changes areas by the factor ettrA.
Rotation: eθJ and Euler’s formula
Now take the rotation generator
J=[01−10],Jx⊥x for every x.
The velocity Jx is always perpendicular to the position, so a particle can’t move toward or away from the origin. It circles forever. Let’s confirm that with the series. The powers of J cycle with period four, exactly like the powers of i:
The exponential of the rotation generator is the rotation matrix. Compare it with Euler’s formula from 1.7 Complex Eigenvalues & Rotation:
eiθ=cosθ+isinθ.
It’s the same computation, line for line, because J is the real 2×2 matrix that behaves like i (J2=−I), and its eigenvalues are ±i. Multiplying a complex number by eiθ rotates it by θ. Multiplying a vector by eθJ does the same thing.
More generally, A=aI+bJ=[ab−ba] has eigenvalues a±ib. Since aI commutes with everything, eAt=eatebtJ: rotate at angular speed b while scaling by eat. That’s a spiral, inward if a<0 and outward if a>0, exactly the spirals of lesson 1.7, now running in continuous time.
✅ Concept check
What is $e^{\pi J}$, for the rotation generator $J$?
▶ VideoPart 2: Euler on a rotation, linear flows, and time-steppers as approximations of e^(hA)captions only
Transcript
In part one we defined e to the A t by its power series and showed that it solves x prime equals A x. Now let's watch it move the plane.
Now the same idea with a matrix. Take the rotation generator J: zero, minus one, one, zero. The velocity J x is always perpendicular to x, so the exact solution goes around a circle forever.
Euler's method for x prime equals A x is x n plus one equals I plus h A, times x n. So after n steps we have I plus h A, to the n, times x naught. Watch three step sizes for one full turn.
Euler spirals outward, because each Euler step rotates a little and also stretches by the square root of one plus h squared. As h shrinks the spiral tightens onto the circle. Just like the scalar case, I plus h A to the n converges to e to the A t.
What is the exact answer? J squared is minus the identity, just like i squared is minus one. So the series splits into even and odd powers, which are the series for cosine and sine.
e to the t J is exactly the rotation matrix by angle t. It is Euler's formula from the complex eigenvalues lesson, e to the i t equals cosine t plus i sine t, written as a two by two matrix.
Here is the picture to remember. e to the A t doesn't move just one point. It moves every point of the plane at once. It is a flow, and every initial condition rides along.
First a saddle. This matrix has eigenvalues one and minus one half, with eigenvectors along the two diagonals. Particles are squeezed toward one diagonal and stretched along the other.
This is diagonalization at work. In the eigenvector basis the flow is just two separate exponentials: e to the t along the red line, and e to the minus t over two along the green one. So e to the A t equals P, times e to the D t, times P inverse.
Next, complex eigenvalues minus zero point two plus or minus i. The imaginary part rotates, the negative real part shrinks, and the whole plane swirls down the drain like a decaying vortex.
Finally a center, with purely imaginary eigenvalues. Every particle travels around an ellipse and comes back after one period. The trace is zero, so the flow preserves area, exactly like an incompressible fluid.
Now the payoff for simulation. One step of size h should multiply the state by e to the h A. Forward Euler uses only the first two terms of the series: I plus h A.
And here is something your simulations course may not have told you. For a linear system, one RK4 step is exactly the Taylor series of e to the h A, cut off after the fourth power. That is why RK4 is fourth order.
Along each eigenvector the true solution multiplies by e to the h lambda, and the method multiplies by R of h lambda. Accuracy is how closely R matches the exponential. Stability is whether R stays at most one in size when the true solution doesn't grow. On a center, Euler's factor is always bigger than one: that's the outward spiral we saw.
One warning. For numbers, e to the a plus b equals e to the a times e to the b. For matrices that fails, unless A and B commute.
Fluid solvers break each time step into pieces: advect, then diffuse, then project. That is operator splitting, and it approximates e to the A plus B times h by e to the A h times e to the B h. The commutator of A and B sets the splitting error.
To recap: x prime equals A x is solved by e to the A t times x naught. You can compute it from the series or by diagonalizing, and every time-stepper you know is an approximation of it.
That completes our linear algebra toolkit. Next we go multivariable: partial derivatives, gradients and vector fields. And in the systems module, the matrix exponential returns as the master key to every linear system of differential equations.
Explore: the flow of a linear system
The sim moves a cloud of particles with the exact flow x(t)=eAtx0. It uses a closed form for 2×2 matrices that’s equivalent to the series. From one seed point (the ring), it also runs forward Euler, (I+hA)nx0, and RK4 with step h so you can compare them with the exact path.
◆ InteractiveFlow of x′ = Ax: exact e^(At) vs Euler and RK4
Loading simulation…
Try these:
Rotation, h = 0.25. Euler (amber) spirals outward. The readout shows its per-step growth factor ∣1+hi∣=1+h2>1. RK4 (green) stays on the circle. Push h up to 1: Euler explodes, and RK4 finally starts to visibly lose radius.
Saddle. With eigenvectors on, the cloud drains in along the stable line (λ=−21) and streams out along the unstable line (λ=1). The violet area blob gets stretched into a thin sliver. Its area grows like e0.5t, because trA=0.5 (see the readout). Now set a=d=0 (keeping b=c=0.75) to get a saddle with trA=0. The blob still deforms wildly, but its area stays fixed at its starting value.
Spiral sink and source. The real part of λ sets the shrink or growth rate and the imaginary part sets the rotation speed. Compare one turn of the cloud to the spirals of lesson 1.7.
Shear.λ=0 is repeated and there’s only one eigenvector. Particles slide along horizontal lines at speeds proportional to their height, eNt=I+Nt, with no exponentials.
Euler’s method is an approximation of eAt
The scalar computation carries over to matrices. Forward Euler for x′=Ax gives
xn+1=xn+hAxn=(I+hA)xn⟹xn=(I+hA)nx0.
With h=t/n, the matrix version of the compound interest limit holds:
n→∞lim(I+nAt)n=eAt.
When A=PDP−1 this follows from the scalar case: (I+hA)n=P(I+hD)nP−1, and each diagonal entry (1+hλi)n tends to eλit. It’s true for every square matrix, and the error again decays like 1/n.
The rotation, concretely. For A=J, factor I+hJ as a scaling times a rotation:
I+hJ=[1h−h1]=1+h2[cosϕsinϕ−sinϕcosϕ],tanϕ=h.
Every Euler step rotates by ϕ≈hand stretches by 1+h2>1. That’s why Euler spirals outward on a center no matter how small h is. After n steps the radius has grown by (1+h2)n/2. For one full turn (nh=2π) with h=2π/63≈0.0997, that’s (1.00995)31.5≈1.37, a 37% error in the radius after one orbit, even with 63 steps. The growth does vanish as h→0 (it is about e2π2/n), but slowly, at first order.
✅ Concept check
Forward Euler with a fixed small step $h$ is applied to the center $\vec x' = J\vec x$. Over many steps, the distance from the origin…
Every explicit time-stepper approximates ehA
Here’s the big idea for simulation. For x′=Ax, the exact solution satisfies
x(t+h)=ehAx(t),
so the perfect one-step method would multiply by ehA. Every explicit one-step method applied to a linear system instead multiplies by some polynomial R(hA), and the polynomial is a truncation of the exponential series:
Method
One step for x′=Ax
Stability function R(z)
Order
exact
ehA
ez=1+z+2z2+6z3+24z4+⋯
n/a
forward Euler
I+hA
1+z
1
Heun / midpoint
I+hA+2(hA)2
1+z+2z2
2
RK4
I+hA+2(hA)2+6(hA)3+24(hA)4
1+z+2z2+6z3+24z4
4
RK4 is the fourth-order Taylor polynomial of ehA. Here’s the check, using the RK4 stages you already know with f(x)=Ax:
Now collect x+6h(k1+2k2+2k3+k4) power by power. The A terms give 6h(1+2+2+1)A=hA. The A2 terms give 6h(2⋅2h+2⋅2h+h)A2=2h2A2. The A3 terms give 6h(2⋅4h2+2h2)A3=6h3A3. The A4 term gives 6h⋅4h3A4=24h4A4. So
xn+1=(I+hA+2!(hA)2+3!(hA)3+4!(hA)4)xn.
Those four clever stage weights, 61,31,31,61, are exactly what’s needed to reproduce ehA through the h4 term without ever forming a matrix power. The per-step error is the first missing term, about 120(hA)5, which is O(h5). Over t/h steps it adds up to O(h4). That’s why RK4 is “fourth order”. (For nonlinear f the stages also have to match cross-derivative terms, which is the hard part of designing RK methods. See 4.3 Runge–Kutta Methods & Butcher Tableaux.)
Stability: comparing R(hλ) with ehλ
Diagonalize once more. Along an eigenvector with eigenvalue λ, the true solution multiplies by ehλ each step, and the method multiplies by R(hλ). So:
Accuracy is how closely R(z) matches ez near z=0.
Stability asks whether ∣R(hλ)∣≤1 whenever the true mode doesn’t grow (Reλ≤0). If some mode has ∣R(hλ)∣>1 when it shouldn’t, that mode gets amplified every step and the simulation blows up.
On the rotation (λ=±i, z=±ih):
Euler: ∣1+ih∣2=1+h2>1. Unstable for every h.
RK4: with R(ih)=(1−2h2+24h4)+i(h−6h3), a short calculation gives ∣R(ih)∣2=1−72h6+576h8. That’s just below1 as long as h2<8, i.e. h<22≈2.83. RK4 is stable on centers for reasonable steps, and it loses a tiny bit of amplitude per step instead of gaining it.
✏️ Pen & paperEuler and RK4 on a center●●●
Consider x′=Jx with x(0)=(1,0), integrated for one full revolution (t=2π) using N equal steps, h=2π/N.
Show that forward Euler ends at radius (1+h2)N/2, and evaluate it for N=20.
Show that, for large N, this radius is approximately e2π2/N. How many steps does Euler need for a radius error below 1%?
Using ∣R(ih)∣2=1−72h6+576h8 for RK4, estimate the radius after one revolution with N=20.
Show worked solution
∥(I+hJ)x∥=1+h2∥x∥, because I+hJ is 1+h2 times a rotation, and rotations preserve length. After N steps the radius is (1+h2)N/2. For N=20: h=π/10≈0.3142, h2≈0.09870, and (1.09870)10≈2.56. Euler’s “circle” ends at more than two and a half times the true radius.
ln[(1+h2)N/2]=2Nln(1+h2)≈2Nh2=2N⋅N24π2=N2π2. So the radius is about e2π2/N≈1+2π2/N. A 1% error needs 2π2/N<0.01, i.e. N>200π2≈1974 steps per revolution. That’s first-order convergence in action.
With h=0.3142: h6≈9.61×10−4 and h8≈9.49×10−5, so ∣R∣2≈1−1.335×10−5+1.6×10−7≈1−1.32×10−5. Over 20 steps the radius is (∣R∣2)10≈1−1.32×10−4≈0.99987. RK4 with only 20 steps has a radius error about ten thousand times smaller than Euler’s, and it errs on the safe side (slightly inward).
🧪 Coding exerciseExercise: one RK4 step is the 4th-order Taylor polynomial of e^(hA)✓ passed
⌘/Ctrl + Enter
💡 Stages: k1 = A @ x, k2 = A @ (x + h/2*k1), and so on. For Taylor, keep a running term: start with term = x, then repeatedly term = (h*A) @ term / j.
A warning: eA+B=eAeB
For numbers, ea+b=eaeb. For matrices, expand both sides to second order:
The difference is controlled by the commutatorAB−BA. If A and B commute, all the higher terms cancel too and eA+B=eAeB exactly. Otherwise it fails. Lesson 1.2 showed that matrix multiplication isn’t commutative, and here’s a place where that really matters.
🐍 PythonSplitting error is first order (Lie) or second order (Strang)
⌘/Ctrl + Enter
✅ Concept checkselect all that apply
Select all statements that are true for every pair of square matrices $A$, $B$ (and every $t$).
Computing eA yourself
Libraries compute eA with scipy.linalg.expm, which uses scaling-and-squaring with a Padé approximation. Shrink A by a power of two until the series converges fast, then square the result back up, using eA=(eA/2s)2s. The plain series works fine for modest matrices, and writing it yourself is the best way to believe the definition.
🧪 Coding exerciseExercise: e^A from its power series✓ passed
⌘/Ctrl + Enter
💡 term = I; total = I; then for k = 1, 2, ...: term = term @ A / k and add it to total. Use np.eye(A.shape[0]) for I.
Now verify the Euler limit numerically. The error should shrink by a factor of 10 each time n grows by 10.
🧪 Coding exerciseExercise: (I + A/n)^n → e^A, with error ~ 1/n✓ passed
⌘/Ctrl + Enter
💡 matrix_power(np.eye(len(A)) + A / n, n) is the Euler matrix. For the error use np.linalg.norm(M - expm(A), 2).
Practice problems
✏️ Pen & paperExponentials straight from the series●○○
Compute eDt for D=[−1002] and describe the motion of x(t)=eDt(1,1).
For N=[0010], compute eNt and verify directly that x(t)=eNtx0 solves x1′=x2, x2′=0.
Use part 2 and the fact that 2I commutes with N to compute eAt for A=[2012].
Show worked solution
eDt=[e−t00e2t], so x(t)=(e−t,e2t). The x1 coordinate decays and x2 blows up: a saddle with eigen-directions along the axes. The trajectory satisfies x2=x1−2, a curve that hugs the x2-axis as t→∞.
N2=0, so eNt=I+Nt=[10t1] and x(t)=(x1(0)+tx2(0),x2(0)). Then x2′=0 ✓ and x1′=x2(0)=x2 ✓. It’s uniform motion: constant velocity x2 along x1.
A=2I+N with (2I)N=N(2I), so eAt=e2tIeNt=e2t[10t1]. The te2t entry is the signature of a repeated eigenvalue without a full set of eigenvectors, which you’ll meet again in 7.4 Complex & Repeated Eigenvalues.
✏️ Pen & paperA second-order ODE as a system●●○
The equation y′′+3y′+2y=0 becomes a first-order system for x=(y,y′):
x′=Ax,A=[0−21−3].
Find the eigenvalues and eigenvectors of A.
Compute eAt=PeDtP−1.
Solve for y(t) with y(0)=1, y′(0)=0, and check that it satisfies the ODE.
Show worked solution
det(A−λI)=λ(λ+3)+2=λ2+3λ+2=(λ+1)(λ+2), so λ1=−1, λ2=−2. For λ1=−1: A+I=[1−21−2] gives v1=(1,−1). For λ2=−2: A+2I=[2−21−1] gives v2=(1,−2).
P=[1−11−2], detP=−2+1=−1, and P−1=[2−11−1]. Then
Check: at t=0 this is I ✓, and its derivative at 0 is [−2+22−4−1+21−4]=[0−21−3]=A ✓.
3. x(t)=eAt(1,0) is the first column, so y(t)=2e−t−e−2t (and y′(t)=−2e−t+2e−2t, matching the second entry). Check: y′′=2e−t−4e−2t, so y′′+3y′+2y=(2−6+4)e−t+(−4+6−2)e−2t=0 ✓, with y(0)=1 and y′(0)=0 ✓. Both modes decay, so the origin is a stable node: an overdamped oscillator (5.2 Constant Coefficients & the Characteristic Equation).
✏️ Pen & paperSpirals from rotation plus scaling●●○
Let A=[ab−ba]=aI+bJ.
Explain why eAt=eat[cosbtsinbt−sinbtcosbt].
Find the eigenvalues of A and relate them to the formula in part 1.
For a=−0.2, b=1 (the spiral sink in the sim), by what factor does the distance to the origin shrink during one revolution?
Show worked solution
aI commutes with every matrix, in particular with bJ, so e(aI+bJ)t=eatIebtJ. Here eatI=eatI (a diagonal exponential) and ebtJ is the rotation by angle bt.
det(A−λI)=(a−λ)2+b2=0 gives λ=a±ib. The real part a is the exponential growth or decay rate eat, and the imaginary part b is the angular speed. This is the continuous-time version of “complex eigenvalue = rotation + scaling” from lesson 1.7.
One revolution takes t=2π/b=2π. The radius scales by e−0.2⋅2π=e−0.4π≈0.285, so it shrinks to about 28.5% of its starting value each turn.
✏️ Pen & paperWhen the exponential law fails●●○
Let A=[0010] and B=[0100].
Compute AB−BA.
Compute eA, eB, eAeB and eBeA.
Compute eA+B. (Hint: A+B has eigenvalues ±1.) Compare it with part 2, and check that all three matrices have determinant etr=1.
Show worked solution
AB=[1000] and BA=[0001], so AB−BA=[100−1]=0. They don’t commute.
Both are nilpotent (A2=B2=0), so eA=I+A=[1011] and eB=I+B=[1101]. Then eAeB=[2111] and eBeA=[1112]. Even the order matters.
A+B=[0110] has eigenvalues 1 and −1 with eigenvectors (1,1) and (1,−1). Diagonalizing gives eA+B=[cosh1sinh1sinh1cosh1]≈[1.5431.1751.1751.543], which differs from both products. Determinants: 2−1=1, 2−1=1 and cosh21−sinh21=1. All equal etr(A+B)=e0=1 ✓. The products get the area right but the shape wrong: that’s splitting error.
Where this goes next
This lesson closes Module 1, and every piece of it comes back:
Next up, Module 2.2.1 Functions of Several Variables & Partial Derivatives starts multivariable calculus. Nonlinear flows x′=f(x) look like linear ones up close, with A replaced by the Jacobian matrix of partial derivatives. That’s why linear flows are worth studying so carefully.
Key Takeaways
Discrete dynamics xn+1=Axn is solved by An. Continuous dynamics x′=Ax is solved by the matrix exponential: x(t)=eAtx0.
eAt=I+At+2!(At)2+⋯ converges for every square matrix and satisfies dtdeAt=AeAt, which is exactly why it solves the system.
Diagonalization computes it:eAt=PeDtP−1. In eigen-coordinates each mode evolves as eλt, so the sign of Reλ decides growth or decay, and Imλ gives rotation.
The rotation generator gives eθJ= the rotation matrix: Euler’s formula eiθ=cosθ+isinθ written as a 2×2 matrix.
eAt is a flow that moves the whole plane, and it changes areas by deteAt=ettrA. Trace-free (divergence-free) flows preserve area.
Forward Euler is (I+hA)n→eAt, the compound-interest limit, with O(h) error. Every explicit stepper multiplies by a polynomial R(hA)≈ehA, and RK4’s R is exactly the 4th-order Taylor polynomial of ehA.
Stability means ∣R(hλ)∣≤1 for every eigenvalue whose true mode doesn’t grow. On a center, Euler’s ∣1+ih∣>1 always spirals outward.
eA+B=eAeB unless AB=BA. Operator splitting (advect, diffuse, project) pays an error proportional to the commutator.
Finished this lesson?
Mark it complete to track your progress (saved in this browser). Reading every section does this for you.