# Fiber product an difference of schemes

Let $j:W\to X$ be a closed immersion of a schemes and $f:Y\to X$ a morphism. The basechange of $j$ along $f$ defines a closed immersion $W\times_X Y\to Y$.

The inclusion $k:X\setminus W\to X$ and the inclusion $l:Y\setminus (W\times_X Y)\to Y$ are both open immersions.

Is the fiber product $$(X\setminus W)\times_X Y$$ isomorphic to $Y\setminus(W\times_X Y)$ in the canonical way, i.e. is $l$ the basechange of $k$ along $f$?

Let $U=X\setminus W$. The natural morphism $f^{-1}(U)\rightarrow U\times_XY$ is an isomorphism. The closed immersion $W\times_XY\rightarrow Y$ induces a homeomorphism onto $f^{-1}(W)$. So, $W\times_XY$ can be identified canonically with a closed subscheme of $Y$ with underlying topological space $f^{-1}(W)$, and thus its complement is $f^{-1}(X\setminus W)=f^{-1}(U)$.
• Dear @Keenan Kidwell, then the statement follows from $$f^{-1}(X\setminus W)\cong f^{-1}(X)\setminus f^{-1}(W)\cong Y\setminus f^{-1}(W)\cong Y\setminus (W\times_X Y)$$ I see, thank you. – Ronald Bernard Apr 9 '13 at 14:42
• So how do you prove that $f^{-1}(W)$ identifies with $W \times_X Y$? This is nontrivial, I think. And my gut feeling is that it may be false in the nonreduced case. Also remember the well-known special case that $W$ is the spectrum of a field, there you also have to do something .. – Martin Brandenburg Apr 9 '13 at 14:44
• Dear @Ronald, $f^{-1}(W)$, as a scheme, is $W\times_YX$. One has to prove that the underlying topological spaces match up, because in general, the underlying topological space of a fiber product of schemes is not the fiber product in the category of topological spaces. – Keenan Kidwell Apr 9 '13 at 14:48
• Yes. In general, the fiber of the continuous map $|X \times_S Y| \to |X| \times_{|Y|} |Z|$ at $(x,y,s)$ identifies with $\mathrm{Spec}(\kappa(x) \otimes_{\kappa(s)} \kappa(y))$. – Martin Brandenburg Apr 9 '13 at 18:04