TITLE: Matrix equation $A^2+A=I$ when $\det(A) = 1$
QUESTION [8 upvotes]: I have to solve the following problem:
find the matrix $A \in M_{n \times n}(\mathbb{R})$ such that:
$$A^2+A=I$$ and $\det(A)=1$.
How many of these matrices can be found when $n$ is given?
Thanks in advance.

REPLY [2 votes]: Consider the Jordan Canonical Form for $A$; that is, $A = PJP^{-1}$ for some invertible $P$ and block diagonal matrix $J$ whose blocks are either diagonal or Jordan (same entry on the diagonal, have $1$s on the the diagonal above the main diagonal, and $0$s elsewhere).
Then, the equation reduces to $J^2 + J = I$. Looking at the diagonal entries on both sides, this reduces to solving $r^2 + r = 1$, which has solutions $r = \frac{-1 \pm \sqrt{5}}{2}$. In other words, $J$ has diagonal entries are $\frac{-1 \pm \sqrt{5}}{2}$. However, we want $|A| = 1$, which is equivalent to $|J| = 1$. This is only possible if $n$ is even and $J$ has an equal even number of $\frac{-1 + \sqrt{5}}{2}$ and  $\frac{-1 - \sqrt{5}}{2}$ on its diagonal, due to $(\frac{-1 + \sqrt{5}}{2})(\frac{-1 -\sqrt{5}}{2}) = -1$ and no positive integral power of $\frac{-1 \pm \sqrt{5}}{2}$ equaling $\pm 1$.
As a summary, there are no solutions when $n$ is not a multiple of $4$.
Otherwise, when $n$ is not a multiple of $4$, there are infinitely many solutions. To illustrate this, let $J$ be diagonal with an equal and even number of $\frac{-1 + \sqrt{5}}{2}$ and  $\frac{-1 - \sqrt{5}}{2}$ on its diagonal. Letting $P$ vary (as there are infinitely many non-invertible matrices that do not commute with $J$) will give infinitely many possibilities for $A$ when $n$ is a multiple of $4$.