# Triangular matrices T invariant subspaces

Let V be a vector space with dimension n and let T: V $\rightarrow$ V be a linear operator. I need to show T can be written as a triangular matrix iff there exist T-invariant subspaces $$W_1 \subset W_2 \subset ... \subset W_n=V$$ with $dim W_i = i$ $(1 \le i \le n)$

I suppose that {$v_1, ..., v_n$} are a basis for V then $Tv_j \in span${$v_1, ..., v_j$} $\subset$span{$v_1, ..., v_n$} for all $j\le n$.

I am not sure how to proceed

Hint: For $\Rightarrow$: Choose a basis $\{v_1,...,v_n\}$ in which $T$ is triangular and show that $W_i=span(v_1,...,v_i)$ satisfies the conditions you want.

For $\Leftarrow$: The conditions on $W_i$ imply that $V=span(v_1,...,v_n)$ such that $W_i=span(v_1,...,v_i)$ (why?). Represent $T$ in this basis and use the fact that the $W_i$'s are $T$-invariant to show that the matrix is triangular.