Square root of a matrix A is not a unique matrix, generally.
How to find all the square roots of a matrix, in particular the following matrix B:
$$ \begin{bmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix} $$
other than forming 9 equations in 9 variables as:
$$ \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix} $$
In particular, is there any square root of B that has all elements as real numbers.