Let $G$ be a group with subgroups $P$ and $Q$. Assume $Q$ is normal.
Define $G$ to be the semi direct product of $P$ and $Q$ if $PQ=\{pq: p\in P,q\in Q\}=G$ and $P\cap Q=\{e\}$, where $e$ is the identity element in $G$.
Let $\iota : P\rightarrow G$ be the inclusion map $\iota(p)=p$ and $\phi : G\rightarrow G/Q$ be the natural surjection $\phi(g)=gQ$.
I'm trying to prove that $G$ is the semi direct product of $P$ and $Q$ if and only if the composition $\phi\circ \iota : P\rightarrow G/Q$ is an isomorphism, but I'm struggling to prove that $PQ=G$. Obviously, $PQ\subseteq G$, so all I need to prove is that $G\subseteq PQ$, but I can't see how to do it. I would be very thankful for any tips or hints that would lead me in the right direction.