TITLE: Problem related to a square matrix
QUESTION [5 upvotes]: Let $A$ be an $n\times n$ matrix with real entries such that $A^{2}+I=\mathbf{0}$. Then: 
(A) $n$ is an odd integer. 
(B) $n$ is an even integer. 
(C) $n$ has to be $2$ 
(D) $n$ could be any positive integer.
I was thinking about the problem.I noticed for a  $2\times 2$ matrix $A$ of the form 
$$\begin{pmatrix}
1 &-2 \\ 
 1& -1
\end{pmatrix},$$ the given condition holds good.So option (C) is a possibility.But I am not sure about other options. Is there any convenient way to tackle it?With regards..

REPLY [3 votes]: As $A$ is real, so is $\det A$. Yet $A^2+I=0$ implies that $(\det A)^2=\det(-I)=(-1)^n$. Therefore $n$ has to be an even integer and (A), (D) are incorrect. Now, if there is a $2\times 2$ matrix $A$ such that $A^2+I=0$, then $\tilde{A}=\begin{pmatrix}A\\&A\end{pmatrix}$ would be a $4\times4$ matrix such that $\tilde{A}^2+I=0$. Therefore (C) is incorrect too. To verify that (B) is indeed the correct answer, consider the aforementioned $\tilde{A}$ with $A=\begin{pmatrix}0&-1\\1&0\end{pmatrix}$.