http://linearalgebras.com/5A.html
It is question 10 in this website, with solution. But acutully I cannot follow the proof of (b) from the the statement involving $\lambda$. And the author also says that he is not satisfied with this solution.
So could someone explain his proof? Or could someone find a better solution?
Thanks so much.
When $T$ leaves invariant a subspace $W$ of dimension $k$, then the restriction $T_{|W}$ is a linear map which in ${\Bbb C}$ you may triangularize to a $k\times k$ matrix. Diagonal elements in this triangularization are eigenvalues of $T$ thus belongs to $\{1,...,n\}$. But as evals are distinct so are the $k$ diagonal elements and the restriction $T_{|W}$ is then diagonalizable in any field ${\Bbb F}$ and $W$ is the span of the corresponding eigenvectors. The diagonal elements is a subset of $\{1,...,n\}$ of cardinality $k$ and you may compute the number of such choices.