A matrix with characteristic polynomial that can bewritten as product of linear factors is similar to an upper triangular matrix Prove that if $A\in M_{n}\left(\mathbb{F}\right)$ matrix with a characteristic polynomial that can be written as a product $\left(x-\lambda_{1}\right)^{r_1}\dots\left(x-\lambda_{k}\right)^{r_k}$ of linear polynomials, then $A$ is similar to an upper triangular matrix. 
My attempt:
Well first I showed that if $\lambda$ is an eigenvalue of $A$ then it can be written as
$P^{-1}AP=\left(\begin{matrix}\lambda & * & \cdots & *\\
0 & \ulcorner &  & \urcorner\\
\vdots &  & B\\
0 & \llcorner &  & \lrcorner
\end{matrix}\right)$
for some invertible $P \in M_{n}\left(\mathbb{F}\right)$.
Then by induction on n I showed that for a $2\times 2$ matrix the claim holds using the above lemma.
I've assumed correctness for some $n$.
And then I tried proving it for $n+1$:
I used the lemma for the $\left(n+1\right) \times \left(n+1\right)$ matrix (because we assume that its characteristic polynomial can be reduced).
Then I tried using the induction hypothesis on the inner $B$ of the $\left(n+1\right) \times \left(n+1\right)$ matrix. So I've concluded that there's some matrix $Q\in M_{n}\left(\mathbb{F}\right)$ so that $Q^{-1}BQ$ is upper triangular.
The next step was to use it for my current matrix so I've decided to cunstruct the following matrices:
$ Q^{'}=\left(\begin{matrix}1 & 0 & \cdots & 0\\
0 & \ulcorner &  & \urcorner\\
\vdots &  & Q\\
0 & \llcorner &  & \lrcorner
\end{matrix}\right) $ and $ Q^{'-1}=\left(\begin{matrix}1 & 0 & \cdots & 0\\
0 & \ulcorner &  & \urcorner\\
\vdots &  & Q^{-1}\\
0 & \llcorner &  & \lrcorner
\end{matrix}\right) $
So that now I can claim that 
$Q^{'-1}\left(\begin{matrix}\lambda & * & \cdots & *\\
0 & \ulcorner &  & \urcorner\\
\vdots &  & B\\
0 & \llcorner &  & \lrcorner
\end{matrix}\right)Q^{'} = \left(\begin{matrix}\lambda & * & \cdots & *\\
0 & \ulcorner &  & \urcorner\\
\vdots &  & Q^{-1}BQ\\
0 & \llcorner &  & \lrcorner
\end{matrix}\right) $  
which is essentially an upper triangular matrix. 
But I'm having hard time determining whether it's correct at all because to be honest a lot of indices confuse me :) and I would really like to know whether my proof is correct and is there a more solid\clear\intuitive way to explain the last conclusion.
Edit 1: I'll try to make my question clearer: We are usually required to be extremely rigorous, so the $Q^{'-1} P^{-1} A P Q^{'}$ part needs to be explained as well but I can't seem to find a better explanation then something like "well it has identity in the upper left corner so that's what happens" but I can't figure a nice way of writing this mathematically without babbling too much.
 A: Just so that this question does not remain unanswered, I'll paraphrase the proof given in the question in a less technical way.
A matrix $A$ is similar to an upper triangular matrix if and only if for the linear operator $\phi$ of $V=F^n$ defined by $A$ there exist a chain of $\phi$-stable subspaces
$$
  \{0\}=V_0\subset V_1\subset V_2\subset\cdots\subset V_n=V
$$
where $\dim(V_i)=i$ for all $i$. This is so because if $\def\B{\mathcal B}\B=[b_1,\ldots,b_n]$ is any basis, then $\operatorname{Mat}_\B(\phi)$ is upper triangular if and only if each of the subspaces $\langle b_1,\ldots,b_d\rangle$ is $\phi$-stable, for $d=1,2,\ldots,n$.
Now a proof that if the characteristic polynomial $\chi_A$ splits into a product of linear factors $X-\lambda_i$, then $A$ is similar to an upper triangular matrix (by the way, the converse is obvious). Proceed by induction on $n=\dim V$, the case $n=0$ being obvious. Now let $n>0$, and let $X-\lambda$ be one of the factors of $\chi_A$, then there is some eigenvector $v$ of$~A$ for $\lambda$. Put $V_1=\langle v\rangle$, then since $V_1$ is $\phi$-stable, $\phi$ induces a linear operator $\overline\phi$ of the quotient space $V/V_1$, which is of dimension$~n-1$. The characteristic polynomial of $\overline\phi$ is $\chi_A/(X-\lambda)$, so it also splits into a product of linear factors. Then by induction there is a chain of $\overline\phi$-stable subspaces
$$
  V_1/V_1=W_0\subset W_1\subset W_2\subset\cdots\subset W_{n-1}=V/V_1
$$
with $\dim W_i=i$ for all $i$. Being a subspace of the quotient space 
we can write $W_i=V_{i+1}/V_1$ for a uniquely defined subspace $V_{i+1}$ of$~V$, which has dimension $i+1$, and is $\phi$-stable (because $W_i$ is $\overline\phi$-stable). Together with $V_0=\{0\}$ this provides our chain
of subspaces that shows that $A$ is similar to an upper triangular matrix, completing the proof.
