One problem in the red book of Mumford.
Let $X$ be a prevariety, $\{U_i\}$ an affine open covering of $X$. Let $R_i$ be the coordinate ring of $U_i$. Then if $U_i\cap U_j$ is an affine subset of $X$ with coordinate ring $R_i\cdot R_j\subset k(X)$, $X$ is a variety.
My attempt is follows:
we need to show $\Delta(X)\subset X\times X$ is closed. There is an open cover of $X\times X$ by $\{U_i\times U_j\}$, so it suffices to show $\Delta(X)\cap(U_i\times U_j)$ is closed in $U_i\times U_j$.
the ideal $I\subset R_i\otimes R_j$ of functions vanishing on $\Delta(X)\cap(U_i\times U_j)$ is \begin{equation} I=\ker(\Delta\big|_{U_i\cap U_j})^*=\{\sum f_i\otimes f_j\in R_i\otimes R_j\colon\sum f_if_j=0\in k(X)\} \end{equation}
problems occur when I try to show \begin{equation} V(I)=\Delta(X)\cap(U_i\times U_j) \end{equation}
If anyone could help solving this.
Thank you.
Edited to add: For readers unfamiliar with Mumford's definitions, Mumford uses "prevariety" to refer to a possibly nonseparated variety. In modern language, this question is asking us to show that if a variety $X$ has an affine open cover by $U_{i\in I}$ such that $U_i\cap U_j$ is affine for every $i,j\in I$, then $X$ is separated
The key observation is that $\Delta(X)\cap (U_i\times U_j) \cong U_i\cap U_j$.
First, we have that $U_i\times U_j$ is affine, and it is given by $\operatorname{Spec} R_i\times R_j$. Then, $U_i\cap U_j$ is affine and it is given by $\operatorname{Spec} R_{ij}$, where $R_{ij}=R_i\cdot R_j\subset K(X)$. So the inclusion $U_i\cap U_j \to U_i\times U_j$ is represented on the level of rings by $R_i\otimes R_j\to R_{ij}$ where we send $a\otimes b \mapsto ab$. This map of rings is easily seen to be surjective, which by the the 1st isomorphism theorem implies that $R_{ij} \cong (R_i\otimes R_j)/I$, where $I$ is the ideal defining $U_i\cap U_j$ as a closed subset of $U_i\times U_j$.