3$\times$3 and 2$\times$2 matrices that satisfy $A^2 = -I$, $I$ being the identity matrix. I am looking for all square matrices $A$ of order 2 and 3 that satisfy $A^2 = - I$, $I$ being the identity matrix of the corresponding order.
 A: There is no $3\times 3$ matrix $A$ with real entries that satisfies the equation $A^2=-I$.  Suppose there were.  We take determinants, to get $$\left\lvert A\right\rvert^2=\left\lvert A^2\right\rvert=\left\lvert -I\right\rvert=-1$$
But $\left\lvert A\right\rvert$ is real, and no real number squares to $-1$.
In the $2\times 2$ case, by a similar argument we must have $\left\lvert A\right\rvert=\pm1$.  There are solutions, e.g. $A=\left(\begin{smallmatrix}0&-1\\1&0\end{smallmatrix}\right)$.  To find them all use @Mitch Hughes' approach (which has been, unfortunately, deleted).  To summarize, calculate a system of equations from $$\left(\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\right)^2=-I$$
A: @vadmin answers your question for $3\times3$ matrices. For $2\times2$ matrices, either:


*

*There is at least one real eigenvalue. So there is a subspace of dimension at least $1$, where $A$ acts as scaling by $\lambda$. So $A^2$ acts as scaling by $\lambda^2\geq0$. This is not compatible with $A^2$ being $-I$, since $-I$ scales by $-1$ in all directions.

*Two complex conjugate eigenvalues: first you can factor out some $cI$ so that $A=(cI)B$ with $\left\lvert B\right\rvert=1$. Now $B$ has two complex conjugate eigenvalues each with magnitude $1$. There is a basis in which $B$ is simply a rotation matrix by some angle $\theta$. Note that $-I$ is rotation by $\pi$ about the origin. To have $A^2=-I$, you need $c^2B^2$ to be rotation by $\pi$. So you need $c=\pm1$ and $B$ to be a rotation by $\pi/2$. 


So the solutions to this issue are 
$$\begin{align}
A&=\pm P^{-1}\begin{bmatrix}\cos(\pi/2)&-\sin(\pi/2)\\\sin(\pi/2)&\cos(\pi/2)\end{bmatrix}P\\
&=\pm P^{-1}\begin{bmatrix}0&-1\\1&0\end{bmatrix}P
\end{align}$$
where $P$ can be any invertible matrix. ($P$ is the change of basis matrix from the standard basis to the one where $B$ is a rotation). If you want to spell it out by entries, then let $a,b,c,d$ be any four numbers with $ad-bc\neq0$. Then you have $$\begin{align}
A
&=\pm\begin{bmatrix}a&b\\c&d\end{bmatrix}\begin{bmatrix}0&-1\\1&0\end{bmatrix}\frac{\begin{bmatrix}d&-b\\-c&a\end{bmatrix}}{ad-bc}\\
&=\frac{\pm1}{ad-bc}\begin{bmatrix}a&b\\c&d\end{bmatrix}\begin{bmatrix}c&-a\\d&-b
\end{bmatrix}\\
&=\frac{\pm1}{ad-bc}\begin{bmatrix}ac+bd&-a^2-b^2\\c^2+d^2&-ac-bd\end{bmatrix}
\end{align}$$
A: There are essentially infinite solutions that satisfy A^2 = -I for 2x2 and 3x3 matrices.
They can be solved in similar manners of creating systems of equations and then solving those to produce general solutions. I will solve for 2x2 matrices. 
For standard square matrices we have a matrix A such that
A =\begin{bmatrix}a&b\\c&d\end{bmatrix}
by multiplying the matrix by itself, we get the following matrix
A^2 = \begin{bmatrix}a^2+bc&ab+bd\\ac+cd&bc+d^2\end{bmatrix}
so we have the following set of conditions that we must statisfy:


*

*a^2+bc = -1

*b(a+d) = 0

*c(a+d) = 0

*d^2 + bc = -1


By solving this system we will be able to see that conditions that a,b,c and d must satisfy
We will first begin by subtracting the first and last equations to get:
a^2-d^2 = 0
so therefore, we can see that a = +/- d
We will first explore the first case when a = d
We immediately see through the 2nd and 3 equations that b and c must equal 0 since a+d will never be 0, unless a = d = 0 (discussed later)
However, knowing that b=c=0, we see that that the 1st and 4th equations will never hold true since a^2 and d^2 will be positive, but it must equal -1.
Now we explore the case when a = -d
Say that a = an arbitrary constant t (then d = -t)
Through the 2nd and 3rd equation we see that c and d could essentially be anything too, since a+d = 0 and the equation would always be true.
Thus the only condition it needs to satisfy are:
bc + t^2 = -1 (since a^2 = d^2 = t^2)
so bc = -(1+t^2)
Now we pick another arbitrary constant s for c
so b = -(1+t^2)/s
As a result we have the following conditions for a,b,c, and d that satisfy A^2 = -I


*

*a= t

*b= -(1+t^2)/s

*c= s

*d= -t


which can also be written as:
A =\begin{bmatrix}t&-(1+t^2)/s\\s&-t\end{bmatrix}
for any values t and s (notice that case of a=d=0 is included here)
As a result, there are infinite a,b,c,d that satisfy A^2 = -I that all lie on a plane in space (since geometric multiplicity of 2)
