There are different questions about the coproduct in Ab, the coproduct in Grp and why they are so differents. However, I wonder why the following constructions cannot be extend for arbitrary groups:
Given two abelian groups $(A,+),(B,+),$ the set $A\times B$ endowed with the natural law $(a,b)+(a',b')=(a+a',b+b')$ together with the natural inclusions $\iota_A:A\rightarrow A\times B$ and $\iota_B:B\rightarrow B$ is the coproduct (for $A$ and $B$).
I guess I am using commutativity at some point (maybe to prove it satisfies the required universal property) but I cannot find where. If this construction were valid for any group in Grp then products and coproducts would match in Grp (for finite families), which is false. So, where is my mistake?
Thanks in advance
The typical proof that your $A \times B$ satisfies the universal property of the coproduct in $\mathbf{Ab}$ is as follows: if $f: A \to C$ and $g: B \to C$ are two homomorphisms of abelian groups, then there is the induced homomorphism $h: A \times B \to C$ defined by $h(a,b) = f(a) + g(b)$. In order for this to be a homomorphism, $C$ must be abelian, for $$ h(a,b) + h(a',b') = f(a) + g(b) + f(a') + g(b') $$ and $$ h(a+a',b+b') = f(a) + f(a') + g(b) + g(b'),$$ so $f(a')$ and $g(b)$ must commute for all $a' \in A$, $b \in B$ in order for the desired homomorphism to actually be a homomorphism.