# Four dimensional nilpotent real Lie algebras

I've heard that there are finitely many isomorphism classes of four dimensional nilpotent real Lie algebras. I could find two of them, the abelian algebra and the algebra with four generators $e_1,e_2,e_3,e_4$ such that $[e_1,e_2]=e_3$ and all the other brackets are zero (an extension of the Heisenberg algebra). Are there others four dimensional nilpotent real Lie algebras?

Yes, the abelian Lie algebra $K^4$, for a field $K$, then $\mathfrak{n}_3(K)\oplus K$, where $\mathfrak{n}_3(K)$ is the Heisenberg Lie algebra, and the filiform nilpotent Lie algebra $\mathfrak{n}_4(K)$, with basis $e_1.e_2,e_3,e_4$ and Lie brackets $[e_1,e_i]=e_{i+1}$ for $i=2,3$.
There are only finitely many ismorphicms classes of nilpotent Lie algebras of dimension $n<7$. In dimension $7$ there exist $1$-parameter families of mutually non-isomorphic nilpotent Lie algebras. A classification has been achieved for $n=7$ over the real and complex numbers, by many different authors.