Diagonalization and find matrix that corresponds to the given condition Diagonalize the matrix
$$
A=
\begin{pmatrix}
1 & 2\\
0 & 3
\end{pmatrix}
$$
and find $B^3=A$.
I derived $A \sim \text{diag}(1,3)$ but I have problem finding any $B$. I tried to solve it by writing $B= \begin{pmatrix} 1 & x\\ 0 & 3\end{pmatrix}$, but is it okay to solve the problem in this way?
 A: The eigen values are $1,3 $ clearly. So it is diagonalizabe(distinct eigen values).
And so, there exits $P$ such that 
$$A=P\left(\begin{array}{cc}1& 0\\ 0& 3\end{array}\right)P^{-1}.$$
Now we need $B$ such that $B$ such that $B^3=A$
Supose there exists such a $B$ then, $$B^3=A=P\left(\begin{array}{cc}1& 0\\ 0& 3\end{array}\right)P^{-1}$$
Therefore, $$B=P\left(\begin{array}{cc}1& 0\\ 0& 3\end{array}\right)^{\frac 1 3}P^{-1}$$
$$=P\left(\begin{array}{cc}1^{\frac 1 3}& 0\\ 0& 3^{\frac 1 3}\end{array}\right)P^{-1}$$
A: No, in general $B$ will not be of that form.
Hint: you know $A = P^{-1}DP$. If $d_1$ and $d_2$ are the diagonal entries of $D$, let $E$ be a diagonal matrix with entries $d_1^{1/3},d_2^{1/3}$, and consider the matrix $P^{-1}EP$ (in particular, what do you get if you cube it?)
A: First note that, if $A$ were diagonal, the answer would be easy: we would simply take $B = \begin{pmatrix} 1 & 0\\ 0 & \sqrt[3]{3}\end{pmatrix}$.  However, since we only have
$$
A = P \begin{pmatrix} 1 & 0\\ 0 & 3 \end{pmatrix} P^{-1}
$$
for some invertible matrix $P$ (which you hopefully have computed; its columns are the eigenvectors of $A$), we instead need to conjugate this answer by $P$.
A: The systematic way to solve this problem is by using diagonalisation as shown by BaronVT.
In this case, however, you can find one solution for $B$ with a bit of guesswork.  Not with
$$B=\pmatrix{1&x\cr0&3}\ ,$$
because that will give
$$B^3=\pmatrix{1&?\cr0&27\cr}$$
which certainly cannot equal $A$.  But if you calculate the cube of
$$B=\pmatrix{1&x\cr 0&{\root3\of3}\cr}\ ,$$
you will find it quite easy to determine the value of $x$ which makes $B^3=A$.
