I am currently working through J-P. Serre's Complex Semisimple Lie Algebras. Progress is slow but steady — I'd never heard of a Lie algebra before starting on this book.
On the second page, the following example of a Nilpotent Algebra is given:
Let $V$ be a vector space of finite dimension $n$. A flag $D = (D_i)$ of $V$ is a descending series of vector subspaces
$$V = D_0 \supset D_1 \supset \cdots \supset D_n = 0$$
of $V$ such that $\operatorname{codim}(D_i) = i$.
Let $D$ be a flag, and let $n(D)$ be the Lie subalgebra of $\operatorname{End} (V) = \mathfrak{gl}(V)$ consisting of the elements $x$ such that $x(D_i) \subset D_{i+1}$. One can verify that $n(D)$ is a nilpotent Lie algebra of class $n-1$.
I'm struggling on base 1 with this one — I can't work out why this should be a subalgebra at all. I understand that what I'm trying to show is that $[n(D),n(D)] \subset n(D)$, because that's what I understand to be the definition of a subalgebra with the usual Lie bracket, but I can't see how this is immediately true.
If $X,Y\in n(D)$, then, for each $i$, $X(D_i)\subset D_{i+1}$ and $Y(D_i)\subset D_{i+1}$. But then $X\bigl(Y(D_i)\bigr)\subset D_{i+2}$ and $Y\bigl(X(D_i)\bigr)\subset D_{i+2}$. Therefore, $(XY-YX)(D_i)\subset D_{i+2}$.