= Solution
A <fibre product of schemes> $Z=X\times_SY$ has projection morphisms to $X$ and $Y$ with equal composites to $S$, and for every <scheme> $T$ the induced map is a bijection
$$
\operatorname{Hom}(T,Z)\cong\operatorname{Hom}(T,X)\times_{\operatorname{Hom}(T,S)}\operatorname{Hom}(T,Y).
$$
This <universal property> determines $Z$ uniquely up to unique isomorphism. On affine charts over $\operatorname{Spec}R$, take
$$
\operatorname{Spec}A\times_{\operatorname{Spec}R}\operatorname{Spec}B
=\operatorname{Spec}(A\otimes_RB).
$$
The <tensor product of commutative algebras> has the required universal property for ring maps. Localization identifies these constructions on principal-open overlaps. Cover the base and its two inverse images by affine charts and glue the resulting affine products along those overlaps; their local universal properties give the global one.
For a counterexample to preservation of irreducibility, take $X=Y=\operatorname{Spec}\mathbb C$ and $S=\operatorname{Spec}\mathbb R$ with their usual structure morphisms. All three are <integral schemes>, but the <Chinese remainder theorem> gives
$$
\mathbb C\otimes_{\mathbb R}\mathbb C
\cong\mathbb C[z]/(z^2+1)\cong\mathbb C\times\mathbb C.
$$
\b[The product scheme is the disjoint union of two points], so it is not irreducible.
Back to article page