Semidirect product and direct product Let $A$ be an abelian group and $G$ a group and let $\alpha:G\rightarrow{\rm Aut}(A)$. I want to show that the semidirect product $A\rtimes _{\alpha }G$ is isomorphic to the direct product $A\times G$ iff $\alpha(g)=id$ for all $g\in G$.
This is true  if $G$ is abelian. If $G$ is nonabelian, I think that the only if direction is not true in general. So I will be thankful if someone provides us a counterexample.
Thank you in advance
 A: For finite groups we can argue that $|(A\times G)'|=|G'|<|(A\rtimes_\alpha G)'|$ whenever $\alpha$ is non-trivial (the latter group has a non-trivial commutator in $A$).
A: I think we can concoct a counterexample.
Let $A$ be the (restricted) direct product of countably many groups of order $2$ (i.e. $A$ is countably infinite elementary abelian), and let $G$ be the direct product of $A$ and countably many copies of the dihedral group of order $8$.
Then the  direct product $A \times G$ is isomorphic to $G$.
We can define a nontrivial action of $G$ on $A$ by letting one of the direct factors of $G$ of order $2$ interchange two of the factors of $A$, and fix the rest of $A$, and all other direct factors of $G$ act trivially on $A$.
Then in the resulting semidirect product, we lose three factors of order $2$ and gain an extra dihedral factor, but the result is still isomorphic to $G$.
A: As a generalisation to Derek's Example, consider $A=E^{\mathbb N}$ with $E$ abelian and $G=E^{\mathbb N}\times F^{\mathbb N}\times (E\rtimes_\alpha F)^{\mathbb N}$. Then $\alpha$ induces a nontrivial action $\phi$ of $G$ on $A$ such that $A\rtimes_\phi G\cong A\times G$.
