TITLE: Open sets of integral schemes
QUESTION [5 upvotes]: The following is the definition of integral scheme as mentioned here
Let $X$ be a scheme. We say $X$ is integral if it is nonempty and for every nonempty affine open $\operatorname{Spec}(R)=U \subset X$ the ring $R$ is an integral domain.
How do I show that for any open set $U$, $\mathcal{O}_X(U)$ is an integral domain?

REPLY [2 votes]: You can write $U=\bigcup_{i\in I}U_i$ where $U_i$ is non empty affine and open. Let $f,g\in O_X(U)$ such that $fg=0$. Denote by $f_i$ the restriction of $f$ to $U_i$, you have $f_ig_i=0$, this implies that $f_i=0$ or $g_i=0$. Lemma 27.3.4 of your reference shows that $X$ is irreducible and reduced, this implies that $U_i$ is dense, suppose $f_i=0$, $\{f(x)=0\subset X\}$ is a closed subset which contains the dense subset $U_i$ so it is $X$.