Let $G_1$ and $G_2$ be subgroups of a group $G$.
Assume that $G$ is isomorphic to $G_1\times G_2$.
Then is it necessary that $G_1$ and $G_2$ are normal in $G$?
Clealry $G_1\cong G_1\times \{e\}\trianglelefteq G_1\times G_2$ and $G_2\cong \{e\}\times G_2\trianglelefteq G_1\times G_2$.
So it is easy to infer that $G$ contains normal subgroups $H_1$ and $H_2$ such that $H_1\cong G_1$ and $H_2\cong G_2$. But does that force $G_1,G_2\trianglelefteq G$?