My question pertains to Exercise 24. My thinking was that if $T$ is diagonalizable with a particular eigenbasis, say: $$\{ \, x_1, x_2 \ldots x_n \ldots \, \}$$ Then, any nontrivial subspace is spanned by some subset of the eigenbasis. So, I don't see why the condition of $T$-invariance is needed. Can you kindly explain?
The proof using the hint given is as follows:
Suppose that $W$ is a nontrivial $T$-invariant subspace of $V$. Any $w \in W$ can be written as $w = a_1x_1 + a_2x_2 \ldots + a_nx_n$. If we group together the eigenvectors corresponding to the same eigenvalue, we have: $$w = y_1 + y_2 \ldots + y_m$$ The spanning set of $\{ \, y_1, y_2 \ldots y_m \, \}$ is finite dimensional and $T$-invariant, so the result from Exercise 23 applies; $w$ is a linear combination of eigenvectors of $T$. This proves that $W$ is spanned by eigenvectors of $T$, and from the spanning set we can pick out a basis for $T|_W$.