Analysis

The exponential of a square

The series for e makes perfect sense with a matrix in it. What comes out solves a system of equations the way the ordinary exponential solves one, and a skew matrix exponentiates into a rotation with no trigonometry anywhere.

Worth reading first: The equation with only one answer · The same map in a better basis.

The equation y=kyy' = ky has exactly one solution through each starting point, and it is y0ekxy_0e^{kx}. That is a statement about one quantity growing at a rate proportional to itself.

Almost nothing in the world is one quantity. Two chemicals feeding into each other, two populations preying on one another, a current and a voltage in a circuit, a position and a velocity — each of these is a pair whose rates depend on both members, and the natural way to write that is

y=Ay,\mathbf{y}' = A\mathbf{y},

with y\mathbf{y} a pair and AA a matrix. The question this rung answers is whether the solution is still an exponential, and the answer is that it is, of exactly the same shape, once the notation is taken seriously.

The flow of a linear equation, and the matrix that runs it for one unit of time. Paths of points moving so that their velocity is [0.25, −1.2, 1.2, 0.25] applied to their position, with the position after time 1 marked on each; the matrix taking start to finish is e^A.
Fig. 1 Eight starting points and the paths they take under y=Ay\mathbf{y}' = A\mathbf{y}, each integrated in four thousand small steps from the equation alone. The filled dot on each path is where the point has arrived after one unit of time. The matrix taking every start to its own finish is eAe^A, and the figure computes it three ways that share nothing.

Taking the series seriously

The exponential has a series,

ex=1+x+x22!+x33!+,e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots,

and every operation in it — adding, multiplying by itself, dividing by a whole number — is something a square matrix can do. So define

eA=I+A+A22!+A33!+,e^A = I + A + \frac{A^2}{2!} + \frac{A^3}{3!} + \cdots,

with II in the place of 1. Nothing has been assumed; a definition has been written down, and the only question is whether it converges. It does, and comfortably: the entries of AnA^n grow at most like (nA)n(n\|A\|)^n while the denominator is n!n!, which wins.

The figure sums sixty terms and asserts that the sixtieth is smaller than 101410^{-14} in every entry, which for the matrices drawn here it is by a wide margin.

Three routes to the same matrix

A definition by a series is worth having and hard to trust. The figure therefore computes eAe^A by three routes that share no arithmetic and requires all three to agree to seven decimal places.

By the series, as above.

By the eigenvalues. If A=PDP1A = PDP^{-1} then An=PDnP1A^n = PD^nP^{-1}, so every term of the series has a PP on the left and a P1P^{-1} on the right and they can be factored out:

eA=PeDP1,e^A = P e^D P^{-1},

where eDe^D is the diagonal matrix of eλ1e^{\lambda_1} and eλ2e^{\lambda_2}. Exponentiating a matrix means exponentiating its eigenvalues, which is diagonalisation doing what it always does — turning a hard operation on a matrix into an easy operation on two numbers.

By following the flow. Integrate the differential equation numerically from (1,0)(1, 0) and from (0,1)(0, 1), and see where each arrives after one unit of time. Those two arrival points are the columns of eAe^A, because a linear map is determined by what it does to the two basis arrows.

That third route is the one that makes the picture evidence rather than decoration. The curves drawn on the page are that integration, so the paths and the matrix in the caption are one computation, and the agreement with the series is a claim that could have failed.

The flow of a linear equation, and the matrix that runs it for one unit of time. Paths of points moving so that their velocity is [0.6, 0.35, 0.35, −0.4] applied to their position, with the position after time 1 marked on each; the matrix taking start to finish is e^A.
Fig. 2 A matrix with real eigenvalues of opposite sign. The two dashed lines are its invariant directions; along one, points run outwards, along the other they run in, and everything else sweeps between them. The three computations of eAe^A agree here too, and the eigen-route is available because there are two eigenvalues to exponentiate.
The flow of a linear equation, and the matrix that runs it for one unit of time. Paths of points moving so that their velocity is [−0.5, −1.1, 1.1, −0.5] applied to their position, with the position after time 2 marked on each; the matrix taking start to finish is e^A.
Fig. 3 The same construction run for two units of time rather than one, on a matrix whose eigenvalues have negative real part. Every path spirals inwards, and the matrix carrying starts to finishes is e2Ae^{2A} — which the figure computes by the series with 2A2A in it and by integrating twice as far, and requires to agree.

