If group $G$ has two normal subgroups $H$ and $K$ satisfying $H\cap K=\{1\}$ and $G=HK$, how to prove that $G$ is isomorphic to $H\times K$?
Since the factoring of any $g\in G$ as product $hk$ is unique under given conditions, I tried to prove that the map $\phi:G\ni g\mapsto (h,k)\in H\times K$ is the isomorphism. I can show that $\phi$ is a bijection. Next, I need to show it preserves group operation. Assuming $\forall g_1,g_2\in G$, $g_1=h_1k_1$ and $g_2=h_2k_2$ (the factoring is unique), we have $g_1g_2=h_1k_1h_2k_2$. But $\phi(g_1)=(h_1,k_1),\phi(g_2)=(h_2,k_2)$, so in product group $H\times K$, the operation $\phi(g_1)\phi(g_2)=(h_1h_2,k_1k_2)$. Its pre-image of $\phi$ in $G$ should be the product $h_1h_2k_1k_2$. So we must establish $h_1k_1h_2k_2=h_1h_2k_1k_2$, which is equivalent to $k_1h_2=h_2k_1$. But I cannot prove this commutative relation based on the given conditions. The normality of $H$ implies $k_1^{-1}h_2k_1\in H$, but it does not necessarily equal $h_2$. This is where I got stuck. Is the above commutative relation true and how do I prove it? Or, was I wrong at the very beginning about what the isomorphism is? Could you please give me some help? Thank you.
Hint. For $h ∈ H$, $k ∈ K$, you have $hk = kh \iff hkh^{-1}k^{-1} = 1$.