A7 · Lesson 39 · The matrix exponential
One formula for every linear system: e^{At}
The scalar equation has the solution . The system has the same solution, , once you know what the exponential of a matrix means. Lesson 37 computed it from eigenvectors. Here it gets its own definition, a power series that works for every square matrix, defective ones included, and its properties: what it does to rotations and spirals, why usually isn't , and how simulators use it to step linear circuits exactly.
- The curve is where carries the starting state , for . The dot is the state at time .
- With the state goes round a circle: is a rotation by .
- Make negative and the circle becomes a spiral inward, like a ringing LC tank with some resistance. The readouts give the distance from the origin, , and the angle turned, .
Predict
For , what is ?
. This generates rotation: rotates by radians, so turns every vector halfway round, which is . It's the matrix version of . The exponential of a matrix is never the exponential of its entries, except for diagonal matrices.
Name it
The definition
The series converges for every square matrix and every , because eventually beats any power. Differentiating term by term gives , so solves with .
Properties
- and : it's never singular.
- only when .
- If , then , and is diagonal with entries .
- If (a nilpotent matrix), the series stops: .
Spirals
For , the parts commute, and (the 90° rotation) behaves like :
Any real 2 × 2 matrix with eigenvalues is similar to this one, which is why a ringing circuit's state traces a spiral.
Stepping exactly
For a linear circuit with a constant input over a time step , gives exactly
with no truncation error, however large is. For an RC circuit, and , this is . Ohmwork's own circuit simulator steps linear circuits this way.
Worked example
Find for , the matrix of , .
Show the solution
- Sum the series. , so the series stops after two terms:
- Apply it. Applied to a starting position and velocity , it gives and : motion at constant velocity.
- Why eigenvectors won't do. An eigenvector method would fail here, since has the eigenvalue 0 twice with only one eigenvector.
Answer , motion at constant velocity.
Worked example
An LC tank's normalized state obeys with = 1000 rad/s. Find at = 1 ms.
Show the solution
- The angle. = 1 rad, and is the rotation by that angle:
- Apply it to . Starting with all the energy in the capacitor, the state after 1 ms is .
- Energy check. so the energy is the same, now shared with the inductor.
Answer , a rotation by 1 rad.
Worked example
Take and . Compare with .
Show the solution
- The two exponentials. Both matrices are nilpotent, so
- Their product.
- The exponential of the sum. has eigenvalues with eigenvectors , giving
- Why they differ. : has a 1 in the top-left corner and in the bottom-right.
Answer and ; they differ because and don't commute.
Check
For , what is the top-left entry of at = 0.2?
Check
What is the bottom-right entry of for at = 2?
Check
An RC circuit with = 1 ms is stepped exactly with = 0.5 ms. What factor multiplies ?
Check
For the nilpotent , what is the top-right entry of at = 3?
Check
A spiral system has and starts at .
(a)
What is at = 3?
(b)
How far is the state from the origin?
Check
Use for .
Step 1
What is the top-left entry?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
has in its top-right entry. What is the top-right entry of ?
Explain why
A simulator steps a linear circuit with instead of Euler's method. Why can it take large steps without losing accuracy or stability?
Euler's method replaces with the first two terms of its series, . That's accurate only when is small, and when a fast mode makes , the factor has magnitude above 1 and the simulation blows up even though the circuit decays. Using itself gives the exact solution at each step for a constant input, so the only limit on is how finely you want to see the waveform. Every mode is multiplied by its true factor , which is below 1 in magnitude for every decaying mode, however large gets, so stability is never lost. The cost is computing once per step size.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.