Is the cartesian product of groups the product of a normal subgroup and its quotient group? I'm studying elementary group theory, and just seeing the ways in which groups break apart into simpler groups, specifically, a group can be broken up as the sort of product of any of its normal subgroups with the quotient group of that subgroup. So I wondered how you could do the inverse of that operation:


*

*Given two groups $A$ and $B$, construct a group $G$ which admits a normal subgroup $H$ isomorphic to $A$, such that $G/H$ is isomorphic to $B$.


I think I have a proof that the cartesian product $A \times B$ (with the usual component-wise operation) verifies (1), but since I'm just starting out I'm not totally confident in my construction. Furthermore, if I'm right, is this the only group up to isomorphism satisfying (1)?
Edit: I just noticed Proving the direct product D of two groups G & H has a normal subgroup N such that N isomorphic to G and D/N isomorphic to H, which seems to positively answer my question. In that case I'd like to draw attention to the follow up question above (uniqueness up to isomorphism).
 A: Yes, the direct product $A \times B$ satisfies the property, as you've noticed. But it's not unique up to isomorphism. For example, the dihedral group $D_n$ has a normal subgroup $H \simeq \mathbb Z/n \mathbb Z$, with $G/H \simeq \mathbb Z/2 \mathbb Z$, but $D_n$ is not isomorphic (for $n > 1$) to $\mathbb Z/2\mathbb Z \times \mathbb Z/n\mathbb Z$.
More generally, you're asking whether, given an exact sequence of the form $1 \to N \to G \to H \to 1$, is $G$ isomorphic to $N \times H$? The answer is no, as I've shown. Many counterexamples are provided by semidirect products (something you'll learn soon enough if you're studying elementary group theory).
For abelian groups, the concept of Ext functor allows one to classify all such extensions (given abelian groups $A,B$, "how many" groups $G$ are there with an exact sequence $0 \to B \to G \to A \to 0$ is given by $\mathrm{Ext}(A,B)$), but this is much more advanced.
A: You're correct that $A\times B$ satisfies (see here) the stated property, but in general it will not be the only such group. 
The simplest example is with $A=B=\mathbb{Z}/2\mathbb{Z}$, in which case $\mathbb{Z}/4\mathbb{Z}$ also has the desired property.
A: Your idea about the direct product working is true. The general idea you are looking for however is that of a semidirect product which refutes your claim of uniqueness in the general setting.
It's interesting to ask when the direct product is the only possibility and that can actually be answered by finding the group $\text{Ext}(B,A)$. This is know as an extension problem. We have that if $\text{Ext}(B,A)=1$ then $A\times B$ is the unique extension of $B$ by $A$.
I believe the converse is false however, but I can't think of an example at the moment. That is, there exist pairs $(B,A)$ such that $\text{Ext}(B,A)\neq 1$ but $B\times A$ is the unique (up to group isomorphism, not extension equivalence) extension of $B$ by $A$.
