Coincidence locus of two scheme morphisms (source code)

= Coincidence locus of two scheme morphisms

For morphisms $f,g:X\to Y$ over a base $S$, their scheme-theoretic coincidence locus is the fibre product
$$
\operatorname{Eq}(f,g)=X\times_{(f,g),\,Y\times_SY,\,\Delta_{Y/S}}Y.
$$
It is the <equalizer> of $f$ and $g$, hence is universal among subschemes on which they agree. It is locally closed because every diagonal is an immersion, and closed when $Y\to S$ is separated.