# Construction of locus of agreement of schemes

I'm trying to understand the construction of the locus of agreement of schemes. Multiple references use a certain commutative diagram but I fail to see why it's commutative.

Let $f,g:X\rightarrow Y$ be two $S$-scheme morphisms. The locus of agreement of $f$ and $g$ is defined to be $V$, the pullback of the diagram $$\require{AMScd}\begin{CD}V@>>>Y\\@VVV@V\Delta VV\\X@>f \times g>>Y\times_SY\end{CD}$$

Let $h:Z\rightarrow X$ be an $S$-morphism so that $f\circ h=g\circ h$. Then $h$ factors uniquely through $V$.

Why does $Z$ form a commutative diagram with $\Delta$ [the diagonal] and $h$ [unique factorization through the pullback]?

Thanks

• I think you have an error in your diagram: the lower right corner is currently $X\times_S Y$, but should be $Y\times_S Y$. Dec 30 '14 at 21:37
• @KReiser Right. I corrected that. Dec 30 '14 at 21:57

If $h: Z\to X$ is an $S$-morphism so that $f\circ h = g\circ h$, then $f\circ h$ and $g\circ h$ are identical maps from $Z\to Y$. In addition, we have that $(f\times g)\circ h$ and $\Delta \circ (f\circ h) = \Delta \circ (g\circ h)$ are equal in $Y\times_S Y$. So $h:Z\to X$ and $f\circ h=g\circ h : Z\to Y$ are maps from $Z$ to $X,Y$ such that the composites agree in $Y\times_S Y$. So by the universal property of pullbacks, we have a unique morphism $Z\to V$.