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
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$).