Counting $T$-invariant subspaces over finite field I have some explicit questions regarding the following problems. Additional critiques/suggestions are more than welcome.
Let $F$ be a finite field with $p$ elements, let $V$ be a $3$-dimensional vector space over $F$ and let $T\colon V\to V$ be a linear operator that has minimal polynomial $x^2.$

How many $1$-dimensional $T$-invariant subspaces does $V$ have?

Let's view $V$ as an $F[x]$-module with $x\alpha = T\alpha.$ Since $p(x) = x^2$ is the minimal polynomial and $\dim V = 3,$ we have that $f(x) = x^3$ is the characteristic polynomial. Thus
$$V\cong \frac{F[x]}{(x)}\oplus\frac{F[x]}{(x^2)},$$
and there exits $\alpha_1,\alpha_2\in V$ such that $\{\alpha_1,\alpha_2,x\alpha_2\}$ is a basis for $V$. If we are looking for a $1$-dimensional subspace generated by $\beta = c_1\alpha_1+c_2\alpha_2+c_3x\alpha_2,$ then $x\beta = 0,$ which implies $c_2=0.$ Since $|F|=p,$ there are $p^2-1$ choices for $c_1,c_3$ since both can't be $0$. I think we also want to divide this by $p-1$ to give $p+1$ $1$-dimensional $T$-invariant subspaces. I know it has to do with the number of generators and that there are $p-1$ numbers relatively prime to $p$, but I'm not sure how to say that precisely. Also, how does this guarantee that the subspace is $T$-invariant?

How many $1$-dimensional $T$-invariant subspaces $W$ of $V$ are direct summands of $V,$ i.e., are such that $V = W\oplus W',$ where $W'$ is a $T$-invariant subspace of $V$?

These have to come from the first factor, so there are $p$ such subspaces since there is a unique $1$-dimensional subspace of $\frac{F[x]}{(x^2)},$ namely
$$\frac{xF[x]}{(x^2)}.$$

How many $2$-dimensional $T$-invariant subspaces does $V$ have?

I have the same question about $T$-invariant-ness, but here we want $x\beta\ne0,$ but $x^2\beta=0$ (where $\beta = c_1\alpha_1+c_2\alpha_2+c_3x\alpha_2$). Then necessarily $c_2\ne0$. Then there are $p^2(p-1)$ vectors $\beta$ such that $x^2\beta=0$ (and $x\beta\ne0$). If the subspace is cyclic then for $\gamma\in\left<\beta\right>,$ $\gamma = d_1\beta+d_2x\beta$ and $\left<\gamma\right> = \left<\beta\right>$ if and only if $d_1\ne 0$. So there are $p(p-1)$ generators. Thus there are 
$$\frac{p^2(p-1)}{p(p-1)}=p$$
$2$-dimensional cyclic subspaces. But we could also come from 
$$\frac{F[x]}{(x)}\oplus\frac{xF[x]}{(x^2)}.$$
But how many would that be?

How many $2$-dimensional $T$-invariant subspaces are direct summands of $V$?

I believe it should just be $p$, the number of cyclic $2$-dimensional subspaces.
 A: Let us work much less abstractly. You are given that $T \colon V \rightarrow V$ is nilpotent of nilpotency index $2$. Hence, by the structure theory of nilpotent maps we can find a basis $\mathcal{B} = (e_1,e_2,e_3)$ of $V$ such that
$$ [T]_{\mathcal{B}} = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}. $$


*

*A one-dimensional $T$-invariant subspace is a subspace spanned by an eigenvector of $T$. Since the only eigenvalue of $T$ is $0$ with $W = \operatorname{span} \{ e_1, e_3 \}$ being the corresponding eigenspace, the question reduces to the question how many $1$-dimensional subspaces $W$ has. Let $\mathcal{S}$ be the collection one-dimensional subspaces of $W$ and consider the map $f \colon W \setminus \{ 0 \} \rightarrow \mathcal{S}$ given by $w \mapsto \operatorname{span} \{ w \}$. The map $f$ is onto with each fiber having size $p - 1$ and so 
$$|\mathcal{S}| \cdot (p - 1) = |W \setminus \{ 0 \}| = p^2 - 1 $$
resulting in $|\mathcal{S}| = \frac{p^2 - 1}{p - 1} = p + 1$.

