Counterexamples for $G \times H$ isomorphic to $G$ implies $H$ trivial. I am interested in the following question:  Does $G \times H \cong G$ necessarily imply that $H$ is trivial?

In order to demonstrate it is not, I attempted to construct an example, but I am not entirely sure it is valid:

Let $G = \langle \mathbb{Z}; [a,b] \ (\forall a,b \in \mathbb{Z})\rangle$.  Then $G \times G = \langle \mathbb{Z} \cup \mathbb{Z}; \ \{[a_1, b_1]\} \cup \{ [a_2, b_2]\} \cup \{[a_1,b_2]\}\rangle$, where my notation is intent to convey that the direct product presentation has the abelian relations from the "first" copy of G, the abelian relations from the "second" copy of G, and the required abelian relations which commute generators of the "first" copy with those of the "second" copy.  

In this example, since our cardinalities are equal, $|\mathbb{Z} \times \mathbb{Z}| = |\mathbb{Z}|$, and since this implies that commuting all elements of $G$ and commuting all elements of the same cardinality generating set $G \times G$ requires a bijection between the relator sets, then we should have a bijective group homomorphism $\phi : G \rightarrow G \times G$ so that we have isomorphism, but obviously $G$ is not trivial.  Therefore this provides the necessary counterexample to the original statement.

My first question is: is there anything wrong with this proof?  My second question is: if there is nothing wrong with the proof, is there a more standard way of constructing this type proof?  In general, it would seem that whenever you have isomorphic generating sets and isomorphic relator sets, then this should be enough to describe any number of counterexamples to the claim that $H$ must be trivial.  Is this true?  Finally, since direct products can be viewed as the products in the category Ab, and since all final objects must be isomorphic, would there be an easier way (or maybe just an insightful way) of construct this argument entirely in a category theoretic context?

Thanks!
It is a fact that $\Bbb{R}$ is isomorphic to $\Bbb{R}^2$ as abelian groups, since they have the same dimension as vector spaces over $\Bbb{Q}$.
For finite groups, yes.  Consider the homomorphism from $G \times H$ to $G$ defined by
$$
(g, h) \mapsto g.
$$
This homomorphism is surjective and has kernel $H$.  Consequently, it is or is not an isomorphism accordingly as its kernel is or is not trivial.

For infinite groups, see Mark Joshi's comment above.