Doubling the time is not a new idea and it is worth drawing, because it makes the object visible as a family: there is one matrix for each tt, they compose, and the differential equation is the statement of how the family changes with tt. That family is what the next section is about.

Why it solves the equation

The claim is that y(t)=eAty0\mathbf{y}(t) = e^{At}\mathbf{y}_0 solves y=Ay\mathbf{y}' = A\mathbf{y} with y(0)=y0\mathbf{y}(0) = \mathbf{y}_0, and the proof is the series differentiated term by term:

ddt(I+At+A2t22+)=A+A2t+A3t22+=A(I+At+),\frac{d}{dt}\left(I + At + \frac{A^2t^2}{2} + \cdots\right) = A + A^2 t + \frac{A^3t^2}{2} + \cdots = A\left(I + At + \cdots\right),

which is AA times the original. Setting t=0t = 0 gives II, so the initial condition holds. And the uniqueness argument from the previous rung transfers unchanged: if y=Ay\mathbf{y}' = A\mathbf{y} then (eAty)=0(e^{-At}\mathbf{y})' = 0, so eAtye^{-At}\mathbf{y} is constant.

Every linear system with constant coefficients is therefore solved, completely, by one formula — and the work of understanding a particular system reduces to understanding one matrix.

The series for e, 9 terms. Each term of 1 + 1/1! + 1/2! + … added in turn. The factorials in the denominators make the tail vanish very fast.
Fig. 4 The series being borrowed, in its ordinary form: the partial sums of 1+1+1/2+1/6+1 + 1 + 1/2 + 1/6 + \cdots closing on ee. Nothing about the terms of this sum mentions a number rather than a matrix, which is the entire reason the definition above is available.

That is worth pausing on as a matter of method. The series was derived for real numbers and is being applied to objects that are not numbers, and the licence for doing so is not analogy — it is that every operation appearing in it is defined for the new objects, and the convergence argument survives with sizes in place of absolute values. Wherever those two conditions hold, the exponential comes along: for complex numbers, for matrices, for bounded operators on a space of functions, for quaternions. The definition travels because it asks for so little.

The one law that fails

This is where the analogy has to be watched, and the failure is not a technicality.

For numbers, ea+b=eaebe^{a+b} = e^ae^b. For matrices this is false in general, and it is false for the reason everything about matrices is: AA and BB need not commute. Multiplying out the two series and comparing term by term, the quadratic terms are (A+B)2/2(A+B)^2/2 on one side and (A2+2AB+B2)/2(A^2 + 2AB + B^2)/2 on the other, and those differ by (ABBA)/2(AB - BA)/2.

So eA+B=eAeBe^{A+B} = e^Ae^B exactly when AA and BB commute, and the discrepancy is measured by the commutator ABBAAB - BA — a quantity that is zero for numbers and is the whole subject of Lie theory for matrices. What replaces the addition law is the Baker–Campbell–Hausdorff formula, an infinite series of nested commutators, and its existence is the reason the exponential is the bridge between a group of transformations and the flat space of matrices near its identity.

The failure is not a blemish to be worked around; it is where the subject is. Two flows that do not commute — a rotation about one axis and a rotation about another — compose into something that depends on the order, and the commutator measures by how much. Doing AA then BB then undoing AA then undoing BB leaves a residue proportional to ABBAAB - BA, which is why a car can be parked sideways by a sequence of forward and turning motions none of which moves it sideways. The matrix exponential is the setting in which that observation becomes an equation.