*Let $U \subseteq V$ be a two-dimensional $T$-invariant subspace. One option for $U$ is $U = \operatorname{span} \{ e_1, e_3 \}$. If $U \neq \operatorname{span} \{ e_1, e_3 \}$, we can find $u \in U$ which has the form 
$$u = a_1 e_1 + a_2 e_2 + a_3 e_3$$
with $a_2 \neq 0$. But then $Tu = a_2 e_1$ so $e_1 \in U$ and we see that we must have 
$$U = \operatorname{span} \{ a_1 e_1 + a_2 e_2 + a_3 e_3, e_1 \}.$$
Now, there is some redundancy in this description so let's try to eliminate it. Since $a_2 \neq 0$, we can divide the first vector by $a_2$ and get
$$U = \operatorname{span} \{ a_1' e_1 + e_2 + a_3' e_3, e_1 \} = \operatorname{span} \{ e_2 + a_3' e_3, e_1 \}.$$
As $a_3' \in \mathbb{F}_p$, we get a family of $p$ distinct $2$-invariant subspaces. Hence, the total number of $2$-invariant subspaces is $p + 1$ and they are given by


$$ \operatorname{span} \{ e_1, e_3 \}, \operatorname{span} \{ e_1, e_2 + \lambda e_3 \}_{\lambda \in \mathbb{F}}. $$
Since you have an explicit description of all the $1,2$-dimensional $T$-invariant subspaces, you can now use it to answer the question about which $T$-invariant subspaces can be complemented by a $T$-invariant subspace:


*

*The subspace $\operatorname{span} \{ e_1 \}$ has no two-dimensional $T$-invariant complement because all two-dimensional $T$-invariant subspaces contain $e_1$. All the other one-dimensional invariant subspaces $\operatorname{span} \{ e_1 + \lambda e_3 \}_{\lambda \in \mathbb{F}_p^{\times}}$ and $\operatorname{span} \{ e_3 \}$ can be complemented by $\operatorname{span} \{ e_1, e_2 + e_3 \}$. Hence, $p$ of the $p + 1$ subspaces can be complemented.

*The subspace $\operatorname{span} \{ e_1, e_3 \}$ has no one-dimensional $T$-invariant complement because all the one-dimensional $T$-invariant subspaces are subspaces of $\operatorname{span} \{ e_1, e_3 \}$. On the other hand, all other subspaces can be complemented. Hence, $p$ of the $p + 1$ subspaces can be complemented.

A: While this general type of question is fairly difficult, this particular question is easy to answer.
Since $T$, being nilpotent, can only act as $0$ on a $1$-dimensional $T$-invariant subspace, these subspaces are just the $1$-dimensional subspaces of the $2$-dimensional eigenspace $\ker(T)$ of $\lambda=0$, and there are $\frac{p^2-1}{p-1}=p+1$ such subspaces (they form a projective line $\def\P{\Bbb P}\P_1(F)$).
Similarly for a $2$-dimensional $T$-invariant subspace$~W$, $T$ acts as $0$ on the quotient $V/W$, which means that $W$ must contain the $1$-dimensional image $L$ of$~T$; such subspaces then correspond bijectively to the $1$-dimensional subspaces of the $2$-dimensional quotient space $V/L$, and again there are $p+1$ of them.
In each case there is one submodule that does not admit any complementary submodule, namely $L$ among the $1$-dimensional modules, and $\ker(T)$ among the $2$-dimensional modules. (And any of the remaining $1$-dimensional modules is complementary to any of the remaining $2$-dimensional modules.)
