Let $\mathbb{K}$ be a field, $1\leq n\in \mathbb{N}$ and let $V$ be a $\mathbb{K}$-vector space with $\dim_{\mathbb{R}}V=n$.
Let $\phi :V\rightarrow V$ be a linear map.
I want to show that the following two statements are equivalent:
There is a basis $B$ of $V$ such that $M_B(\phi)$ is an upper triangular matrix.
There are subspaces $U_1, \ldots , U_n\leq_{\mathbb{K}}V$ such that $U_i\subset U_{i+1}$ and $U_i$ is $\phi$-invariant.
Could you give me a hint for that?
Hint: If $\mathcal B = \{v_1,\dots,v_n\}$ is a basis of $V$ and $M_{\mathcal B}(\phi)$ is upper-triangular, then the subspaces $U_i = \operatorname{span}\{v_1,\dots,v_i\}$ are invariant subspace of $\phi$.