Is there a nontrivial semidirect product of two groups isomorphic to their direct product?

Suppose $N$ and $H$ are groups and $\phi: H \rightarrow \operatorname{Aut}(N)$ is a homomorphism. We know that $N \rtimes_{\phi} H = N \times H$ if and only if $\phi$ is trivial, but this question is a bit different.

Does $N \rtimes_{\phi} H \cong N \times H$ imply that $\phi$ is trivial?

My first idea is that there should be a counterexample, but I haven't been able to figure out anything yet.

Since nontrivial semidirect products are always nonabelian, we definitely need at least one of $N$ or $H$ nonabelian. I think finding a counterexample to the statement would also be equivalent to finding $G$ such that $G = NH = N'H'$ where

  • $N \cap H = N' \cap H' = 1$

  • $N \cong N'$ and $H \cong H'$

  • $N, N', H' \trianglelefteq G$ but $H$ is not normal in $G$


In general, if ${\rm Im}(\phi) \le {\rm Inn}(N)$ then $N \rtimes_{\phi} H \cong N \times H$. So the smallest example is with $N=S_3$ and$|H|=2$.

Added later: unfortunately, what I wrote is not true in general! For example, let $G$ be a central product of the quaternion group $Q_8$ of order 8 (the dihedral group of order 8 would work, too) with a cyclic group $C_4$ of order 4, amalgamating the central subgroups of order 2 from the two groups. So $|G|=16$. Then, the product $xy$ of $x \in Q_8$ and $y \in C_4$ with $|x|=|y|=4$ has order 2, and so $G$ is a semidirect product $Q_8 \rtimes C_2$ where the automorphism induced by the action is inner, but it is not isomorphic to $Q_8 \times C_2$.

What you can say, is that if ${\rm Im}(\phi) \le {\rm Inn}(N)$ in $G = N \rtimes_{\phi} H$, then $G=NC_G(N)$ so, if $Z(N)=1$ (which is the case in the example above with $N=S_3$), then we do have $G \cong N \times H$.


Consider $N=A^{\mathbb N}\times B^{\mathbb N}\times C^{\mathbb N}$ and $H=B$, where $C=A\rtimes_\phi B$. Let $\Phi(h)(a_0, a_1, \ldots; b_0, b_1, \ldots; c_0, c_1, \ldots)=(\phi(h)(a_0), a_1, \ldots; b_0, b_1, \ldots; c_0, c_1, \ldots)$. This makes $$ B\rtimes_\Phi (A^{\mathbb N} \times B^{\mathbb N}\times C^{\mathbb N})\cong(B\rtimes_\phi A)\times A^{\mathbb N}\times B^{\mathbb N}\times C^{\mathbb N}=C\times A^{\mathbb N} \times B^{\mathbb N}\times C^{\mathbb N}\\\cong A^{\mathbb N}\times B^{\mathbb N}\times C^{\mathbb N}\cong B\times (A^{\mathbb N} \times B^{\mathbb N}\times C^{\mathbb N}).$$ Note that I use repeatedly that $X\times X^{\mathbb N}\cong X^{\mathbb N}$.