TITLE: Calculating the exponential of an upper triangular matrix
QUESTION [9 upvotes]: Find the matrix exponential $e^A$ for
$$ A = \begin{bmatrix}
2 & 1 & 1\\
0 & 2 & 1\\
0 & 0 & 2\\
\end{bmatrix}.$$

I think we should use the proberty

If $AB = BA$ then $e^{A+B} = e^A e^B$.

We can use that
$$\begin{bmatrix}
2 & 1 & 1\\
0 & 2 & 1\\
0 & 0 & 2\\
\end{bmatrix} 
=\begin{bmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 1\\
\end{bmatrix} 
+\begin{bmatrix}
1 & 1 & 1\\
0 & 1 & 1\\
0 & 0 & 1\\
\end{bmatrix}$$
Both matrices obviously commute. But I dont know how to calculate the exponential of
$$\begin{bmatrix}
1 & 1 & 1\\
0 & 1 & 1\\
0 & 0 & 1\\
\end{bmatrix}.$$
Could you help me?

REPLY [5 votes]: We may use Cayley Hamilton theorem to find the exponential of $$ M=\begin{bmatrix}
1 & 1 & 1\\
0 & 1 & 1\\
0 & 0 & 1\\
\end{bmatrix}.$$
Note that the eigenvalues of $M$ are $1,1,1$
We write $$e^{tM} = \alpha (t)I+ \beta (t)M+ \gamma (t) M^2.$$
To find the  coefficient functions we replace $M$ with $\lambda$ and solve the resulting system.
$$e^{t\lambda} = \alpha (t)I+ \beta (t)\lambda + \gamma (t) \lambda ^2.$$
Differentiating with respect to $\lambda $ we get $$te^{\lambda t}=\beta + 2\lambda \gamma$$
Differentiating again, we get $$t^2 e^{\lambda t }=2\gamma$$
With t=1 and $\lambda =1$ we get $$\alpha = e/2, \beta =0, \gamma = e/2$$
with these values we find $$e^M =e \begin{bmatrix}
1 & 1 & 3/2\\
0 & 1 & 1\\
0 & 0 & 1\\
\end{bmatrix}. $$
Apply the same method with $\lambda =2$ we get $$e^N =e^2 \begin{bmatrix}
1 & 1 & 3/2\\
0 & 1 & 1\\
0 & 0 & 1\\
\end{bmatrix}. $$
for the original matrix $$N=\begin{bmatrix}
2 & 1 & 1\\
0 & 2 & 1\\
0 & 0 & 2\\
\end{bmatrix}$$