<s>[INST] Find $\exp(D)$ where $D = \begin{bmatrix}2& -1 \\ 1 & 2\end{bmatrix}. $ $$C = \begin{bmatrix}2& -1 \\ 0 & 2\end{bmatrix}\quad   $$
I break it down into two matrices
$$A = \begin{bmatrix}2& 0 \\ 0 & 2\end{bmatrix}\quad \text{and}\quad 
B =\begin{bmatrix}0 & -1 \\ 0 & 0\end{bmatrix}.$$
For matrix $A$, $$\operatorname{exp}(A) = \begin{bmatrix}e^2& 0 \\ 0 & e^2\end{bmatrix}\quad.$$
For matrix $B$, we have that
$B^k=0$, for all $k\ge 2$$$
\exp B=I +B+\frac{B^2}{2!}+\cdots+\frac{B^n}{n!}+\cdots=
\cdots=I+B 
=\begin{bmatrix}1 & -1 \\ 0 & 1\end{bmatrix}.$$
So exp(C) = $$ \begin{bmatrix} \mathrm{e^2}+1 & -1\\ 0 &  \mathrm{e^2}+1\end{bmatrix}\quad   $$
Can someone check to see if this is right?
if so my next question is to find
$$D = \begin{bmatrix}2& -1 \\ 1 & 2\end{bmatrix}\quad   $$
I break it down into two matrices
$$E = \begin{bmatrix}2& 0 \\ 0 & 2\end{bmatrix}\quad \text{and}\quad 
F =\begin{bmatrix}0 & -1 \\ 1 & 0\end{bmatrix}$$
For matrix $E$, $\exp(E)$ is the same as $\exp(A)$,
but for matrix $F$, I cannot apply the same method to solve matrix $B$. I am wondering how to find the $\exp(F)$?
Thank you
 [/INST] $D=2I+F$, and thus (as $I$ and $F$ commute)
$$
\exp(D)=\exp(2I)\exp(F)=\mathrm{e}^2\exp(F).
$$
But
$$
F^2=-I,\,\,F^3=-F,\,\,F^4=I,\,\,F^5=F, \mathrm{etc}. 
$$
Hence since $\cos x = \sum_{k \ge 0} \frac{x^{2k}}{(2k)!}$ and $\sin(x) = \sum_{k \ge 0} \frac{x^{2k+1}}{(2k+1)!}$, we have
$$
\exp(F)=\left(\begin{matrix}\cos 1&-\sin 1\\ \sin 1&\cos 1\end{matrix}\right),
$$
and finally
$$
\exp(D)=\mathrm{e}^2\left(\begin{matrix}\cos 1&-\sin 1\\ \sin 1&\cos 1\end{matrix}\right).
$$
Note that
$$
\cos x = \frac{e^{ix} + e^{-ix}}2, \quad \sin x = \frac{e^{ix} - e^{-ix}}{2i},
$$
hence you can simplify your answer by plugging $i$ into these expressions and substituing in the matrices.
</s>