Lemma 29.12.2. Let $X$ be a scheme such that for every point $x \in X$ there exists an invertible $\mathcal{O}_ X$-module $\mathcal{L}$ and a global section $s \in \Gamma (X, \mathcal{L})$ such that $x \in X_ s$ and $X_ s$ is affine. Then the diagonal of $X$ is an affine morphism.

Proof. Given invertible $\mathcal{O}_ X$-modules $\mathcal{L}$, $\mathcal{M}$ and global sections $s \in \Gamma (X, \mathcal{L})$, $t \in \Gamma (X, \mathcal{M})$ such that $X_ s$ and $X_ t$ are affine we have to prove $X_ s \cap X_ t$ is affine. Namely, then Lemma 29.11.3 applied to $\Delta : X \to X \times X$ and the fact that $\Delta ^{-1}(X_ s \times X_ t) = X_ s \cap X_ t$ shows that $\Delta$ is affine. The fact that $X_ s \cap X_ t$ is affine follows from Properties, Lemma 28.26.4. $\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).