Unique solution of $A^3 = B$, where $A$, $B$ is a diagonal matrix given below. Show that $A^3 = B$ has exactly one REAL solution (which is easy to find), where:
$$B = 
\begin{bmatrix}8& 0& 0\\
0& -1& 0\\
0& 0 &27\end{bmatrix}$$
Finding the solution is really easy. But how can we show that it's the only solution ?
I know that the power of a diagonal matrix is a diagonal matrix, but is the opposite: the nth root of a diagonal matrix is a diagonal matrix, also true ? And if so, how to prove it ?
 A: The main points about this situation are that (1) the matrix $B$ is diagonalisable over the real numbers (it is even diagonal), and (2) its eigenspaces all have dimension$~1$ (because the diagonal entries are all distinct); also relevant is of course that cube roots of scalars always uniquely exist over the real numbers.
If $A$ is such that $A^3=B$, then clearly $A$ and $B$ must commute. Now if $v$ any eigenvector for $B$, then $Av$ is also an eigenvector for $B$, for the same eigenvalue: say $Bv=\lambda v$ then $B(Av)=A(Bv)=A(\lambda v)=\lambda(Av)$. But by property (2) above, this means $Av$ is a scalar multiple of $v$, in other words $v$ is also an eigenvector for$~A$. Then any basis of eigenvectors for$~B$ is also a basis of eigenvectors for$~A$, and $A$ will be diagonal when expressed on such a basis. In the example, the standard basis is such a basis of eigenvectors, in other words $A$ must, just like$~B$, be a diagonal matrix. As you already saw, it can only be the matrix obtained by taking cube roots of each of the diagonal entries of$~B$.
A: The result follows from a direct computation using Buchberger's algorithm as follows. Write $A=(a_{ij})$ with $9$ parameters as entries. The Buchberger's algorithm immediately gives the following: the diagonal elements $a_{ii}$ have to satisfy one of the following equations:
$$
(a_{11},a_{22},a_{33})=(2,-1,3),
$$
or
$$
a_{11}^2 + 2a_{11} + 4=0,
$$
or
$$
a_{22}^2 - a_{22} + 1=0,
$$
or
$$
a_{33}^2 + 3a_{33} + 9=0.
$$
The last three equations do not have real solutions. Then we easily see that $A={\rm diag}(2,-1,3)$ is the only real solution.
Edit: In this question
$A$ is a symmetric real matrix. Show that there is $B$ such that $B^3=A$
the claim is proved, too, since our matrix here is indeed symmetric.
A: Let $$Q = 
\begin{bmatrix}2& 0& 0\\
0& -1& 0\\
0& 0 &3\end{bmatrix}$$
We are given $$0=A^3-Q^3=(A-Q)(A^2+AQ+Q^2)=(A-Q)(A-\alpha Q)(A-\overline{\alpha}Q)$$ where $\alpha = e^{i\frac{2\pi}{3}} = -\frac{1}{2} + i\frac{\sqrt{3}}{2}.$
The solutions are 
$$\begin{align} A &=Q, &(\textrm{real})\phantom{000}\\
A &= \alpha Q,  &(\textrm{complex})\\
A &= \overline{\alpha}Q,  &(\textrm{complex}) \end{align}$$
Notice $\{1, \alpha, \overline{\alpha} \}$ are the three cube roots of one.
UPDATE
These are not the only solutions.  We could have taken $Q$ to be any of 
$$Q = 
\begin{bmatrix} \mp 2& 0& 0\\
0& -1& 0\\
0& 0 &\mp 3\end{bmatrix}$$, 
so it looks like there are $(4)\cdot (3) = 12$ solutions, not only $3$.
To address the last part of the question:
If $A^n = \Lambda$,  Let $Q$ be an  $n^\textrm{th}$ root of $\Lambda$ and $\alpha$ an $n^\textrm{th}$ root of unity.  Then  $A \in \{  Q, \alpha Q , \dots, \alpha^{n-1} Q \}$, are solutions.  As Marc pointed out, the solutions need not be diagonal, for example, a rotation matrix that rotates by an angle of $\frac{2\pi}{n}$.
