Solve the matrix equation $X ^ 3 = A$, with $X \in M_2(\mathbb{R})$ and given $A$. I have to solve the matrix equation:
$$X^3 = A$$
where
$$A = \begin{pmatrix}
2 & 1\\
1 & 2
\end{pmatrix}$$

So in the end I have to solve:
$$X^3 =  \begin{pmatrix}
2 & 1\\
1 & 2
\end{pmatrix}$$
Since we have $2$ x $2$ matrices I tried the following:
$$X ^ 3 = A$$
$$\det(X^3) = \det(A)$$
$$\det(X)^3 = 3$$
$$\det(X) = \sqrt[3]{3}$$
I did this in hopes that it would result in the determinant of $X$ being $0$ so then I could've used the Cayley-Hamilton identity:
$$X^2 - tr(X) X + det(X) I_2 = O_2$$
where $tr(x) = (a + d)$ (trace of the matrix).
But since the determinant is not $0$, I can't abuse that, it looks complicated since that last term does not get canceled.
Then I tried to use the notation:
$$X = \begin{pmatrix}
a & b\\
c & d
\end{pmatrix}$$
and to do the multiplication $X \cdot X \cdot X$ and then to equate it to $A$ and try to find $a, b, c, d$ but the algebra got very ugly very fast and I lost myself in the calculations.
So how should I approach this?
 A: The matrix $A$ has $2$ eigenvalues: $1$ and $3$. The vectors $(1,-1)$ and $(1,1)$ are eigenvectors that correspond to the eigenvalues $1$ and $3$ respectively. Therefore, if$$P=\begin{bmatrix}1&1\\-1&1\end{bmatrix}$$(the colums of $P$ are the eigenvectors), then$$P^{-1}AP=\begin{bmatrix}1&0\\0&3\end{bmatrix}.$$So, take\begin{align}X&=P\begin{bmatrix}1&0\\0&\sqrt[3]3\end{bmatrix}P^{-1}\\&=\frac12\begin{bmatrix}\sqrt[3]3+1&\sqrt[3]3-1\\\sqrt[3]3-1&\sqrt[3]3+1\end{bmatrix}.\end{align}
A: The Cayley-Hamilton theorem provides a way to solve this without performing a full diagonalization: since the characteristic polynomial of $A$ is quadratic, then any function of $A$ that can be expressed as a power series in $A$ is equal to $aI+bA$ for some scalars $a$ and $b$. This also holds for eigenvalues of $A$. That is, if $\lambda$ is an eigenvalue of $A$ and we have $f(A)=aI+bA$, then $f(\lambda)=a+b\lambda$.  
The eigenvalues of this matrix can be found by inspection to be $1$ and $3$, so the problem is reduced to solving the system $$a+b=1\\a+3b=\sqrt[3]3$$ and then assembling the matrix $aI+bA$.  
As I mentioned, eigenvalues and eigenvectors of this particular matrix are easily found by inspection, so I’m not sure that this is really any less work than diagonalizing $A=PDP^{-1}$ and then computing $PD^{1/3}P^{-1}$, but I think there’s less opportunity for error since no matrix multiplications are involved.
