Showing that $G/(H\cap K)\cong (G/H)\times (G/K)$

Suppose that $H$ and $K$ are normal subgroups of a group $G$ such that $HK=G$. I need to show that $G/(H\cap K)\cong (G/H)\times (G/K)$.

So from the second isomorphism theorem we have that:

$HK/H\cong H/(H\cap K)$ which gives that $G/H\cong H/(H\cap K)$

$HK/K\cong K/(H\cap K)$ which gives that $G/K\cong K/(H\cap K)$

So we must now show that:

$H/(H\cap K)\times K/(H\cap K)\cong G/(H\cap K)$

So consider the map $\theta:H/(H\cap K)\times K/(H\cap K)\rightarrow G/(H\cap K)$ such that $\theta(h(H\cap K)\times k(H\cap K))=hk(H\cap K)$

Now this is a homomorphism and is surjective. To check injectiviy we see that if:

$\theta(h_1(H\cap K)\times k_1(H\cap K))=\theta(h_2(H\cap K)\times k_2(H\cap K))$ then we have that:

$(h_1k_1(H\cap K))=(h_2k_2(H\cap K))$ so that $(h_1k_1)(h_2k_2)^{-1}(H\cap K)=(H\cap K)$ which gives that $h_1k_1(H\cap K)=h_2k_2(H\cap K)$ So we are done.

Is the above correct?

Thanks for any help


To show $\,\theta\,$ is injective it's simpler, imo, to consider its kernel:

$$x\in H\,,\,y\in K\,\;\;:\;\;\,(x(H\cap K),y(H\cap K))\in\ker\theta\Longrightarrow$$

$$\Longrightarrow xy\in H\cap K \Longrightarrow\begin{cases}xy=h\in H\Longrightarrow y=x^{-1}h\in H\\xy=k\in K\Longrightarrow x=ky^{-1}\in K\end{cases}\Longrightarrow$$

$$\Longrightarrow x\in H\cap K\,,\,y\in H\cap K\Longrightarrow,(x(H\cap K),y(H\cap K))=(1,1)\Longrightarrow \ker\theta=1$$