Lemma 29.7.10. Let $S$ be a scheme. Let $X$, $Y$ be schemes over $S$. Let $f, g : X \to Y$ be morphisms of schemes over $S$. Let $U \subset X$ be an open subscheme such that $f|_ U = g|_ U$. If the scheme theoretic closure of $U$ in $X$ is $X$ and $Y \to S$ is separated, then $f = g$.

Proof. Follows from the definitions and Schemes, Lemma 26.21.5. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).