TITLE: Is a pushout of a closed immersion $f$ again a closed immersion?
QUESTION [5 upvotes]: Assume
$$
\begin{eqnarray}
X&\xrightarrow{f}& Y\\
\downarrow && \downarrow\\
Z&\xrightarrow{f'}& W
\end{eqnarray}
$$
is a pushout in the category of schemes (and in particular $W$ is a scheme).

Is $f'$ a closed (resp. open) immersion, if $f$ is a closed (resp. open) immersion?

This is true if you replace ''scheme'' by ''topological space'' and ''immersion'' just by ''map'' or ''embedding''.

REPLY [3 votes]: This question is quite hard to answer, since pushouts in the category of schemes don't exist in general, even along closed immersions. And it is hard to determine whether some morphism is a closed immersion when you just know a universal property. But have a look at "Conducteur, Descent et Pincement" by Daniel Ferrand and "Gluing Schemes and a Scheme Without Closed Points" by Karl Schwede, these papers are available online. Karl Schwede proves the following: If $X,Y,Z$ are affine, then $W$ exists and is affine, and in fact $f'$ is a closed immersion. This comes down to the observation that in the category of commutative rings $A \times_B C \to C$ is surjective when $A \to B$ is surjective. If $X,Y,Z$ are general schemes, $f : X \to Y$ and $X \to Z$ are closed immersions, when $W$ exists and $f'$ is a closed immersion. For more general results, see Ferrand's paper or MO/64294.