If is any space, the set has the structure of an abelian semigroup, where the additive structure is defined by the direct sum. If is any abelian semigroup, we can associate to an abelian group with the following property:
there is a semigroup homomorphism such that if is any group, any semigroup homomorphism, there is a unique homomorphism such that . If such a exists, it must be unique.
The group is defined via the following construction: let be the free abelian group generated by the elements of , let be the subgroup of generated by those elements of the form
where is the addition in , . Then
has the universal property described above, with being the obvious map.
A different construction of which is often useful is the following: let be the diagonal homomorphism of semigroups, and let denote the set of cosets of in . It is a quotient semigroup, but interchanging the factors in induces an inverse in so that is a group.
We then define to be the composition of with the natural projection (assuming that has a zero for simplicity). The pair is a functor of so that if is a semigroup homomorphism, we have a commutative diagram (insert diagram).
If is a group then is an isomorphism, showing that has the required universal property.
If is also a semi-ring, then is a ring too.