Matrices such that $M^2+M^T=I_n$ are invertible 
Let $M$ be an $n\times n$ real matrix such that  $M^2+M^T=I_n$. Prove that $M$ is invertible

Here is my progress:


*

*Playing with determinant:


one has $\det(M^2)=\det(I_n-M^T)$ hence $\det(M)^2=\det(I_n-M)$
and $\det(M^T)=\det(I_n-M^2)$, hence $\det(M)=\det(I_n-M)\det(I_n+M)$
Combining both equalities yield $$\det(I_n-M)(\det(I_n-M)\det(I_n+M)-1)=0$$


*

*Playing with the original assumption:


transposing  yields $(M^T)^2+M=I_n$, and combining gives $(M^2-I_n)^2=I_n-M$
that is $M^4-2M^2+M=0$.
$M$ is therefore diagonalizable and its eigenvalues lie in the set $\{0,1,-\frac{1+\sqrt{5}}{2},\frac{1-\sqrt{5}}{2}\}$


*

*Misc


Multiplying $M^2+M^T=I_n$ by $M$ in two different ways, one has $MM^T=M^TM$


*

*Looking for a contradiction ?


Supposing $M$ is not invertible, there is some $X$ such that $MX=0$. This in turn implies $M^TX=X$... So what ?

as a footnote, just to look at the simplest cases:
in dimension 1 $m^2 + m - 1=0$ so $m=\frac12(-1 \pm \sqrt{5})$
in 2 dimensions, set $M=\begin{pmatrix} a & b \\c & d \end{pmatrix}$ so 
$$
M^{\mathrm{T}}=\begin{pmatrix} a & c \\b & d \end{pmatrix}
$$
and
$$
M^2 = \begin{pmatrix} a^2+bc & b(a+d) \\c(a+d) & d^2+bc \end{pmatrix}
$$
so the matrix condition $M^2+M^{\mathrm{T}}=I$ gives the conditions:
$$
a^2+bc +a =1 \\
d^2+bc +d = 1 \\
b(a+d)+c= 0 \\
c(a+d)+b=0
$$
since $a$ and $d$ are both roots of $x^2+x+(bc-1)=0$ we require $ad=bc-1$ hence
$$
|M|=-1
$$
and $M$ is non-singular.
since we also have $a+d=-1$ this forces $b=c$ and we obtain a 1-parameter family of solutions:
$$
a,d=\frac12 \left(-1\pm\sqrt{5-4b^2} \right)
$$
