Solution (source code)

= Solution

Differentiating the affine block form gives
$$
\boxed{L(\operatorname{Aff}_n(\mathbb C))=
\left\{\begin{pmatrix}B&u\\0&0\end{pmatrix}:B\in M_n(\mathbb C),\ u\in\mathbb C^n\right\}}.
$$
Conversely the exponential of such a block matrix has bottom row $(0,1)$ and invertible upper-left block $e^{tB}$, so it remains in the <affine group>. Its <commutator> corresponds to
$$
[(B,u),(C,v)]=([B,C],Bv-Cu).
$$
The space is closed under multiplication by $i$ and its bracket is complex bilinear. Thus it is a \b[complex <Lie algebra> of dimension $n^2+n$], and its real dimension is $2n^2+2n$.