Linear Algebra

The Matrix Exponential

The matrix exponential takes a square matrix A and returns another square matrix, e^A, defined by the same power series that defines the ordinary exponential. It is not the entrywise exponential, and it is not a formal curiosity: e^{At} is the solution operator of the linear system ẋ = Ax. Everything interesting about linear dynamics — decay, oscillation, rotation, resonance — is already encoded in it.

  • Definitione^A = ∑_{k≥0} A^k / k!
  • Converges forevery square matrix A
  • Defining propertyd/dt e^{At} = A e^{At}
  • Determinantdet(e^A) = e^{tr(A)}
  • Inverse(e^A)⁻¹ = e^{−A}, so e^A ∈ GL(n)
  • Splitting lawe^A e^B = e^{A+B} needs AB = BA

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

The definition, and why it never fails

For a square matrix A, define

e^A = ∑_{k≥0} A^k / k! = I + A + A²/2! + A³/3! + …

This is the scalar Taylor series with A substituted for the variable. The powers are genuine matrix products, and the leading term is the identity, not the number 1. So e^A is a matrix of the same size as A.

The first question is whether that infinite sum means anything. It always does. Fix any submultiplicative matrix norm — one with ‖XY‖ ≤ ‖X‖‖Y‖, which the operator norm and the Frobenius norm both satisfy. Then ‖A^k/k!‖ ≤ ‖A‖^k/k!, and the right-hand side is the general term of the convergent scalar series for e^{‖A‖}. By comparison, the matrix series converges absolutely, and absolute convergence in the finite-dimensional space of n×n matrices implies convergence.

That is worth stating plainly: e^A exists for every square matrix, with no hypotheses whatsoever. No invertibility, no symmetry, no diagonalisability, no restriction on the spectrum. This unconditional existence is rare in linear algebra and it is the reason the matrix exponential can be used as a definition rather than as a construction.

One trap is immediate. e^A is not the matrix whose entries are the exponentials of the entries of A. For A = [[0, 1],[0, 0]] the series stops after two terms and gives [[1, 1],[0, 1]], whereas exponentiating entrywise would give [[1, e],[1, 1]]. Only for a diagonal matrix do the two agree.

Why anyone cares: it solves linear systems

Consider the first-order linear system with constant coefficients

ẋ = Ax, x(0) = x₀

where x(t) is a vector in ℝⁿ. Differentiate the series for e^{At} term by term — legitimate, because it converges uniformly on compact time intervals — and you get

d/dt e^{At} = A + A²t + A³t²/2! + … = A e^{At} = e^{At} A.

So x(t) = e^{At} x₀ satisfies the equation, and it has the right value at t = 0 because e^{A·0} = I. Uniqueness for linear ODEs then says this is the only solution. The matrix exponential is therefore not a solution method; it is the solution operator, the object that maps an initial condition to the state at time t.

Three structural facts follow almost for free.

  • e^{A(s+t)} = e^{As} e^{At} for all real s and t, because As and At commute. The family {e^{At}} is a one-parameter group: evolving for time s and then t is evolving for time s + t.
  • Taking s = −t gives (e^{At})⁻¹ = e^{−At}. The exponential of any matrix is invertible, so e^A always lies in the general linear group GL(n). Linear flows are reversible.
  • det(e^A) = e^{tr(A)}. The trace controls how volume in state space expands or contracts, which is why trace-free matrices generate volume-preserving flows.

Computing it by diagonalisation: a 2×2 worked end to end

If A = PΛP⁻¹ with Λ diagonal, then A^k = PΛ^kP⁻¹, and the P and P⁻¹ factor out of every term of the series:

e^{At} = P e^{Λt} P⁻¹, where e^{Λt} = diag(e^{λ₁t}, …, e^{λₙt}).

The hard part collapses to exponentiating scalars. Take

A = [[0, 1],[−2, −3]],

the companion matrix of the damped oscillator ẍ + 3ẋ + 2x = 0. Its characteristic polynomial is λ² + 3λ + 2, so the eigenvalues are λ = −1 and λ = −2. Solving (A − λI)v = 0 gives eigenvectors (1, −1) and (1, −2), so

P = [[1, 1],[−1, −2]], P⁻¹ = [[2, 1],[−1, −1]].

Multiplying out P · diag(e^{−t}, e^{−2t}) · P⁻¹:

e^{At} = [[2e^{−t} − e^{−2t}, e^{−t} − e^{−2t}], [−2e^{−t} + 2e^{−2t}, −e^{−t} + 2e^{−2t}]].

Two checks confirm it. At t = 0 every entry collapses and the matrix is the identity. Differentiating at t = 0 entry by entry returns exactly [[0, 1],[−2, −3]], which is A. And its determinant is e^{−3t}, matching e^{tr(A)t} with tr(A) = −3.

