# Base Change of Closed Immersion stays Closed Immersion

Let $f:X \to Y$ a closed immersion of schemes. I want to see why the morphism $: X \times_Y Z \to Z$ induced by the base change $g: Z \to Y$ is also a closed immersion. Here the diagram:

$$\require{AMScd}$$\begin{CD} X \times_Y Z @>>> Z\\ @VVV @VV{g}V \\ X @>f>> Y \end{CD}

My attempts: I heard that it suffice to assume the affine case: So that $X =Spec(R), Y =Spec(S), Z =Spec(A)$

$$\require{AMScd} \begin{CD} R \otimes_S A @<<< A\\ @AAA @AAA \\ R @<<< S \end{CD}$$

By assumption $S \to R$ is surjective. Does it suffice, to prove that $A \to R \otimes_S A$ is also surjective? Why?

And secondly: Why it is a local problem? Therefore why it suffice to consider the affine case?

Background of my question is following former thread of mine: Graph Morphism Closed Immersion

There I wanted to show that for a morphism $f: X \to Y$ where $Y$ is a separated $S$-scheme, the graph morphism $\Gamma_f = (id,f): X \to X \times_S Y$ is a closed immersion.

Following a hint I reduced the problem via

\require{AMScd} \begin{CD} X @>\Gamma_f >> Y\times_S X \\ @VVfV @VV(id,f)V \\ Y @>\Delta>> X \times_S Y \end{CD}

to the current one.

• By definition a closed immersion is a map $f:X\to Y$ such that (1) $f$ induces a homeomorphism onto a closed subset of $Y$, i.e., $X$ is homeomorphic to $f(X)$ and $f(X)$ is closed, and (2) The map $f^\sharp:\mathcal{O}_Y\to f_*\mathcal{O}_X$ is surjective, or equivalently, for every $y\in Y$ the map $f^\sharp_y:\mathcal{O}_{Y,y}\to( f_*\mathcal{O}_X)_y$ is surjective. Now notice that both this conditions are local. Indeed, (2) is trivially local on both source and target, and (1) is local in both source and target since being closed is a local property. – user347489 Apr 13 '18 at 23:57
• Out of ignorance I used the result stated in the following thread without noticing. I think the argument follows regardless: math.stackexchange.com/questions/712332/… – user347489 Apr 14 '18 at 0:02

First, you need to know that the property of closed immersion is local in the target. This means that given $f:X\rightarrow Y$ and $Y=\bigcup_{i\in I}U_i$ we have that $f$ is a closed immersion iff $$f\mid_{f^{-1}(U_i)}:f^{-1}(U_i)\rightarrow U_i$$ is a closed immersion $\forall i \in I$.
Using this you can reduce to the affine case. This is because in the construcction of the fibered product you can deduce that if $Y=\bigcup_i Y_i$ is an open cover, $X_i=f^{-1}(Y_i)$, $Z_i=g^{-1}(Y_i)$ and $X_i=\bigcup_j X_{ij}$, $Z_i=\bigcup_k Z_{ik}$ are open covers then $$\bigcup_i \bigcup_{j,k} X_ij\times_{Y_i} Z_{ik}$$ is an open cover of $X\times_Y Z$ (for a reference this is corallary 4.19 in Görtz-Wedhorn book I). Taking all the open sets of the covers affine you get an affine cover compatible with the fibered product that let you study $f$ and $f\times_Y Z$ locally in the target at the same time.
Now for the affine case you can use the equivalence of categories between rings and affine schemes. Over this equivalence closed immersions of affine schemes correspond to surjective morphisms between the rings (cf, Hartshorne exercises II.2.18 or here), that's why is enough to prove that $A\rightarrow R\otimes_S A$ is surjective.
This last morphism is just the tensorization w.r.t $\otimes_S A$ of the morphism $S\rightarrow R$, so surjectivity follows by right exactness of the tensor product.