(Levi) Decomposition of group of upper triangular matrices with block matrices on its diagonal into two subgroups Our teacher told us something about the decomposition of the subgroup $G$ of $GL_n(K)$ (invertible matrices with coefficients in a field $K$) of matrices of the form :
$$
        \{ \begin{pmatrix}
        \begin{bmatrix} & & \\ & & \end{bmatrix} & * & * \\
        0 & ... & * \\
        0 & 0 & \begin{bmatrix} & & & \\ & & & \\ & & & \end{bmatrix} \\
        \end{pmatrix} \}
$$ (i.e. the subgroup that consists of all the invertible matrices with a sequence of block matrices on its diagonal (where the size of each block is set) and other values in the upper part) into two subgroups $H$ and $N$, respectively of the form :
$$
        \{\begin{pmatrix}
        \begin{bmatrix} & & \\ & & \end{bmatrix} & 0 & 0 \\
        0 & ... & 0 \\
        0 & 0 & \begin{bmatrix} & & & \\ & & & \\ & & & \end{bmatrix} \\
        \end{pmatrix}\} \ and \ \{
        \begin{pmatrix}
        1 & * & * \\
        0 & ... & * \\
        0 & 0 & 1 \\
        \end{pmatrix} \}
$$ 
with the second one being normal in $G$, so that we have $NH = G$ (and $N \cap H = \{e\}$, which would lead us to an isomorphism of $G$ with the semidirect product of $N$ and $H$)
Also, I don't know if the block matrices must all be square matrices. There could be some mistakes on what I said though. Feel free to correct me.
I'm looking for a proof of this statement (so any reference would be okay).
Our teacher told us it was linked to the group $GL(V)$ (where $V$ is a finite dimensional vector space over $K$) and the two following subgroups : 
If we denote $0 = V_0 \subseteq V_1 \subseteq V_2 \subseteq ... \subseteq V_r \subseteq V$ a flag of subspaces of $V$, the subgroups are $P = \{g \in GL(V) \mid g(V_i)\subseteq V_i \ \forall i \}$ and $U = \{g \in GL(V) \mid gv - v \in V_{i-1} \ \forall v \in V_i \ \forall i \geq 1 \}$. Some basic results we have is that $P \leq N_{GL(V)}(U)$ and $U \leq P$, where $N_{GL(V)}$ denotes the normalizer and $\leq$ the relation of being a subgroup.
Thank you.
 A: I was going to write an answer explaining the deep ideas behind this decomposition, but I realized it would end up way too long.  It's not difficult to check that $H \cap N =  1$ and $N$ is normal in $G$; the trouble is showing rigorously that the product set $HN$ is equal to all of $G$.  I know a way to do this using algebraic geometry when the field is algebraically closed, but hopefully someone else will just post a more elementary proof.
I'll post what I have written, which is an explanation of how the subgroup $H$ arises naturally from combinatorial data associated with $\textrm{GL}_n$.  Instead of an arbitrary field $K$, I'm working with an algebraically closed field $\Omega$, such as $\mathbb{C}$.  Although what I ended up saying seems to work for any field.  
Let $B$ denote the subgroup of $\textrm{GL}_n(\Omega)$ consisting of upper triangular matrices.  Let $T$ denote the subgroup of $\textrm{GL}_n(\Omega)$ consisting of diagonal matrices.
Define homomorphisms $e_1, ... , e_n: T \rightarrow \textrm{GL}_1(\Omega)$ by the formula
$$e_i (\begin{pmatrix} x_1 & & \\\ & x_2 & \\ & & \ddots \\ & & & x_n\end{pmatrix} )= x_i$$
Define $a \cdot e_i(x) = e_i(x^a)$ (for $x \in T$ and $a$ an integer), and $(e_i + e_j)(t) = e_i(t)e_j(t)$.  Then we can talk about the abelian group $X(T)$ consisting of all homomorphisms of the form $a_1 e_1 + \cdots + a_ne_n: T \rightarrow \textrm{GL}_1(\Omega)$ ($a_1, ... , a_n \in \mathbb{Z}$).  It is a free abelian group with basis $e_1, ... , e_n$.
Consider the finite subset 
$$\Delta = \{e_1 - e_2, ... , e_{n-1} - e_n \}$$
To each subset $\Theta \subseteq \Delta$, let 
$$S_{\Theta} = \bigcap\limits_{\alpha \in \Theta} (\textrm{Ker } \alpha)$$
This is a subgroup of $T$.  For example, if $\Theta = \{e_1 - e_2, e_{n-1}-e_n\}$, then $S$ consists of all invertible diagonal matrices of the form
$$S_{\Theta} = \begin{pmatrix} x \\ & x  \\ &  & x_3 \\  &&&\ddots\\ & && & x_{n-2} \\ & & & & & z \\ &  & && & & z \end{pmatrix}$$ 
for $x, x_3, ... , x_{n-2}, z \in \Omega$.
Let $\alpha_i = e_i - e_{i+1}$ for $1 \leq i \leq n -1$.  Think of $\alpha_1, ... , \alpha_{n-1}$ as distinguished points on a line segment starting at $\alpha_1$ and ending at $\alpha_{n-1}$.  To give a subset of $\Delta$ is to break up this line segment at some of the points $\alpha_i$, leaving unbroken segments of lengths $m_1, ... , m_t$ with $m_1 + \cdots + m_t = n$.  Then the centralizer $M_{\Theta}$ of $S_{\Theta}$ in $\textrm{GL}_n$, that is 
$$M_{\Theta} = \{ x \in \textrm{GL}_n(\Omega) : xs = sx \textrm{ for all } s \in S_{\Theta} \}$$
will consist of block diagonal invertible matrices of sizes $m_1, ... , m_t$, that is
$$M_{\Theta} = \{ \begin{pmatrix} A_1 \\ & A_2 \\ && \ddots \\&&&  A_t \end{pmatrix} : A_i \in \textrm{GL}_{m_i}(\Omega) \}$$
This is very easy to check!  For example, if $\Theta = \Delta - \{e_{n-2} - e_{n-1} \}$, then
$$M_{\Theta} =  \{ \begin{pmatrix} A_1 \\ & A_2 \end{pmatrix} : A_1 \in \textrm{GL}_{n-2}(\Omega), A_2 \in \textrm{GL}_2(\Omega) \}$$
These subgroups $M_{\Theta}$ are exactly the block diagonal groups you described!  And they are in one to one order preserving correspondence with subsets of $\Delta$.  For example, $M_{\Delta} = \textrm{GL}_n(\Omega)$, and $M_{\emptyset} = T$.
This is half of the story, the other half are those subgroups with $1$s on the diagonal.
