Prove $T$ has at most two distinct eigenvalues The question is from Axler's Linear Algebra text. The $\mathcal{L}(V)$ stands for the space of linear operators on the vector space $V$.


Suppose that V is a complex vector space with dim $V=n$ and $T \in \mathcal{L}(V)$ is such that
    $$\text{null} \ T^{n-2} \neq \text{null} \ T^{n-1} 
$$
    Prove that $T$ has at most two distinct eigenvalues.


I fist thought of solving this by contradiction. That is, I thought, suppose there were three distinct eigenvalues. Then, there would be an equation like 
$$(x-\lambda_1I)^{d_1}(x-\lambda_2I)^{d_2}(x-\lambda_3I)^{d_3}
$$
where the $d_i$'s are positive integers that sum to dim $V$. Call this polynomial $q(x)$ the characteristic poly. Thus, by Cayley's theorem,
$$q(T)=(T-\lambda_1I)^{d_1}(T-\lambda_2I)^{d_2}(T-\lambda_3I)^{d_3}=0
$$
Then multiplying out and setting dim $V = d_1+d_2+d_3 = n$, I could then get a poly with the various powers of $T$ (this is a little tricky to write down). In particular, I wanted to see the powers $n-2$ and $n-1$. I thought, ok, so now, rewrite the poly in terms of each of these and using the fact that $\text{null} \ T^{n-2} \neq \text{null} \ T^{n-1}$ you get some vector $v \in V$ such that,
$$T^{n-1}v = (\text{poly}_1)v = 0
$$ 
but 
$$T^{n-2}v = (\text{poly}_2)v = k \neq 0
$$
I can think of some interesting things about $(\text{poly})_1$ and $(\text{poly})_2$, in particular, each has the monic term $T^n$. At this point, I'm not sure any of this helped.
Well, anyways, I'm sure someone has a much better approach! Thanks in advance to anyone who read this. 
 A: Suppose $T(v) = \lambda v$ where $\lambda \ne 0$.
Then $v$ is not part of the nullspace of $T^{n-1}$.  Take a basis $\mathscr B_1$ for the nullspace of $T^{n-1}$ and add $v$ to that basis.  Call this linearly independent set $\mathscr B$.
We want to prove that $\mathscr B$ is a basis for $V$.
$T$ is nilpotent on $\operatorname{span}( \mathscr B_1 )$, so $T^{|\mathscr B_1|} = 0$  But $T^{n-2} \ne 0$, so $|\mathscr B_1| > n-2$.
So $\mathscr B$ is a linearly independent set of order $n$ and is thus a basis.  The only eigenvalue for a nilpotent matrix is $0$ (use a change of basis to make the matrix upper triangular), so the only eigenvalues for $T$ are $0$ and $\lambda$.
A: Hints: consider the chain of subspaces $\{0\}=\ker T^0\subseteq\ker T\subseteq \ker T^2\subseteq \ldots...$ and think about what happens if $\ker T^{k-1}=\ker T^k$ at some point. Then prove that the assumption $\mbox{null} T^{n-2}\neq \mbox{null} T^{n-1}$ yields $\mbox{null} T^{n-1}=n-1$ or $\mbox{null} T^{n-1}=n$. In the latter case $T^{n-1}=0$, so it is easy to conclude. In the former case, take a basis of $\ker T^{n-1}$, complete it into a basis of $V$, and consider the matrix of $T$ in the latter.
Note: there is nothing special about $\mathbb{C}$ with this approach. It could be over any field.
