Matrix equation $A^2+A=I$ when $\det(A) = 1$ 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.
 A: Let the eigenvalues of $A$ be $\{e_i\}$ and let $P$ be a similarity transformation that diagonalizes $A$.  Then $P$ also diagonalizes $A^2$ and the equation becomes 
$$
\forall i: e_i^2 + e_i = 1
$$
Since there are two real roots to that equation, there are $2^n$ candidates for $A$, before imposing that the determinant is one.  
When we impose that the diagonal is one, we see that the eigenvalues  have to come in pairs 
$$
e_i = \frac{-1-\sqrt{5}}{2}. e_{i'} = \frac{-1+\sqrt{5}}{2}. 
$$
and that there must be an even number of such pairs.  So no such $A$ exists, unless $N=4k$ for$k\in\Bbb{Z}^+$.  For a given such $N$ there are 
$$
\binom{N}{N/2}
$$
possible diagonal determinant one $N\times N$ matrices satisfying the equation.
However, if $A$ satisfies the equation, then so does any similar matrix 
$$
p^{-1}AP
$$
so as long as $N=4k$ there are a continuum of solutions for $A$.
A: The fact $A^2 + A = I$, means that  $X^2 + X -1$ is an annihilating polynomial of $A$. 
The minimal polynomial of $A$ thus divides that polynomial. Thus all the eigenvalues of $A$ are among the roots of $X^2 + X - 1$, which are
$$\frac{-1 \pm  \sqrt{5}}{2}.$$
Since the determinant is the product of all eigenvalues (with multiplicity) it follows that both have the same multiplicity and this multiplicity is even. 
Since the sum of all multiplicities is the dimension, it follows that the dimension must be divisible by $4$. 
This condition suffices. A matrix has this property if and only it is similar to a diagonal matrix with half the diagonal entries $\frac{-1 +  \sqrt{5}}{2}$ and the other $\frac{-1 - \sqrt{5}}{2}$. 
The matrix is diagonalisable as the minimal polynomial has only distinct roots.
A: Note that once you have one matrix that satisfies $A^2+A=I$, you have infinity many, since for every invertible matrix $P$ we get
$$
(P^{-1}AP)^2+(P^{-1}AP)=I\qquad\text{and}\qquad \det(P^{-1}AP)=1
$$
Now, if $4\mid N$, then choose the matrix
$$
A=diag(\phi,-1-\phi,\ldots,\phi,-1-\phi)
$$
where $\phi=\frac{\sqrt{5}-1}{2}$. Since $\phi^2+\phi=1$, we have that $A^2+A=I$. In addition, $\det A=(\phi(-1-\phi))^{N/2}=(-1)^{N/2}=1$ because $4\mid N$.
Suppose now that If $4\nmid N$. Since $f(A)=O$ for $f(x)=x^2+x-1$ and since $f(x)$ is simple above $\mathbb{R}$ it follows that $A$ is similar to a diagonal matrix $D$ that has $\phi$ and $-1-\phi$ along its main diagonal. But unless $4\mid N$, we get that $\det A=\det D\neq 1$. 
A: 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$. 
