TITLE: When metabelian?
QUESTION [8 upvotes]: I'm interested in knowing whether certain groups $G$ are metabelian.
In general, my groups $G$ have the following form: 
there is an exact sequence $1\to N\to G\to Q\to 1$ where 
$N$ is abelian, and $Q=K\rtimes H$ with $K$ and $H$ abelian.
Clearly $G$ is soluble of length 3. Moreover I know that the derived subgroup $G'$ centralizes $N$ and that the derived subgroup $Q'$ centralizes $K$.
My obvious idea is to change the above exact sequence obtaining an abelian group $A$ (containing $G'$) such that $G/A$ is abelian.
Can someone please give me a hand on how to proceed?
Thanks in advance.

REPLY [3 votes]: $G=\operatorname{SL}(2,3)$ has $N=Z(G)$ of order 2, $K=Q_8/N$ elementary abelian of order 4, and $H$ of order 3. $G'$ centralizes $N=Z(G)$, and of course $Q'=K$ centralizes $K = Q'$, since $K$ is abelian. However, $G$ is not metabelian.
There are many other counterexamples, so I don't see how to fix it.
Also, your “I know” refers to extra hypotheses: $S_4$ has the form specified in your exact sequence, but $G'$ does not centralize $G''$