Find a real matrix $B$ such that $B^3 = A$ Given $$A = \begin{bmatrix}-5 &amp; 3\\6 &amp; -2\end{bmatrix}$$ find a real, invertible matrix $B$ such that $B^3 = A$




I think I am doing something wrong here, so let me describe my attempt:

1) So I started off with diagonalizing the matrix $A$ with finding the eigenvalues $\lambda_1 = -8$ and $\lambda_2 = 1$ and the corresponding eigenvectors $ \vec v_1 = \begin{bmatrix}1 &amp; 1\\0 &amp; 0\end{bmatrix} = x + y = 0 \Rightarrow -x = y \Rightarrow \begin{bmatrix}1\\-1\end{bmatrix}$ and $ \vec v_2 = \begin{bmatrix}1 &amp; -\frac{1}{2}\\0 &amp; 0\end{bmatrix} = x - \frac{1}{2}y = 0 \Rightarrow 2x = y \Rightarrow \begin{bmatrix}1\\2\end{bmatrix}$

2) With that being done I proceeded with computing $D = \begin{bmatrix}-8 &amp; 0\\0 &amp; 1\end{bmatrix}$ and $P = \begin{bmatrix}1 &amp; 1\\-1 &amp; 2\end{bmatrix}$ and check everything with $D = PAP^{-1}$

3) Now I thought I will simple find a diagonal matrix $M = PBP^{-1}$ and $M^3 = D$ and the easiest solution I came up with was $M = \begin{bmatrix}\sqrt[3]{-8} &amp; 0\\0&amp; 1\end{bmatrix}$ so basically $M = D^{\frac{1}{3}}.$ So that $B = PMP^{-1}$. But now come the tricky part, if I compute $B$ it results in a complex matrix not a real. //It is real!

Have I perhaps overlooked something here or miscalculated the solution for $B$?



Edit:
As Cameron pointed out my calculator and I totally failed as it was in complex mode and computed one of the non-real cube roots instead of -2. So $M = \begin{bmatrix}-2 &amp; 0\\0 &amp; 1\end{bmatrix}$ and consequentially $B = \begin{bmatrix}-1 &amp; 1\\2 &amp; 0\end{bmatrix}$
$$A=\begin{bmatrix}-5 &amp; 3\\6 &amp; -2\end{bmatrix}=PDP^{-1}$$

Where $$P=\begin{bmatrix}1&amp; 1\\-1 &amp; 2\end{bmatrix}$$is the matrix of eigenvectors 

and $$D=\begin{bmatrix}-8&amp; 0\\0 &amp; 1\end{bmatrix}$$ is the matrix of eigenvalues.

Thus $$ B = PD^{1/3}P^{-1} = \begin{bmatrix}-1&amp; 1\\2 &amp; 0\end{bmatrix}$$
Standard computer methods (e.g., Mathematica Solve) gives the answer directly:

myB = {{b11, b12}, {b21, b22}}; 
myB /. Solve[myB.myB.myB == {{-5, 3}, {6, -2}}, {b11, b12, b21, b22}][[1]]


(*

{{-1, 1}, {2, 0}}

*)

$${\bf B} = {-1, 1 \choose 2 , 0}$$.