Let $\alpha$ be a real number. Find all invariant subspaces for the matrix $$ \begin{pmatrix} \cos \alpha & -\sin \alpha & 0 \\ \sin \alpha & \cos \alpha & 0 \\ 0 & 0 & 1 \\ \end{pmatrix}. $$ How does the result depend on $\alpha$?
I am a bit confused about how to find all the spaces. I can see that if $\alpha=0$ then every subspace is invariant, but what do I do in other cases? Should I find the eigenspaces?