Skip to main content

Section 7.6 Application II: Computing Matrix Exponentials

In this section, we compute the matrix exponential \(e^{At}\text{.}\) This function appears naturally when solving systems of differential equations, which arise throughout science and engineering.
Why should we care about \(e^{At}\text{?}\) The solution to the differential equation system
\begin{equation*} \frac{d\mathbf{x}}{dt} = A\mathbf{x}, \quad \mathbf{x}(0) = \mathbf{x}_0 \end{equation*}
is given by \(\mathbf{x}(t) = e^{At}\mathbf{x}_0\text{.}\) So if we can compute \(e^{At}\text{,}\) we can solve differential equations!

Subsection 7.6.1 Defining the Matrix Exponential

Recall from calculus that the exponential function has the power series:
\begin{equation*} e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \cdots = \sum_{k=0}^{\infty} \frac{x^k}{k!} \end{equation*}
We define the matrix exponential analogously:

Definition 7.6.1. Matrix Exponential.

For an \(n \times n\) matrix \(A\text{,}\) the matrix exponential is defined as:
\begin{equation*} e^A = I + A + \frac{A^2}{2!} + \frac{A^3}{3!} + \frac{A^4}{4!} + \cdots = \sum_{k=0}^{\infty} \frac{A^k}{k!} \end{equation*}
It can be shown that this infinite series converges for any matrix \(A\text{.}\)

Example 7.6.2. Computing \(e^D\) for a Diagonal Matrix.

Let
\begin{equation*} D = \begin{bmatrix} 2 \amp 0 \amp 0 \\ 0 \amp -1 \amp 0 \\ 0 \amp 0 \amp 3 \end{bmatrix}. \end{equation*}
Compute \(e^D\text{.}\)
Solution.
By definition,
\begin{equation*} e^D = I + D + \frac{D^2}{2!} + \frac{D^3}{3!} + \cdots \end{equation*}
Since \(D\) is diagonal, every power \(D^k\) is also diagonal:
\begin{equation*} D^k = \operatorname{diag}(2^k, (-1)^k, 3^k) \end{equation*}
Therefore the series is entrywise on the diagonal:
\begin{equation*} e^D = \operatorname{diag}\left(\sum_{k=0}^{\infty}\frac{2^k}{k!},\; \sum_{k=0}^{\infty}\frac{(-1)^k}{k!},\; \sum_{k=0}^{\infty}\frac{3^k}{k!}\right) = \operatorname{diag}(e^2, e^{-1}, e^3) \end{equation*}
Hence,
\begin{equation*} e^D = \begin{bmatrix} e^2 \amp 0 \amp 0 \\ 0 \amp e^{-1} \amp 0 \\ 0 \amp 0 \amp e^3 \end{bmatrix} \end{equation*}
The challenge: How do we actually compute this infinite sum? Computing each \(A^k\) and summing infinitely many terms is impossible! This is where diagonalization comes to the rescue.

Proof.

Since \(A = PDP^{-1}\text{,}\) by Theorem 7.2.8 we have \(A^k = PD^kP^{-1}\) for all \(k \ge 0\text{.}\) Using the power-series definition:
\begin{align*} e^A \amp= \sum_{k=0}^{\infty}\frac{A^k}{k!}\\ \amp= \sum_{k=0}^{\infty}\frac{PD^kP^{-1}}{k!}\\ \amp= P\left(\sum_{k=0}^{\infty}\frac{D^k}{k!}\right)P^{-1}\\ \amp= Pe^DP^{-1} \end{align*}
Because \(D\) is diagonal, powers of \(D\) are computed entrywise, so
\begin{equation*} e^D = \operatorname{diag}(e^{\lambda_1}, \ldots, e^{\lambda_n}) \end{equation*}
Replacing \(A\) by \(At\) gives
\begin{equation*} e^{At} = P\,\operatorname{diag}(e^{\lambda_1 t}, \ldots, e^{\lambda_n t})\,P^{-1} \end{equation*}
since \(At = P(tD)P^{-1}\text{.}\)

Insight 7.6.4. The Power of This Method.

Computing the infinite series directly is impossible. But diagonalization reduces the problem to:
  1. Computing scalar exponentials \(e^{\lambda_i}\) (easy!)
  2. Doing two matrix multiplications (easy!)
Once again, eigenvalues crack open the problem and make the impossible become trivial!

Example 7.6.5. Computing a Matrix Exponential.

Compute \(e^{A}\) for \(A = \begin{bmatrix} 2 \amp -12 \\ 1 \amp -5 \end{bmatrix}\text{.}\)
Solution.
Step 1: Find the characteristic polynomial and eigenvalues.
The eigenvalues are \(\lambda_1 = -1\) and \(\lambda_2 = -2\text{.}\)
Step 2: Diagonalize \(A\text{.}\) From Example 7.1.5, we have \(A = PDP^{-1}\text{.}\)
Step 3: Apply the formula \(e^A = Pe^DP^{-1}\text{.}\) Since \(D\) is diagonal:
\begin{equation*} e^D = \begin{bmatrix} e^{-1} \amp 0 \\ 0 \amp e^{-2} \end{bmatrix} \end{equation*}
Therefore:
\begin{equation*} e^A = P\begin{bmatrix} e^{-1} \amp 0 \\ 0 \amp e^{-2} \end{bmatrix}P^{-1} \end{equation*}