Let $ H=\{ A\in M_2(\mathbb{R}) | A^2=A \},x \in \mathbb{R} $
a) Prove that if $M \in H$ and $\det(M) \neq 0$ then $\det(M)=1$.
I tried this using the Hamilton-Cayley relationship, but didn't really help. $ M^2- \operatorname{Tr}(M)M- \det(M)I_2=O_2 \Leftrightarrow M-\operatorname{Tr}(M)\cdot M-\det(M)I_2=O_2$
Also, supposing $\det(M)=1$ the equation is even harder to prove in my opinion, because it is
$M(1-\operatorname{Tr}(M))-I_2=O_2$.
b) Prove that the set $H$ is infinite.
I have no idea how to actually prove b.


