Let $H$ be a nilpotent group of class $a$ and $K$ a nilpotent group of class $b$. If $H$ and $K$ are normal subgroups of a group $G$, then we know that $HK$ is a normal nilpotent subgroup of $G$ and $HK$ has class $\leq a+b$.
Can we always find examples where this upper bound is attained? That is: given $a$ and $b$, can we always find groups $H$, $K$ and $G$ such that:
- $H$ is nilpotent of class $a$
- $K$ is nilpotent of class $b$
- $H$ and $K$ are normal subgroups of $G$, and $HK$ is nilpotent of class $a+b$
I think this is possible when $b = 1$. Let $G = D_{2^{a+2}} = \langle x, y: x^2 = y^{2^{a+1}} = 1, xyx^{-1} = y^{-1} \rangle$ be the dihedral group of order $2^{a+2}$. Let $H = \langle x, y^2 \rangle \cong D_{2^{a+1}}$ and $K = \langle y \rangle$. Then $H$ and $K$ are normal subgroups of $G$, $H$ has class $a$, $K$ has class $1$ and $HK = G$ has class $a+1$.
Not always. Take $H,K$ abelian, ${\rm gcd}(|H|,|K|)=1$. Then $H\cap K=1$, so $HK$ is abelian also.
(This is true also for nilpotent groups of coprime orders.)
Addendum: This is not complete answer (thank to Jack Schmidt).