Square Roots of a Matrix: Diagonalisable Solutions. I am trying to solve the following problem,

Find all diagonalisable matrices $B$ such that $$B^2 = \left(\begin{matrix}
    3    & 1 \\
    -2       & 0 
\end{matrix}\right)$$

I diagonalised the matrix on the RHS, so we can write $$B^2 = \left(\begin{matrix}
    1    & 1 \\
    -1     & -2 
\end{matrix}\right) \left(\begin{matrix}
    2    & 0 \\
    0       & 1 
\end{matrix}\right) \left(\begin{matrix}
    2    & 1 \\
    -1       & 1 
\end{matrix}\right) $$
We know $B$ is diagonalisable, so we can write $$P_1 D_1^2 P_1^{-1} = \left(\begin{matrix}
    1    & 1 \\
    -1     & -2 
\end{matrix}\right) \left(\begin{matrix}
    2    & 0 \\
    0       & 1 
\end{matrix}\right) \left(\begin{matrix}
    2    & 1 \\
    -1       & 1 
\end{matrix}\right) $$
So, I found the following four solutions, all involving $P_1 = P$, with 
$$
D_1 = \left(\begin{matrix}
    \pm \sqrt{2}    & 0 \\
    0       & \pm 1 
\end{matrix}\right)$$
My question is, are there any more solutions? How can we be sure that there are/aren't more solutions? I think that if matrix diagonalisation is unique, then these should be the only solutions. Is this a valid idea?
Edit: I found out that diagonalisation is unique up to permutations of the order of eigenvalues and eigenvectors. This implies switching the columns in $P_1$ and in $D_1$ are also valid solutions, but when $B$ is expanded, the same solutions arise as presented above.
 A: This boils down to proving the square roots of $M=\pmatrix{2&0\\0&1}$
are just the four distinct $\pmatrix{\pm\sqrt2&0\\0&\pm1}$. If $N^2=M$
then also $NM=MN$. By computation that ensures that $N$ is a diagonal matrix, and the only diagonal matrices that square to $M$ are
the $\pmatrix{\pm\sqrt2&0\\0&\pm1}$.
More conceptually, if $MN=NM$ then the eigenspaces of $M$ are invariant under $N$, and that also implies $N$ is diagonal.
A: Let $A$ be the given $2$-by-$2$ matrix, and we hope to figure out all possibilities for the square matrix $B$ that satisfies $B^2=A$. We could conclude that there is no more possibility for such $B$ beyond your proposal, by following these two steps.


*

*$B$ is diagonalizable.

*Eigenspaces of $B$ is identical to that of $A$.


For the first step, note that
$$
\det\left(\lambda I-B\right)\det\left(\left(-\lambda\right)I-B\right)=\det\left(-\lambda^2I+B^2\right)=-\det\left(\lambda^2I-A\right).
$$
This equation implies that


*

*If $\mu$ is an eigenvalue of $A$, then at least one of $\pm\sqrt{\mu}$ is an eigenvalue of $B$, and that

*If $\lambda$ is an eigenvalue of $B$, then $\lambda^2$ is an eigenvalue of $A$.


Thanks to your diagonalization for $A$, it is clear that $\mu=1,2$ are the eigenvalues of $A$. Hence the two facts from above force $B$ to have two distinct eigenvalues. As a result, $B$ is diagonalizable.
Due to the diagonalizability of $B$, we have the decomposition
$$
B=QDQ^{-1},
$$
where $D=\text{diag}\left\{\lambda_1,\lambda_2\right\}$, with $\lambda_1,\lambda_2$ being the distinct eigenvalues of $B$. This helps to process to the second step. In fact,
$$
A=B^2=QD^2Q^{-1}\iff AQ=QD^2,
$$
or, writing in the column-vector form $Q=\left(\mathbf{q}_1,\mathbf{q}_2\right)$,
$$
A\left(\mathbf{q}_1,\mathbf{q}_2\right)=\left(\mathbf{q}_1,\mathbf{q}_2\right)\left(
\begin{array}{cc}
\lambda_1^2&\\
&\lambda_2^2
\end{array}
\right)\iff\left(A\mathbf{q}_1,A\mathbf{q}_2\right)=\left(\lambda_1^2\mathbf{q}_1,\lambda_2^2\mathbf{q}_2\right).
$$
Recall that $\mathbf{q}_1,\mathbf{q}_2$ are eigenvectors of $B$, because $Q$ diagonalizes $B$. The above result implies that any eigenvector of $B$ is an eigenvector of $A$. More precisely, let $E_{\lambda_1}^B$ be the eigenspace of $B$ associated with its eigenvalue $\lambda_1$, and this result implies that
$$
E_{\lambda_1}^B\subseteq E_{\lambda_1^2}^A,\quad E_{\lambda_2}^B\subseteq E_{\lambda_2^2}^A.
$$
However, all of $E_{\lambda_1}^B$, $E_{\lambda_2}^B$, $E_{\lambda_1^2}^A$ and $E_{\lambda_2^2}^A$ are one-dimensional, and the order of dimension forces
$$
E_{\lambda_1}^B=E_{\lambda_1^2}^A,\quad E_{\lambda_2}^B=E_{\lambda_2^2}^A.
$$
In other words, eigenspaces of $B$ is identical to that of $A$.
Let us wrap up our conclusions. Any $B$ that meets our demand must observe the representation
$$
B=QDQ^{-1},
$$
where $D$ is a diagonal matrix made up of eigenvalues of $B$, while $Q$ is an invertible matrix made up of eigenvectors of $B$. Yet due to our first step, $D$ is uniquely determined by the eigenvalues of $A$, up to some plus-or-minus choice and permutation; due to our second step, $Q$ is uniquely determined by the eigenspace of $A$, again, up to some permutation.
Therefore, there is no more possibility for $B$ beyond your proposal.
