TITLE: Prove that matrix can be square of matrix with real entries
QUESTION [9 upvotes]: Prove that matrix 
\begin{bmatrix}1&0&0\\0&-1&0\\0&0&-1\end{bmatrix}
can be square of matrix with all real entries.
I have found one such matrix to be 
\begin{bmatrix}1&0&0\\0&1&-1\\0&2&-1\end{bmatrix} but is there an elegant way to do it without any trial and error?

REPLY [2 votes]: Think of the construction of $\mathbf C$ via $2\times2$-matrices: if $J=\begin{bmatrix}0&-1\\1&0\end{bmatrix}$, then
$$J^2=-I=\begin{bmatrix}-1&0\\0&-1\end{bmatrix}.$$
Thus, using block multiplication, one obvious solution is
$$B=\begin{bmatrix}1&0&0\\0&0&-1\\0&1&0\end{bmatrix}.$$