TITLE: $G \cong G \times H$ does not imply $H$ is trivial.
QUESTION [6 upvotes]: In Aluffi's Algebra: Chapter $0$ there is a question asking to give a counterexample to the claim 

$G \cong G \times H$ implies $H$ is trivial.

I am looking for a hint.  Obviously, at least one of $G$ or $H$ needs to be infinite.  Doing something with $\mathbb{Z}$ seems to be the natural thing.  I tried showing $\mathbb{Z} \cong \mathbb{Z} \times (\mathbb{Z}/2\mathbb{Z})$ by an ``interlacing evens and odds'' argument, but the "odd + odd" case killed my homomorphism...
Am I on the right track?  
Thanks.

REPLY [5 votes]: For an example, consider $G=\mathbb Z[x]$ as an additive group. Then $G\times \mathbb Z \cong G\times\mathbb Z\times\mathbb Z$ but $\mathbb Z\not\cong \mathbb Z\times \mathbb Z$.
A key feature is the failure of one of the chain conditions. All of this can be found in exercises in Rotman, the chapter on Krull-Schmidt.