Linear Algebra – Finding Real Matrix $B$ such that $B^3 = A$

linear algebramatricesmatrix equations

Given $$A = \begin{bmatrix}-5 & 3\\6 & -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 & 1\\0 & 0\end{bmatrix} = x + y = 0 \Rightarrow -x = y \Rightarrow \begin{bmatrix}1\\-1\end{bmatrix}$ and $ \vec v_2 = \begin{bmatrix}1 & -\frac{1}{2}\\0 & 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 & 0\\0 & 1\end{bmatrix}$ and $P = \begin{bmatrix}1 & 1\\-1 & 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} & 0\\0& 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 & 0\\0 & 1\end{bmatrix}$ and consequentially $B = \begin{bmatrix}-1 & 1\\2 & 0\end{bmatrix}$

Best Answer

$$A=\begin{bmatrix}-5 & 3\\6 & -2\end{bmatrix}=PDP^{-1}$$

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

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

Thus $$ B = PD^{1/3}P^{-1} = \begin{bmatrix}-1& 1\\2 & 0\end{bmatrix}$$