The equaliser of $f$ and $g$ is the pair $\webleft (\text{Eq}\webleft (f,g\webright ),\text{eq}\webleft (f,g\webright )\webright )$ consisting of:
-
The Limit. The set $\text{Eq}\webleft (f,g\webright )$ defined by
\[ \text{Eq}\webleft (f,g\webright )\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\webleft\{ a\in A\ \middle |\ f\webleft (a\webright )=g\webleft (a\webright )\webright\} . \]
-
The Cone. The inclusion map
\[ \text{eq}\webleft (f,g\webright )\colon \text{Eq}\webleft (f,g\webright )\hookrightarrow A. \]
We claim that $\text{Eq}\webleft (f,g\webright )$ is the categorical equaliser of $f$ and $g$ in $\mathsf{Sets}$. First we need to check that the relevant equaliser diagram commutes, i.e. that we have
\[ f\circ \text{eq}\webleft (f,g\webright )=g\circ \text{eq}\webleft (f,g\webright ), \]
which indeed holds by the definition of the set $\text{Eq}\webleft (f,g\webright )$. Next, we prove that $\text{Eq}\webleft (f,g\webright )$ satisfies the universal property of the equaliser. Suppose we have a diagram of the form
in $\mathsf{Sets}$. Then there exists a unique map $\phi \colon E\to \text{Eq}\webleft (f,g\webright )$ making the diagram
commute, being uniquely determined by the condition
\[ \text{eq}\webleft (f,g\webright )\circ \phi =e \]
via
\[ \phi \webleft (x\webright )=e\webleft (x\webright ) \]
for each $x\in E$, where we note that $e\webleft (x\webright )\in A$ indeed lies in $\text{Eq}\webleft (f,g\webright )$ by the condition
\[ f\circ e=g\circ e, \]
which gives
\[ f\webleft (e\webleft (x\webright )\webright )=g\webleft (e\webleft (x\webright )\webright ) \]
for each $x\in E$, so that $e\webleft (x\webright )\in \text{Eq}\webleft (f,g\webright )$.