Calculating the exponential of an upper triangular matrix 
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?

You should decompose your matrix like this
$$\begin{equation}
 \begin{pmatrix}
  2 & 1 & 1 \\
  0 & 2 & 1\\
  0 & 0 & 2 
 \end{pmatrix}
=
\begin{pmatrix}
 2 & 0 & 0\\
 0 & 2 & 0\\
 0 & 0 & 2
\end{pmatrix}
+
\begin{pmatrix}
0 & 1 & 1\\
0 & 0 & 1\\
0 & 0 & 0
\end{pmatrix}
\end{equation}
$$
The left one commutes with the right one and the right one is nilpotent. So it is easy to compute.
