TITLE: Union of closed subschemes with the structure sheaf over it
QUESTION [11 upvotes]: Elementary commutative algebra fact: for two proper ideals I and J of a commutative ring R, we have $V(IJ)=V(I\cap J)=V(I)\cup V(J)$.
Closed subschemes are related to sheaves of ideals. There is operation of intersection and product between sheaves of ideals, which is similar to the affine case.
I see in many places that the structure sheaf over $V(I)\cup V(J)$ are defined to be $R/I\cap J$ rather than $R/IJ$. Why should the structure sheaf be define in that way?

REPLY [5 votes]: You probably agree that for the intersection, things are easy: the most reasonable definition of $V(I)$ and $V(J)$ is as the fibred product  $Spec\,R/I\times_{Spec\,R} Spec\,R/J=Spec\,R/I\otimes_R R/J=Spec\,R/(I+J).$
Now one natural way to view the union $V(I)\cup V(J)$ is as the result of glueing $V(I)$ and $V(J)$ along their intersection, that is, as the pushout of the diagram $V(I)\leftarrow V(I+J)\rightarrow V(J)$. And it is known (see e.g. Ferrand, Conducteur, descente et pincement) that such a pushout is representable in the category of schemes by the affine scheme whose function ring is the fibred product. Then you can do the following exercise: check that the 'diagonal' map $R\to (R/I)\times_{R/(I+J)}(R/J)$ is surjective with kernel $I\cap J$. In other words the sought-for fibred product is $R/(I\cap J)$. We end up with the conclusion that this pushout viewpoint leads naturally to the definition of the scheme-theoretic structure on the union being $Spec\,R/(I\cap J)$.