The single fact that does survive is eAeA=Ie^{A}e^{-A} = I, because AA commutes with itself. So eAe^A is always invertible, whatever AA is — including matrices with zero determinant, whose exponentials are perfectly well behaved.

A rotation from no trigonometry

Here is the case that makes the whole construction feel inevitable.

Take the matrix JJ that sends (x,y)(x, y) to (y,x)(-y, x) — a quarter turn — and note J2=IJ^2 = -I. Then J3=JJ^3 = -J, J4=IJ^4 = I, and the powers cycle with period four exactly as the powers of ii do. Feeding θJ\theta J into the series and separating the terms with II from the terms with JJ:

eθJ=(1θ22!+θ44!)I+(θθ33!+)J,e^{\theta J} = \left(1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \cdots\right)I + \left(\theta - \frac{\theta^3}{3!} + \cdots\right)J,

and the two brackets are the series for cosine and sine. So

eθJ=(cosθsinθsinθcosθ),e^{\theta J} = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix},

which is a rotation by θ\theta. Nothing trigonometric was assumed; the two series fell out of sorting the powers of JJ into even and odd.

A flow that is pure rotation, and the matrix that turns it. Paths of points moving so that their velocity is [0, −1.2, 1.2, 0] applied to their position, with the position after time 1 marked on each; the matrix taking start to finish is e^A.
Fig. 5 The flow of a skew matrix. Every path is a circle, every point returns to where it started after a full turn, and the matrix carrying a point round for one unit of time is a rotation — checked entry by entry against cosine and sine, and checked to preserve area exactly.

This is Euler’s identity with a matrix where the imaginary unit was, and the correspondence is exact: the matrices aI+bJaI + bJ multiply exactly as the complex numbers a+bia + bi do. The complex plane is a subring of the two-by-two matrices, and the exponential agrees on both sides of that identification. So eiπ=1e^{i\pi} = -1 and eπJ=Ie^{\pi J} = -I are the same statement, one of them written with an ii and the other with a half turn drawn on a page.

Reading the behaviour off two numbers

Because the eigenvalues decide everything, the qualitative behaviour of a two-dimensional linear system is decided by the trace and the determinant — the same two numbers that make up the characteristic polynomial — and the classification is short enough to hold in the head.

If the determinant is negative the eigenvalues are real with opposite signs, and the origin is a saddle: points run out along one invariant line and in along the other, as in the second figure above. If the determinant is positive, the sign of the trace decides whether everything runs out or in, and the discriminant decides whether it does so along straight lines or by spiralling. A zero trace with positive determinant gives closed orbits and nothing else happens at all.

That is the whole of it: four behaviours, decided by two numbers and one inequality between them. The reason a subject as large as linear systems has so short a classification is that the diagonal form leaves nothing to happen beyond two independent one-dimensional stories, and the only extra possibilities come from the eigenvalues being complex or the eigenvectors being missing.

It also means the boundaries of the classification matter more than the interior. A system whose trace is exactly zero has closed orbits; nudge the trace and every orbit becomes a spiral, inwards or outwards according to the sign. A closed orbit is therefore not a robust feature of a linear system, which is why closed orbits in nature are almost always evidence of something nonlinear holding them in place.

What the trace and determinant do

Two properties survive the exponential in a clean form.

det(eA)=etrA.\det(e^A) = e^{\operatorname{tr} A}.

For a diagonalisable matrix this is immediate: the determinant of eAe^A is the product of eλie^{\lambda_i}, which is eλie^{\sum \lambda_i}, and the sum of the eigenvalues is the trace. The figure checks it for every matrix it draws, including the ones with complex eigenvalues where the eigen-route is not available.

The identity has a direct reading in the picture. The determinant of eAte^{At} is the factor by which the flow multiplies areas after time tt, so a system whose matrix has zero trace preserves area exactly — every blob of starting points is carried to a blob of the same size, however distorted. That is why the skew matrix above, whose trace is zero, has circles for orbits and why an area-preserving flow is the normal state of affairs in mechanics rather than a coincidence.

