TL;DR
The exponential of a number, , can be written as a power series: . The matrix exponential uses the same series with a square matrix in place of . The result is another square matrix of the same size.
Its main job is to solve linear systems of differential equations. If a vector changes according to , then .
Where you'll see it: in continuous-time Markov chains and population models, in linear control systems, and in quantum mechanics, where the time evolution of a state is .
Intuition
Growth that is a matrix
Start with a scalar. The equation says the quantity grows at a rate proportional to itself, and its solution is . The number is a multiplier: after time , the value is scaled by that factor.
Now suppose you have several quantities that feed into each other. Each one changes at a rate that depends on the others. Write them as a vector , and the rule becomes with a matrix that records who feeds whom. The scalar multiplier has to become a matrix multiplier, and that matrix is . The matrix exponential is exactly the object that does for systems what does for a single quantity.
Why a power series? Because it is the one definition that needs nothing but multiplication and addition. Matrices cannot be plugged into directly, but they can be multiplied and added, so the series makes sense. Summing the series gives a matrix that behaves like in the ways that matter.
- x₂(t) = e^(-2t)
- x₁(t) = e^(-t) - e^(-2t)
The math
For a square matrix of size , the matrix exponential is
where is the identity matrix and is the factorial of . The series converges for every square matrix , and is an matrix.
Each term is a matrix. The sum is taken entry by entry: for each position in the grid, you add up the corresponding entries of all the terms. The terms shrink fast, because grows much faster than for any fixed size of , so a handful of terms is often enough for a small matrix.
Basic properties
These follow directly from the series, and you will use them constantly.
- , the identity matrix. The zero matrix in the exponent gives the identity back.
- . So is always invertible, even when is not.
- If (the two matrices commute), then .
- For scalars and , , because and commute. This is the time-stepping rule: evolving for time and then for time is the same as evolving for .
Property 3 needs commuting matrices. Without it, the identity fails, and Worked example 2 shows a concrete failure.
The time derivative
Differentiate the series term by term, with inside: . Since commutes with (both are built from powers of ), the same result holds in either order. This is the key fact:
So the function satisfies and . Because the solution of such a linear system is unique, this is the solution.
Diagonal and diagonalizable matrices
Computing the series term by term is slow. If can be diagonalised, the work becomes much smaller. Suppose , where is diagonal with the eigenvalues on its diagonal and holds the eigenvectors as columns. Then , because the middle factors cancel. Substituting into the series:
Exponentiating a diagonal matrix only exponentiates each entry. The hard part is then just finding , which is the eigenvector problem.
Nilpotent matrices
A matrix is nilpotent if for some . Then the series stops after finitely many terms, and is a polynomial in . The simplest case is , where exactly.
Worked examples
Let . Find .
- Powers of a diagonal matrix are diagonal with entries raised to that power: .
- Plug into the series, entry by entry. The top-left entry is . The bottom-right entry is .
- So .
Interpretation: each direction of the system gets its own growth factor, along the first axis and along the second. Nothing mixes between directions, because the matrix is diagonal.
Let and . These do not commute, since but .
- Both and are nilpotent, with . So and .
- The product is .
- Now compute . Its eigenvalues are , and the series gives .
- Compare: . The difference is exactly the failure of commutativity.
Interpretation: you cannot split a matrix exponential into a product of pieces unless the pieces commute. Most of the difficulty in quantum simulation comes from this gap.
Two tanks exchange fluid. Let and be the amounts in each, and let the rates be given by
Start with and . Find the state at .
- The matrix is upper triangular, so the second equation stands alone: , giving .
- Substitute into the first: . Try a particular solution . Substituting gives , so . The general solution is .
- The starting condition gives , so and .
- At : and .
- Check against the matrix form: the state at is , which is the second column of . That column is , matching step 4.
Interpretation: fluid moves from tank 2 into tank 1, and both tanks drain over time. The matrix exponential packages all of this into one object, so the same answers the question for every starting state.
Tradeoffs and failure modes
The matrix exponential is the right tool for linear constant-coefficient systems. It is slow or fragile in several situations, and each one has a standard fix.
| Situation | Problem | Better choice |
|---|---|---|
| Large | The raw series needs many terms and loses precision through cancellation | Scaling and squaring: compute with a small , then square times |
| Defective matrix (not diagonalizable) | The formula does not exist | Jordan form, or a Padé approximation |
| Numerical stability for a general matrix | Eigen-based formulas can be ill-conditioned | Padé approximation with scaling and squaring, the approach used by most numerical libraries |
| Time-varying | is wrong unless the matrices commute at different times | Time-ordered exponentials, or a numerical ODE solver |
| Very large sparse systems | Forming the full matrix is too expensive | Krylov subspace methods that apply to one vector at a time |
A common mistake is to write as "exponentiate each entry". That gives a different matrix, and it is wrong. The rule is always the series, or one of the formulas that follows from it.
Another mistake is to use without checking that and commute. Worked example 2 is the test case to remember.
History
Matrices as a named mathematical object were developed in the 1850s. Arthur Cayley published a memoir on the theory of matrices in 1858, which set out the algebra of matrix multiplication and inverses.
The exponential function itself is much older, and Euler's work in the 18th century made the power series for standard. Once matrices had their own multiplication, it was natural to put a matrix into that series. The step is simple to write down, so the hard part was never the definition. It was computing the result reliably.
By the middle of the 20th century, matrix exponentials were standard in differential equations, control theory and quantum mechanics. A well-known 1978 survey by Cleve Moler and Charles Van Loan, "Nineteen Dubious Ways to Compute the Exponential of a Matrix," listed many methods and showed that most of the obvious ones fail in practice. Their point is still the right one: the definition is easy, and good algorithms are not.
Check yourself
QuestionWhat is when is the zero matrix? Explain why in terms of the series.Show answer
It is the identity matrix . In the series , every term with is the zero matrix, and the term is by convention. So only remains.
QuestionLet . Compute and state the result as diagonal entries.Show answer
Since is diagonal, exponentiate each entry: and . So .
QuestionWhy does fail for the matrices in Worked example 2, even though it holds for ordinary numbers?Show answer
For numbers, multiplication is commutative, so the cross terms in the series for match those in . For matrices, , so the terms that mix and in different orders do not cancel the way they need to. Worked example 2 shows the two sides differ, with and .
QuestionA system starts at . Write the solution at time in terms of .Show answer
The solution is , which is times the first column of . Because is fixed, only one column of the matrix exponential is needed.
QuestionYou need for a matrix with a norm of about 500, and the plain series gives results that disagree when you change the number of terms. What would you change, and why?Show answer
The plain series suffers from cancellation when is large: the early terms are big and nearly cancel, so rounding errors dominate. A better approach is scaling and squaring. Compute for a large enough so that is small, approximate it with a short series or Padé approximant, and square the result times. The scaling makes the series converge quickly, and the squarings are stable.
Sources
- Matrix exponential, Wikipedia: https://en.wikipedia.org/wiki/Matrix_exponential
- Gilbert Strang, Introduction to Linear Algebra (Wellesley-Cambridge Press): https://math.mit.edu/~gs/linearalgebra/
- Nilpotent matrix, Wikipedia: https://en.wikipedia.org/wiki/Nilpotent_matrix
- Cleve Moler and Charles Van Loan, "Nineteen Dubious Ways to Compute the Exponential of a Matrix," SIAM Review (1978): https://doi.org/10.1137/1020098