# Should a closed immersion of schemes be closed map of topological spaces by definition?

In Section 9.1 of his "Foundations of Algebraic Geometry" (version August 2022), Ravi Vakil defines a closed embedding (closed immersion) of schemes to be an affine morphism
$$\pi: X\rightarrow Y$$ such that for every affine open subset $$\operatorname{Spec} B\subset Y$$, with $$\pi^{-1}(\operatorname{Spec} B)\cong \operatorname{Spec} A$$, the map of the corresponding rings $$B\rightarrow A$$ is surjective. Then in the following Exercise 9.1.A, he suggests to prove that these conditions entail that image of $$\pi^{\#}$$ is a closed subset in $$Y$$ as topological space. The property of being an affine morphism means that inverse images of affine open subsets of $$Y$$ are affine subschemes in $$X$$.

I don't see a way to prove this, as I don't understand the connection between the property of the pullback map of global sections $$\pi^{\#}:B\rightarrow A$$, which is $$\pi^{\#}:A=\Gamma(\operatorname{Spec} B, \mathscr{O}_{\operatorname{Spec} B})\rightarrow \Gamma(\operatorname{Spec} A, \mathscr{O}_{\operatorname{Spec} A})=B$$ being surjective (i.e., every regular function on X can be extended to $$\pi(X)\subset Y$$), and the topological properties of $$\pi$$ (being a closed map, or at least mapping $$X$$ to the closed subset of $$Y$$)

Now, in any other source I saw, the closed immersion maps $$X$$ homeomorphically to a closed subset of $$Y$$ by definition. There is even a discussion, where it is asked whether this condition is a necessary part of definition, and one of the answers argues that without it the surjectivity of $$\pi^{\#}$$ wouldn't be equivalent to surjectivity on the stalks (of $$\pi^{\#}_x$$ for $$x \in X$$). However, this is not really a proof that the topological condition is a necessary part of definition - nor does it offer how to solve Vakils question.

So my question is - should the topological condition ($$\pi(X)$$ is closed in $$Y$$) be part of the definition of the closed embedding, and if not - how does it follow from the definition?

• Welcome to MSE. I've made a couple slight upgrades to your post - one is adding links using the [link](https://math.stackexchange.com/) functionality which produces a link, and using $\operatorname{Spec}$` to format $\operatorname{Spec}$, which produces better spacing. Commented Jun 16, 2023 at 5:35
• Thank you for the corrections, I am learning the ropes. Commented Jun 16, 2023 at 7:31

If $$f:A\to B$$ is a surjective ring map, then $$\operatorname{Spec} f: \operatorname{Spec} B\to\operatorname{Spec} A$$ is a homeomorphism on to it's image, which is exactly the closed subscheme $$\operatorname{Spec} (A/\ker f)\subset\operatorname{Spec} f$$. (See for instance here, or you can factor $$A\to B$$ as $$A\to A/\ker f \cong B$$ and note that since $$\operatorname{Spec}$$ is a functor, that means $$\operatorname{Spec} f: \operatorname{Spec} B\to\operatorname{Spec} A$$ factors as $$\operatorname{Spec} B \cong \operatorname{Spec} (A/\ker f)\to\operatorname{Spec} A$$.)
Now use the fact that if $$X$$ is a topological space, $$S\subset X$$ a subset, and $$\{U_i\}_{i\in I}$$ an open cover of $$X$$, the set $$S$$ is closed in $$X$$ iff $$S\cap U_i$$ is closed in $$U_i$$ for all $$i\in I$$. Applying this in our case to $$\pi(X)\subset Y$$ and the open cover consisting of all the affine open subschemes of $$Y$$, we see that $$\pi(X)\subset Y$$ must be closed.
• Thank you very much, @KReiser. Indeed I was missing the link that image of $\operatorname{Spec} f$ is the $\operatorname{Spec} (A/ker f)$ a closed subscheme of $\operatorname{Spec} A$ (I believe you meant that by $\operatorname{Spec} f$). Also the reverence with $V(ker\phi)$ is very illuminating. Commented Jun 16, 2023 at 7:30