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?
Hint. Think about the geometry of the linear transformation $T$ of space that matrix represents. Then look for a transformation $S$ such that $S^2 = T$.