Exercise 5.A.10(b) Find all invariant subspaces of $T$ ("Linear Algebra Done Right 3rd Edition" by Sheldon Axler) I am reading "Linear Algebra Done Right 3rd Edition" by Sheldon Axler.
The following exercise is Exercise 5.A.10 on p.139.

Define $T\in\mathcal{L}(\mathbb{F}^n)$ by $$T(x_1,x_2,x_3,\dots,x_n)=(x_1,2x_2,3x_3,\dots,nx_n).$$
(a) Find all eigenvalues and eigenvectors of $T$.
(b) Find all invariant subspaces of $T$.

I solved (a), but I cannot solve (b).
Please tell me a solution for (b).

(a)
Assume that $\lambda\in\mathbb{F}$ is an eigenvalue of $T$.
Then there exists a non-zero vector $(x_1,x_2,x_3,\dots,x_n)\in\mathbb{F}^n$ such that $T(x_1,x_2,x_3,\dots,x_n)=(x_1,2x_2,3x_3,\dots,nx_n)=\lambda(x_1,x_2,x_3,\dots,x_n).$
Assume that $x_i\neq 0$.
If $\lambda\notin\{1,2,3,\dots,n\}$, then $ix_i=\lambda x_i$.
So, $(i-\lambda)x_i=0$.
Since $x_i\neq 0$, $i-\lambda=0$.
So, $\{1,2,3,\dots, n\}\ni i=\lambda$.
This is a contradiction.
So, $\lambda\in\{1,2,3,\dots,n\}.$
Conversely, if $\lambda\in\{1,2,3,\dots,n\}$, then $T(e_\lambda)=\lambda e_\lambda$, where $0\neq e_\lambda=(y_1,y_2,y_3,\dots,y_n)$ ( $y_i=\delta_{i\lambda}$).
So, $\lambda$ is an eigenvalue of $T$.
Let $\lambda\in\{1,2,3,\dots, n\}$.
We want to find all $(x_1,x_2,x_3,\dots,x_n)$ such that $0\neq (x_1,x_2,x_3,\dots,x_n)$ and $T(x_1,x_2,x_3,\dots,x_n)=(x_1,2x_2,3x_3,\dots,nx_n)=\lambda(x_1,x_2,x_3,\dots,x_n)$.
Assume that $i\neq\lambda$.
Then, the solution of the equation $ix_i=\lambda x_i$ is $x_i=0$ because $i\neq\lambda$.
Assume that $i=\lambda$.
Then, the solutions of the eqution $ix_i=\lambda x_i$ are arbitrary elements of $\mathbb{F}$.
So, the set of all the eigenvectors of $T$ corresponding to $\lambda$ is $\{te_\lambda\mid t\in\mathbb{F}-\{0\}\}$, where $e_\lambda=(y_1,y_2,y_3,\dots,y_n)$ ( $y_i=\delta_{i\lambda}$).
My attempt is here:
(b)
Let $U$ be an invariant subspace under $T$.
Let $i\in\{1,2,3,\dots, n\}$.
If there exists $(x_1,x_2,x_3,\dots,x_n)\in U$ such that $x_i\neq 0$, then $\frac{y}{x_i}(x_1,x_2,x_3,\dots,x_n)\in U$ for any element $y\in\mathbb{F}$ because $U$ is a subspace of $\mathbb{F}^n$.

 A: I see you've already figured out the eigenspaces. Now what are the invariant subspaces?
Let $U$ be an invariant subspace, and let $T_U:U\to U$ be the restriction of $T$ to $U$.
Prove the following three statements:

*

*If none of the roots of the characteristic polynomial of $T_U$ is repeated, then $U$ is a direct sum of eigenspaces of $T_U$ and every eigenspace of $T_U$ is one-dimensional.

*$\text{char}_{T_U}(x)$ divides $\text{char}_T(x)$.

*Every eigenspace of $T_U$ is an eigenspace of $T$.

A: Sammy Black, angryavian, Chris Sanders, thank you very much for your comments and answer.
But I cannot understand why the answers by angryavian and Chris Sanders are correct.
Anyway I got to know the answer of (b) and I tried to solve (b) again.
Is my solution ok?
Let $U$ be an invariant subspace of $T$.
Let $S:=\{i\in\{1,\dots,n\}\mid (x_1,x_2,\dots,x_n)\in U\text{ for some }x_1,x_2,\dots,x_n\in\mathbb{F}\text{ and }x_i\neq 0\}$.
Note that if $v\in U$ and $i\in\{1,\dots,n\}-S$, then the $i$th slot of $v$ is $0$.
Suppose that $1\leq i_1<i_2<\dots<i_k\leq n$ and $S=\{i_1,i_2,\dots,i_k\}$.
Let $e_{i_j}\in\mathbb{F}^n$ be the $n$-tuple with $1$ in the $i_j$th slot and $0$ in all other solts.
We prove that $e_{i_1},e_{i_2},\dots,e_{i_k}$ are elements of $U$.
Let $x_{i_k}\neq 0$ and $(0,\dots,0,x_{i_1},0,\dots,0,x_{i_2},\dots,x_{i_k},0,\dots,0)\in U$.
Then, since $U$ is an invariant subspace of $T$,
$T(0,\dots,0,x_{i_1},0,\dots,0,x_{i_2},\dots,x_{i_k},0,\dots,0)-i_1(0,\dots,0,x_{i_1},0,\dots,0,x_{i_2},\dots,x_{i_k},0,\dots,0)=(0,\dots,0,0,0,\dots,0,(i_2-i_1)x_{i_2},\dots,(i_k-i_1)x_{i_k},0,\dots,0)\in U.$
Similarly,
$T(0,\dots,0,0,0,\dots,0,(i_2-i_1)x_{i_2},\dots,(i_k-i_1)x_{i_k},0,\dots,0)-i_2(0,\dots,0,0,0,\dots,0,(i_2-i_1)x_{i_2},\dots,(i_k-i_1)x_{i_k},0,\dots,0)=(0,\dots,0,0,0,\dots,0,0,\dots,(i_k-i_2)(i_k-i_1)x_{i_k},0,\dots,0)\in U.$
We continue this and we finally get
$(0,\dots,0,0,0,\dots,0,0,\dots,(i_k-i_{k-1})\cdots(i_k-i_2)(i_k-i_1)x_{i_k},0,\dots,0)\in U.$
Since $(i_k-i_{k-1})\cdots(i_k-i_2)(i_k-i_1)x_{i_k}\neq 0$, we get  $e_{i_k}\in U.$

Let $x_{i_{k-1}}\neq 0$ and $(0,\dots,0,x_{i_1},0,\dots,0,x_{i_2},\dots,x_{i_k},0,\dots,0)\in U$.
Then, $(0,\dots,0,x_{i_1},0,\dots,0,x_{i_2},\dots,x_{i_k},0,\dots,0)-x_{i_k}e_{i_k}=(0,\dots,0,x_{i_1},0,\dots,0,x_{i_2},\dots,x_{i_{k-1}},0,\dots,0)\in U.$
Then, by similar method, we get $e_{i_{k-1}}\in U$.

We continue this and we finally get $e_{i_1},\dots,e_{i_k}\in U.$

Remember that if $v\in U$ and $i\in\{1,\dots,n\}-S$, then the $i$th slot of $v$ is $0$.
So, $U=\mathbb{F}e_{i_1}+\dots+\mathbb{F}e_{i_k}$.
