## Compute the exponential of a matrix

Let $D = \begin{bmatrix} 1 & 2 & -4 & 4 \\ 2 & -1 & 4 & -8 \\ 1 & 0 & 1 & -2 \\ 0 & 1 & -2 & 3 \end{bmatrix}$. Compute $\mathsf{exp}(D)$.

Let $P = \begin{bmatrix} 0 & 1 & 2 & 0 \\ 2 & 0 & -2 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix}$. Evidently, $P^{-1}DP = \begin{bmatrix} 1 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 \end{bmatrix}$ is in Jordan canonical form.

Now $\mathsf{exp}(P^{-1}DP) = \mathsf{exp} \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} \oplus \mathsf{exp} \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$, using this previous exercise. By this previous exercise, we have $\mathsf{exp} \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} e & e \\ 0 & e \end{bmatrix}$. So $P^{-1}\mathsf{exp}(D)P = e P^{-1}DP$, and we have $\mathsf{exp}(D) = eD$.

(WolframAlpha agrees.)