I've just started learning about invariant subspaces and I came across this exercise:
Let $V$ be a finite-dimensional space over the field $\mathbb{C}$. Prove that if endomorphism matrices $A$ and $B$ satisfy the equation $A^2=B^2=I$, there exists a one- or two-dimensional subspace that is both $A$ and $B$ invariant.
The only thing that I've proven thus far is that the only possible eigenvalues of $A$ and $B$ may be $1$ or $-1$ (If $v$ is an eigenvector of $A$ then $Av=\lambda v \Rightarrow Iv=A^2v=\lambda Av=\lambda^{2}v$ ; this can only happen if $\lambda =\pm 1$).
Any help is appreciated. Thanks.