I want to prove $ f:G_n\times G_m\rightarrow G$ when $f(g,h)=gh $ is an isomorphism.
First of all I showed that $G_m,G_n$ are subgroups of $G$ (easy).
Now I want to show that for every $ a,b, \in G$, $f(ab)=f(a)f(b) $.
Let $a=(g_1,h_1)$ and $b=(g_2,h_2)$
$\implies f(g_1,h_1)=g_1h_1$ , $f(g_2,h_2)=g_2h_2$
$\therefore f(g_1,h_1) f(g_2,h_2)=g_1h_1g_2h_2=g_1g_2h_1h_2$ (because G is abelian) $=f\bigl((g_1g_2),(h_1h_2)\bigr)$
Then, I need to show that only $f(e)=e$.
Because $(m,n)=1$, only $f(e,e) = e e = e$.
Am I right? If not how can I prove this?
Is $f$ an isomorphism even if $G$ is not abelian?
Suppose
$$f(a,b):=ab=e\implies a=b^{-1}$$
Buth te last equality is impossible as $\;a\in G_n\;,\;\;b\in G_m\;$ and thus the only possible element in both of them is the unity, i.e. $\;G_n\cap G_m=\{e\}\;$ .
For a counter example with $\;G\;$ non abelian take $\;G=S_3\;$ , though in this case $\;G_2\;$ is not a subgroup.