The number of invariant subspaces 
Linear operator on $\mathbb{R}^3$ has matrix
\begin{pmatrix}0 & 1 & 0\\ 0 & 0 & 1\\ 0 & 0 & 0 \end{pmatrix}
How many invariant subspaces it has?
Choices: 1,2,3,4,5.

My solution:


*

*{0}

*$\mathbb{R}^3$

*Eigenspace corresponding to eigenvalue 0, i.e. span of (1,0,0)


Question: how do I prove that there is no more invariant subspaces or find the 4th (and possible the 5th) subspace(s)?
 A: The span of $\{\langle 1,0,0\rangle,\langle 0,1,0\rangle\}$ is another. This is the range of the transformation, which is necessarily an invariant subspace.
The matrix corresponds to the transformation $T(\langle x,y,z\rangle)=\langle y,z,0\rangle$. It's easy to check that $T$ has no invariant one-dimensional subspace other than its eigenspace. Suppose that $W$ is an invariant subspace of dimension at least $2$ other than the range of the transformation. Then either $W=\Bbb R^3$, or $W$ intersects the $xy$-plane in a line. Either this line is the $x$-axis, or its image under the transformation is the $x$-axis, which in any case must therefore be contained in $W$. Thus, $W$ has a basis of the form $\{\langle 1,0,0\rangle,\langle 0,a,b\rangle\}$, where $b\ne 0$. But then it's easy to check that $\langle 0,1,0\rangle\in W$ and hence that $W=\Bbb R^3$ after all.
A: Let $S$ be an $A$-invariant subspace and let $d=\dim S$. Note that $\ker A = 
\operatorname{sp} \{ e_1 \}$.
If $d=0$, then $S = \{0\}$.
If $d=1$ then $S = \operatorname{sp} \{ e_1 \}$ the only eigenvector.
If $d=2$, note that we always have $AS \subset \operatorname{sp} \{ e_1, e_2 \}$. If $\dim AS = 2$, then we must have $S=\operatorname{sp} \{ e_1, e_2 \}$, but then $AS = \operatorname{sp} \{ e_1 \}$, a contradiction. Hence $AS$ is a line and so $S \cap \ker A$ is non trivial, in particular, $e_1 \in S$. Let $e_1,v$ span $S$ ,with $e_1 \bot v$. Then $v= \alpha e_2 + \beta e_3$ and
$Av = \alpha e_1 + \beta e_2$, and so $\beta e_2 \in S$. If $\beta =0$, then
${1 \over \alpha} v = e_2 \in S$, otherwise $e_2 \in S$. It follows that
$S = \operatorname{sp} \{ e_1, e_2 \}$.
If $d=3$, then we must have $S =\mathbb{R}^3$.
