TITLE: Why is the disjoint union of a finite number of affine schemes an affine scheme?
QUESTION [8 upvotes]: We know that the disjoint union of an infinite number of affine schemes is not an affine scheme since the underlying topological space is not quasi-compact. 
But how do you show that the disjoint union of a finite number of affine schemes is an affine scheme? What are the global sections?

REPLY [2 votes]: Suppoes $\mathrm Spec A_i$, $i=1,2$ are two affine spaces. Note that disjoint union is a co-product in category of set. So in this case, coproduct will be $\mathrm Spec (A_1\times A_2)$.