The coequalizer is a special kind of colimit in category theory. Specifically it is the colimit of the diagram consisting of two objects X and Y and two parallel morphismsf, g : X → Y.
More explicity, the coequalizer can be defined as an object Q and a morphism q : Y → Q such that q O f = q O g. Moreover, the pair (Q, q) must be universal in the sense that given any other such pair (Q′, q′) there exists a unique morphism u : Q → Q′ for which the following diagram commutes:
It can be shown that the coequalizer q is an epimorphism in any category.
Examples
In the category of sets, the coequalizer of two functions f, g : X → Y is the quotient of Y by the equivalence relation generated by the relations f(x) = g(x) for all x in X. In particular, if R is an equivalence relation on a set Y, and r1,2 are the natural projections (R ⊂ Y × Y) → Y then the coequalizer of r1 and r2 is the quotient set Y/R.
For abelian groups the coequalizer is particularly simple. It is just the factor groupY / im(f - g). (This is the cokernel of the morphism f - g; see the next section).
Special cases
In categories with zero morphisms, one can define a cokernel of a morphism f as the coequalizer of f and the parallel zero morphism.
In preadditive categories it makes sense to add and subtract morphisms (the hom-sets actually form abelian groups). In such categories, one can define the coequalizer of two morphisms f and g as the cokernel of their difference: