Find all real square matrix $A$ which $A=\operatorname{adj}(A)$ 
Find all real square matrix $A$ which $$A=\operatorname{adj}(A)$$

My thoughts:
We have the well-known equation $$ A\operatorname{adj}(A)=\operatorname{det}(A)I_n$$
Since $A=\operatorname{adj}(A)$, it comes to $$ A^2=\operatorname{det}(A)I_n$$
So,


*

*if $\operatorname{det}(A)=0$, then $A^2=O$.

*if $\operatorname{det}(A)\neq0$, then we get (if $n\neq2$)  $$(\operatorname{det}(A))^2=(\operatorname{det}(A))^n$$ $$ \operatorname{det}(A)=\pm1$$ $$ A^2=\pm I_n$$
In this case, $A$ seems like a involutory matrix.


How to characterize the matrics mentioned above? Or what further properties should $A$ follows so we can completely characterize $A$?
Thanks for your help!
 A: The first question to answer: which matrices satisfy $A^2 = I$ and $\det(A) = 1$?
It suffices to note that since $A^2 - I = 0$, the minimal polynomial of $A$ must divide $x^2 - 1 = (x-1)(x + 1)$.  Hence, $A$ must be diagonalizable with eigenvalues equal to $\pm 1$.  Moreover, since the product of eigenvalues is equal to $\det(A)$ which is equal to $1$, the $-1$ eigenvalue must have even multiplicity.  All together, we can characterize these matrices as those of the form
$$
A = S \pmatrix{-I_{2k}&0\\0&I_{n - 2k}}S^{-1}, \quad k = 0,1,\dots,\lfloor n/2 \rfloor
$$ 
where $I_k$ denotes the $k \times k$ identity matrix and the matrices here are $n \times n$.
The second question: which matrices satisfy $A^2 = -I$ and $\det(A) = -1$?  In fact, there are no such real matrices.  Because $A^2 + I = 0$, the (complex) eigenvalues of $A$ must solve $x^2 + 1 = 0$, which is to say that the eigenvalues of $A$ are $\pm i$.  Because $A$ is a real matrix, its complex eigenvalues come in conjugate pairs.  Thus, its determinant must have the form $\det(A) = (-i)^k(i)^k = 1 \neq -1$.
An alternative explanation: the minimal polynomial $x^2 + 1$ of $A$ is an irreducible polynomial over $\Bbb R$, so the characteristic polynomial must have the form $\det(xI - A) = (x^2 + 1)^k$.  Thus, we find that $A$ has even size, and that $\det(A) = \det(0I - A) = (0^2 + 1)^k = 1$.
As I note in the comments above, there are no solutions satisfying $A^2 = 0$, and in fact no non-invertible solutions other than $A = 0$.
A: $A^2=I_n$, let $U=\{x:A(x)=x\}, V=\{x:A(x)=-x\}$. $U\cap V=\{0\}$, for every $x$, you can write $x={1\over 2}(A(x)+x)+{1\over 2}(x-A(x))$, ${1\over 2}(x+A(x))\in U$ and ${1\over 2}(x-A(x))\in V$.
Then take any $U,V$ supplementary subspaces and define $A_{\mid U}=I_U$ and $A_{\mid V}=-Id_V$.
