I'm looking for a proof of the following statement:
Let $G$ be a group, and let $G_{1}$, $G_{2}$ be subgroups of $G$, such that:
$G_{1}$, $G_{2} \triangleleft G$;
$G_{1} \cap G_{2} = \{ e \}$
$G_{1}G_{2} = G$.
Show that $G \cong G_{1} \times G_{2}$.
I know the variant of the theorem with $g_{1}g_{2} = g_{2}g_{1}$ as a condition, for all $g_{1} \in G_{1}$, $g_{2} \in G_{2}$, instead of $G_{1}$, $G_{2} \triangleleft G$.
I know from conditions 2. and 3. that every $g \in G$ can be represented uniquely as a product $g = g_{1}g_{2}$, $g_{1} \in G_{1}$, $g_{2} \in G_{2}$, so I know that $g \mapsto (g_{1}, g_{2})$ is a bijection, but I can't prove that it's a homomorphism. Is this the right way to go, or do I need to figure out another isomorphism?
Maybe it's better to consider the map $\varphi :G_1\times G_2\to G$ such that $\varphi((g_1,g_2))=g_1 g_2$ and prove that is an homomorfism.
To prove that is an homomorfism consider that $g\cdot h=h\cdot g\forall g\in G_1\forall h\in G_2$.