Formally, we start with a categoryC with finite products. A group object in C is an object G of C together with morphisms
m : G × G → G
e : 1 → G
inv : G → G
such that the following properties are satisfied
m is associative, i.e. m = m as morphisms G × G × G → G, and where e.g. m × idG : G × G × G → G × G; here we identify G × in a canonical manner with × G.
e is a two-sided unit of m, i.e. m = p1, where p1 : G × 1 → G is the canonical projection, and m = p2, where p2 : 1 × G → G is the canonical projection
inv is a two-sided inverse for m, i.e. if d : G → G × G is the diagonal map, and eG : G → G is the composition of the unique morphismG → 1 with e, then md = eG and md = eG.
Note that this is stated in terms of maps – product and inverse must be maps in the category – and without any reference to underlying "elements" of the group object – categories in general do not have elements of their objects. Another way to state the above is to say G is a group object in a category C if for every object X in C, there is a group structure on the morphisms Hom from X to G such that the association of X to Hom is a functor from C to the category of groups.
Examples
Each set G for which a group structure can be defined can be considered a group object in the category of sets. The map m is the group operation, the map e picks out the identity elementu of G, and the map inv assigns to every group element its inverse. eG : G → G is the map that sends every element ofG to the identity element.
A localic group is a group object in the category of locales.
The group objects in the category of groups are the abelian groups. The reason for this is that, if inv is assumed to be a homomorphism, then G must be abelian. More precisely: if A is an abelian group and we denote by m the group multiplication of A, by e the inclusion of the identity element, and by inv the inversion operation on A, then is a group object in the category of groups. Conversely, if is a group object in one of those categories, then m necessarily coincides with the given operation on A, e is the inclusion of the given identity element on A, inv is the inversion operation and A with the given operation is an abelian group. See alsoEckmann–Hilton argument.
Given a category C with finite coproducts, a cogroup object is an object G of C together with a "comultiplication" m: G → GG, a "coidentity" e: G → 0, and a "coinversion" inv: G → G that satisfy the dual versions of the axioms for group objects. Here 0 is the initial object of C. Cogroup objects occur naturally in algebraic topology.
Much of group theory can be formulated in the context of the more general group objects. The notions of group homomorphism, subgroup, normal subgroup and the isomorphism theorems are typical examples. However, results of group theory that talk about individual elements, or the order of specific elements or subgroups, normally cannot be generalized to group objects in a straightforward manner.