Lemma 30.2.5. Let $X$ be a scheme. The following are equivalent

1. $X$ has affine diagonal $\Delta : X \to X \times X$,

2. for $U, V \subset X$ affine open, the intersection $U \cap V$ is affine, and

3. there exists an open covering $\mathcal{U} : X = \bigcup _{i \in I} U_ i$ such that $U_{i_0 \ldots i_ p}$ is affine open for all $p \ge 0$ and all $i_0, \ldots , i_ p \in I$.

In particular this holds if $X$ is separated.

Proof. Assume $X$ has affine diagonal. Let $U, V \subset X$ be affine opens. Then $U \cap V = \Delta ^{-1}(U \times V)$ is affine. Thus (2) holds. It is immediate that (2) implies (3). Conversely, if there is a covering of $X$ as in (3), then $X \times X = \bigcup U_ i \times U_{i'}$ is an affine open covering, and we see that $\Delta ^{-1}(U_ i \times U_{i'}) = U_ i \cap U_{i'}$ is affine. Then $\Delta$ is an affine morphism by Morphisms, Lemma 29.11.3. The final assertion follows from Schemes, Lemma 26.21.7. $\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).