Matrix Exponential and Logarithm Consider the following matrix $A$:
$A = \begin{bmatrix}
    \cos^2(1) & -\sin(2) & \sin^2(1) \\
    \cos(1)\sin(1) & \cos(2) & -\cos(1)\sin(1) \\
    \sin^2(1) & \sin(2) & \cos^2(1)\\
\end{bmatrix}$
I want to find a matrix $B$ such that $\exp(B)=A$ (or essentially finding $\log(A))$. Is there a systematic way to approach these kinds of problems? I was thinking of using some properties involving diagonalization to get to the answer, which should be (obtained using Mathematica): 
$B = \begin{bmatrix}
    0 & -2 & 0 \\
    1 & 0 & -1 \\
    0 & 2 & 0\\
\end{bmatrix}$
However, I'm not sure how to get to this result. Thank you for your help. 

First check that one can diagonalize $A$, which should give something like
$$\left(
\begin{array}{ccc}
 1 & 0 & 0 \\
 0 & \frac{\cos ^2(1)-2 i \sin (1) \cos (1)-\sin ^2(1)}{\cos ^2(1)+\sin ^2(1)} & 0 \\
 0 & 0 & \frac{\cos ^2(1)+2 i \sin (1) \cos (1)-\sin ^2(1)}{\cos ^2(1)+\sin ^2(1)} \\
\end{array}
\right)$$
Calculate the matrix of eigenvectors of $A$
$$V = \left(
\begin{array}{ccc}
 -1 & i & 1 \\
 -1 & -i & 1 \\
 1 & 0 & 1 \\
\end{array}
\right)$$
Calculate the inverse
$$V^{-1} = \left(
\begin{array}{ccc}
 -\frac{1}{4} & -\frac{1}{4} & \frac{1}{2} \\
 -\frac{i}{2} & \frac{i}{2} & 0 \\
 \frac{1}{4} & \frac{1}{4} & \frac{1}{2} \\
\end{array}
\right)$$
Calculate
$$A' = (V^T)^{-1} A V^T = \left(
\begin{array}{ccc}
 -\frac{1}{4} & -\frac{1}{4} & \frac{1}{2} \\
 -\frac{i}{2} & \frac{i}{2} & 0 \\
 \frac{1}{4} & \frac{1}{4} & \frac{1}{2} \\
\end{array}
\right)^{\mathsf{T}}.\left(
\begin{array}{ccc}
 \cos ^2(1) & -\sin (2) & \sin ^2(1) \\
 \sin (1) \cos (1) & \cos (2) & \sin (1) (-\cos (1)) \\
 \sin ^2(1) & \sin (2) & \cos ^2(1) \\
\end{array}
\right).\left(
\begin{array}{ccc}
 -1 & i & 1 \\
 -1 & -i & 1 \\
 1 & 0 & 1 \\
\end{array}
\right)^{\mathsf{T}} = \left(
\begin{array}{ccc}
 (\cos (1)+i \sin (1))^2 & 0 & 0 \\
 0 & (\cos (1)-i \sin (1))^2 & 0 \\
 0 & 0 & 1 \\
\end{array}
\right)$$
then
$$\ln(A) = V^T \ln(A') (V^T)^{-1} = \left(
\begin{array}{ccc}
 -1 & i & 1 \\
 -1 & -i & 1 \\
 1 & 0 & 1 \\
\end{array}
\right)^{\mathsf{T}}.\left(
\begin{array}{ccc}
 2 i & 0 & 0 \\
 0 & -2 i & 0 \\
 0 & 0 & 0 \\
\end{array}
\right).\left(
\begin{array}{ccc}
 -\frac{1}{4} & -\frac{1}{4} & \frac{1}{2} \\
 -\frac{i}{2} & \frac{i}{2} & 0 \\
 \frac{1}{4} & \frac{1}{4} & \frac{1}{2} \\
\end{array}
\right)^{\mathsf{T}} = \left(
\begin{array}{ccc}
 0 & -2 & 0 \\
 1 & 0 & -1 \\
 0 & 2 & 0 \\
\end{array}
\right)$$
Here $\ln(A')$ means taking the natural logarithm for each diagonal entry.
