# The Unapologetic Mathematician

## Equalizers and coequalizers

Let’s consider another construction from set theory. If we have sets $S$ and $T$, and functions $f:S\rightarrow T$ and $g:S\rightarrow T$, then we can talk about the subset $E=\{s\in S|f(s)=g(s)\}$. This is what we want to generalize.

First off, we know that subsets are subobjects, which are monomorphisms. More to the point, we can look at this subset and take its inclusion function $e:E\rightarrow S$. Then we see that $f\circ e=g\circ e$. Furthermore, if any other function $h:X\rightarrow S$ satisfies $f\circ h=g\circ h$ then its image must land in $E$. That is, the function $h$ must factor through $e$.

So, given arrows $f$ and $g$, each from the object $S$ to the object $T$ in the category $\mathcal{C}$, we construct a new category. The objects are arrows $h:X\rightarrow S$ satisfying $f\circ h=g\circ h$, and a morphism from $(X_1,h_1)$ to $(X_2,h_2)$ is an arrow $m:X_1\rightarrow X_2$ so that $h_1=h_2\circ m$. Now we define the “equalizer” of $f$ and $g$ to be a couniversal object in this category, if one exists.

To be a bit more explicit, look at this diagram:

The equalizer is the pair $(E,e)$ so that for any other $(X,h)$ there is a unique arrow $X\rightarrow E$ making the triangle commute. We write it as $\mathrm{Equ}(f,g)$. Since it’s defined by a universal property, the equalizer is unique up to isomorphism when it exists. If it exists for all pairs of morphisms between the same two objects in the category $\mathcal{C}$, we say that $\mathcal{C}$ “has equalizers”.

Now, as indicated above an equalizer is a monomorphism into $S$. Indeed, let’s say we’ve got two arrows $h_1:X\rightarrow E$ and $h_2:X\rightarrow E$ so that $e\circ h_1=e\circ h_2$. Then clearly $f\circ(e\circ h_1)=g\circ(e\circ h_1)$, since $e$ is the equalizer of $f$ and $g$. So there is a unique morphism $m:X\rightarrow E$ so that $e\circ m=e\circ h_1=e\circ h_2$, and both $h_1$ and $h_2$ must be this unique morphism. Since we can cancel $e$ on the left of $e\circ h_1=e\circ h_2$, $e$ is a monomorphism.

The dual notion of an equalizer is a coequalizer. This uses the following diagram:

Go through the above discussion of equalizers and dualize it. Describe a category whose universal object will be the coequalizer. Give an interpretation to this diagram. Prove that the coequalizer of two morphisms is an epimorphism. Try to give a description of coequalizers in $\mathbf{Set}$, or show that $\mathbf{Set}$ does not have coequalizers.