The flow of a linear equation, and the matrix that runs it for one unit of time. Paths of points moving so that their velocity is [0, 1, 0, 0] applied to their position, with the position after time 1 marked on each; the matrix taking start to finish is e^A.
Fig. 6 A defective matrix: its square is zero, so the series stops after two terms and eAe^{A} is exactly I+AI + A. The flow is a shear, every path is a straight line, and the eigen-route to eAe^A is unavailable because there is only one eigen-direction — the series and the flow still agree.

The defective case is worth seeing because the series does not care. Diagonalisation fails and the definition does not depend on it; eAe^A exists for every square matrix, and for a nilpotent one it is a finite sum. Where a defective matrix does show is in the behaviour: a repeated eigenvalue with a missing eigenvector produces solutions with a factor of tt in front of the exponential, which is growth no diagonal system can produce.

Where this is used, and why it is not optional

Three settings, chosen because in each the matrix exponential is the definition rather than a technique.

Mechanics. A system near equilibrium is described by a linear system, and its behaviour over time is eAte^{At} applied to the initial state. Whether a bridge oscillates, damps or diverges is the sign of a real part; whether the oscillation is at one frequency or several is how many complex pairs there are.

Markov chains in continuous time. A process that jumps between states at constant rates has a matrix of rates whose exponential is the matrix of probabilities after time tt. The stationary distribution is again the eigenvector belonging to eigenvalue zero of the rate matrix, which becomes eigenvalue one after exponentiating — the same object as in the discrete case, reached by a different door.

Rotations in three dimensions. Every rotation is eθKe^{\theta K} for a skew matrix KK built from its axis, which is Rodrigues’ formula and is the reason rotations are stored and interpolated as axis-and-angle rather than as nine numbers. The skew matrices are the tangent space to the rotations at the identity, and the exponential is the map from the flat thing to the curved one — the two-dimensional case above, one dimension up.

The common thread is worth stating. In each case there is a set of transformations that forms a group under composition and is curved, and a set of “generators” that is flat and easy to compute with, and the exponential is the bridge. Everything hard about the group is pushed into the failure of eA+B=eAeBe^{A+B} = e^Ae^B, which is where the curvature went.

What the picture cannot show

The flow is drawn for one unit of time, and eAte^{At} for other tt is a different matrix. A picture of one moment cannot show that the family eAte^{At} is a group — that running for time ss and then for time tt is the same as running for s+ts + t — although that is the property doing most of the work whenever this object is used. Drawing it would require several panels showing the same thing.

Nor does the two-dimensional picture suggest what happens with a large matrix, where the interesting question is which of many eigenvalues dominates and how long the transient behaviour lasts before it does. The rate at which a solution settles is governed by the eigenvalue with the largest real part, and the size of the excursion before it settles is governed by something else entirely — the same gap between eventual behaviour and immediate behaviour that separates eigenvalues from singular values.

And there is a practical warning the drawing gives no hint of. Computing eAe^A by summing the series is a poor idea for a real matrix: for a matrix with large entries the terms grow enormously before the factorials take over, and the answer is a small number obtained by cancelling large ones. There is a well-known paper called Nineteen Dubious Ways to Compute the Exponential of a Matrix, and summing the definition is one of them.

The ladder from here

Rungs above: the logarithm of a matrix, and when it exists. The one-parameter groups that every matrix generates, and Lie’s correspondence between them and their generators. The Baker–Campbell–Hausdorff series in full. Second-order equations turned into first-order systems by carrying the derivative as an extra coordinate. Stability, read off the real parts of the eigenvalues. And the exponential of an operator on functions, where the same series generates the heat flow and the translation of a graph along its own axis.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

DeterminantDifferential equatione, the numberEigenvalueEigenvectorMatrixMatrix exponentialPower seriesRotationTrace