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?

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$.