If the eigenvalues come as a complex pair α ± iβ, nothing changes except that the diagonalisation lives in ℂ. Combining the conjugate terms rebuilds real solutions of the form e^{αt}cos(βt) and e^{αt}sin(βt): decay rate from the real part, frequency from the imaginary part.

The defective case: Jordan blocks and where t·e^{λt} comes from

Not every matrix is diagonalisable. When an eigenvalue is repeated but does not supply enough independent eigenvectors, the matrix is defective, and the diagonalisation route is unavailable. The Jordan canonical form handles it, and the payoff is the best single insight the matrix exponential offers.

Write a Jordan block as J = λI + N, where N has ones on the superdiagonal and zeros elsewhere. Because λI commutes with N, the exponentials multiply:

e^{Jt} = e^{λt} e^{Nt}.

And N is nilpotent: for an m×m block, N^m = 0. So the series for e^{Nt} terminates:

e^{Jt} = e^{λt} (I + Nt + N²t²/2! + … + N^{m−1}t^{m−1}/(m−1)!).

A finite sum — no approximation, no truncation. Concretely, for the critically damped system with A = [[−1, 1],[0, −1]], we have N² = 0 and

e^{At} = e^{−t} [[1, t],[0, 1]].

There is the famous t·e^{−t}. Those polynomial prefactors — the resonant or secular terms that appear in critically damped oscillators and in forced systems driven at their own natural frequency — are not a quirk of an integration trick. They are the nilpotent part of the Jordan block, made visible. A block of size m produces powers of t up to t^{m−1}.

Reading the spectrum: stability, rotation, and Lie groups

Because every entry of e^{At} is a combination of terms t^j e^{λt}, the long-run behaviour of ẋ = Ax is decided by the eigenvalues of A, and polynomial factors never beat an exponential. This gives a clean criterion: every solution of ẋ = Ax tends to 0, for every initial condition, if and only if every eigenvalue of A has strictly negative real part.

The boundary cases matter.

  • Eigenvalues strictly in the left half-plane: exponential decay, the matrix is Hurwitz, the origin is asymptotically stable.
  • A purely imaginary pair ±iβ with a full set of eigenvectors: undamped oscillation at frequency β, bounded but not decaying.
  • A repeated eigenvalue on the imaginary axis sitting in a nontrivial Jordan block: the t^j factor is no longer suppressed by decay, so solutions grow polynomially. This is the case that a glance at the eigenvalues alone will miss.
  • Any eigenvalue with positive real part: exponential blow-up along that direction.

Now the geometric side. Take the skew-symmetric matrix A = [[0, −θ],[θ, 0]]. Its powers cycle with period four, and regrouping the series into even and odd parts reproduces the Taylor series of cosine and sine:

e^A = [[cos θ, −sin θ],[sin θ, cos θ]].

The exponential of a skew-symmetric matrix is a rotation. That is the bridge to Lie theory: the skew-symmetric matrices form the Lie algebra so(n), the rotation matrices form the Lie group SO(n), and the matrix exponential maps the algebra onto the group. Infinitesimal generator in, finite transformation out. The same mechanism makes e^{At} the natural tool in rigid-body kinematics, quantum time evolution and control theory.

Common mistakes

Assuming e^A e^B = e^{A+B}. This is the mistake, and it is entirely natural, because the identity is the defining property of the scalar exponential. For matrices it holds only when AB = BA. The proof of the scalar case rearranges a double sum into a binomial coefficient, and that rearrangement needs commutativity.

A two-line counterexample settles it. Let A = [[0, 1],[0, 0]] and B = [[0, 0],[1, 0]]. Then e^A = [[1, 1],[0, 1]] and e^B = [[1, 0],[1, 1]], so e^A e^B = [[2, 1],[1, 1]]. But A + B = [[0, 1],[1, 0]] has eigenvalues ±1, giving e^{A+B} = [[cosh 1, sinh 1],[sinh 1, cosh 1]], whose entries are about 1.5431 and 1.1752. The two matrices are not equal, and the commutator [A, B] = AB − BA = [[1, 0],[0, −1]] is exactly what obstructs it. The systematic correction is the Baker–Campbell–Hausdorff formula, which begins

e^A e^B = exp(A + B + ½[A, B] + …)

with higher terms built from nested commutators.

Other recurring errors:

  • Exponentiating entrywise. Discussed above; the series is in matrix powers.
  • Expecting e^A to be singular for some A. It never is. (e^A)⁻¹ = e^{−A}, always. A matrix with a zero eigenvalue still has an invertible exponential, since λ = 0 contributes e^0 = 1.
  • Treating a defective matrix as diagonalisable. If you force a diagonalisation numerically you will get a nearly singular P and a meaningless answer, and you will lose the t^j terms that carry the behaviour.

