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 ?

suppose $Mx = 0.$  then multiplying $$M^2 + M^T = I$$ on the left by $x,$ we get $$M^T x = x. \tag 1$$ again multiply $(1)$ by $M$ on the left gives $$MM^T x = 0 \tag 2 $$ multiplying (2) by $x^T$ on the left gives $$ 0 =x^T M M^T x = (M^\top x)^T (M^T x) = |M^T x|^2  \to       M^Tx = 0 \tag 3$$ together with $(1)$ impies $x = 0.$ that is $$ Mx = 0 \implies x = 0.$$ that is equivalent to $M$ being invertible.
