# Invariant subspaces of a linear transformation with distinct eigenvalues

This is a more general problem than the one in this post. More precisely, assume that $T$ is a linear transformation of a vector space $V$ of dimension $n$ and that $T$ has $n$ distinct eigenvalues. How many invariant subspaces of T?

Here is my try: It is clear that if $v_1,\dots, v_n$ are eigenvectors corresponding to $n$ distinct eigenvalues of $T$, then these vectors form a basis of $V$ and any subset of this basis generates an invariant subspace of $f$.

Now I want to show that any invariant subspace of $f$ should be realised by that way. Suppose that $W$ is such a subspace of dimension $k$. If $k>\frac{n}{2}$ then by the dimension formula, $W$ has nontrivial intersection with one of spaces generated by $k$ vectors among $v_i$, and then using the proposition stated in the link above, we are done.

However I do not have any idea in the case $k\leq \frac{n}{2}$. (The case $k=1$ is easy, but for $k>1$ it seems to be complicated.)

Can anyone help me? Thanks a lot!

If $W$ is an invariant subspace of $T$ then $T$ induces a transformation $T/W$ of $V/W$, and its restriction $T|_W$ to $W$ is a transformation of $W$.
By extending a basis for $W$ to a base of $V$, one then finds that the characteristic polynomial $\chi_T$ factors as $\chi_{T|_W} \chi_{T/W}$
Now, if $T$ has $n$ distinct eigenvalues this means that $\chi_T$ has $n$ distinct roots. Since $\chi_{T|_W}$ is a factor of degree $k$, it also has $k$ distinct roots, so there is a basis of $W$ made of eigenvectors of $T|_W$. Since eigenvectors of $T|_W$ are also eigenvectors of $T$, $W$ has a basis made of eigenvectors of $T$.
I don't think the problem is more general than the post you pointed to. If $T$ has $n$ distinct eigenvalues, then there is an eigenbasis for $V$, say $v_1, \ldots, v_n$. If $W$ is a $T$-invariant subspace, consider the maximal set $v_1, \ldots, v_k$ of these vectors that are in $W$. If these do not span $W$, look at any $w = a_1v_1 + \ldots + a_n v_n$ in $W$ that is not spanned by $v_1, \ldots v_k$. Replace $v_1, \ldots, v_n$ with $a_1 v_1, \ldots, a_nv_n$ and proceed the same way as in the answer to that post.