Computing it numerically is genuinely hard

Having a closed-form series does not make the matrix exponential easy to evaluate, and the literature on this is unusually frank. Cleve Moler and Charles Van Loan surveyed the problem in Nineteen Dubious Ways to Compute the Exponential of a Matrix, SIAM Review 20(4), October 1978, pp. 801–836, and revisited it in …Twenty-Five Years Later, SIAM Review 45(1), 2003, pp. 3–49. Their conclusion was not that one method wins: it is that none of the methods is completely satisfactory when judged on both stability and efficiency. Each of the nineteen has a regime where it misbehaves.

Summing the Taylor series directly is the obvious approach and the one to avoid when ‖A‖ is large. The terms grow before they decay, so the partial sums become large and the final result emerges from the near-cancellation of big numbers — catastrophic cancellation, which destroys relative accuracy. Eigenvalue methods inherit the conditioning of the eigenvector matrix and degrade as the matrix approaches defectiveness. Jordan form is exact on paper and numerically unusable, because the block structure is discontinuous in the entries.

The practical modern answer is scaling and squaring with a Padé approximant. Choose an integer s so that A/2^s has small norm; approximate e^{A/2^s} by a Padé rational approximant, which is accurate and cheap in that small-norm regime; then recover the answer by squaring s times, since e^A = (e^{A/2^s})^{2^s}. Each squaring doubles the exponent, so a handful of matrix multiplications covers a large norm. This is what expm implements in standard numerical libraries.

How the structure of A determines the shape of e^{At} — and what it costs to compute.
Structure of ARoute to e^{At}Shape of the entriesCaveat
Diagonalisable, real distinct eigenvaluesA = PΛP⁻¹, e^{At} = P e^{Λt} P⁻¹Combinations of e^{λ₁t}, …, e^{λₙt}P may be badly conditioned even when A is harmless
Complex conjugate pair α ± iβDiagonalise over ℂ, then take real and imaginary partse^{αt}cos(βt) and e^{αt}sin(βt)Work in ℂ or use the real 2×2 block form
Defective (repeated eigenvalue, too few eigenvectors)Jordan form, J = λI + N with N nilpotente^{λt}, t·e^{λt}, t²e^{λt}/2, … up to the block sizeJordan form is not numerically computable; use it for theory
Nilpotent (N^m = 0)Sum the series directly — it terminatesPolynomials in t, no exponential at allNone; this is the one exactly finite case
General dense matrix, no structure assumedScaling and squaring with a Padé approximantNo closed form; a numerical arrayNaive Taylor truncation loses accuracy when ‖A‖ is large

Frequently asked questions

Does e^A exist for every square matrix?

Yes, unconditionally. In any submultiplicative norm, ‖A^k/k!‖ ≤ ‖A‖^k/k!, and the scalar series for e^{‖A‖} converges, so the matrix series converges absolutely by comparison. No assumption about invertibility, symmetry, diagonalisability or the spectrum is needed.

Can e^A ever be singular?

No. Since A and −A commute, e^A e^{−A} = e^0 = I, so (e^A)⁻¹ = e^{−A} and e^A always lies in GL(n). More quantitatively, det(e^A) = e^{tr(A)}, which is a positive real number and therefore never zero.

Why isn't e^A just the exponential of each entry?

Because the series is built from matrix powers A², A³, …, which mix entries together, not from entries raised to powers. For A = [[0, 1],[0, 0]] the series terminates at e^A = [[1, 1],[0, 1]], while the entrywise exponential gives [[1, e],[1, 1]]. The two agree only when A is diagonal.

When does e^A e^B = e^{A+B} actually hold?

When A and B commute, that is AB = BA. For non-commuting matrices it is false in general: with A = [[0, 1],[0, 0]] and B = [[0, 0],[1, 0]], e^A e^B = [[2, 1],[1, 1]] but e^{A+B} = [[cosh 1, sinh 1],[sinh 1, cosh 1]]. The Baker–Campbell–Hausdorff formula supplies the correction, starting with ½[A, B].

Where do the t·e^{λt} terms in ODE solutions come from?

From Jordan blocks. A block J = λI + N splits as e^{Jt} = e^{λt}(I + Nt + N²t²/2! + …), and because N is nilpotent that sum is finite. A block of size m therefore produces powers of t up to t^{m−1}. The repeated-root rule taught in elementary ODE courses is this fact in disguise.

How is the matrix exponential computed in practice?

By scaling and squaring with a Padé approximant: divide A by a power of two until its norm is small, apply a Padé rational approximation there, then square the result back up. Direct Taylor truncation is poorly behaved for large ‖A‖ because of catastrophic cancellation, and Moler and Van Loan's surveys emphasise that no single method is satisfactory on both stability and efficiency.