This is a small exercise I’m doing and I wanted to write down my solution here, why not. The precise exercise reference is FoAG, Ravi Vakil, p.253, 9.1.A.
According to Vakil (FoAG, p.253), a morphism of schemes is a closed embedding if it is an affine morphism (i.e. the preimage of any affine set is an affine set ) such that the corresponding ring homomorphism is surjective (i.e. for some ideal , and is the projection map).
Now the goal is to show that a closed embedding is a homeomorphism on its image (that is, show that is an injective map, with continuous inverse), and moreover this image is a closed set in .
We start with showing is closed. But before we get to that, a small technical lemma will help us here:
Lemma. In a topological space having as a basis, a set is closed if and only if its intersection with every is closed in the subspace .
Proof. Suppose we have a subset in the space such that, for all , the set is closed in the subspace . Pick any point in the closure of ; we wish to show lies in . Because is in the closure, there exists some basis element such that and . Now, let be any open neighborhood of in the subspace . Because is open, is also open in the larger space. Then is an open neighborhood of in the larger space, so it must intersect . Hence intersects . Since was an arbitrary open neighborhood of in the subspace , this shows lies in the closure of the closed set , whence . In particular, , just as we wanted to show.
Now we do the exercise.
Showing the image is closed.
Recall that the affine open sets form a basis for the topology on a scheme. Hence, by the lemma, it suffices to show that for any such affine open , the intersection is closed in .
Here’s a picture of the argument to come:
In the picture, is an affine open isomorphic to , and is isomorphic to . The horizontal morphism between these spectra is obtained from by composition of the vertical isomorphisms with the restriction of to . The morphism corresponds to a surjective homomorphism of rings , giving an isomorphism between and where is the kernel. This means is a bijection between the prime ideals of and the prime ideals of which contain , since the following diagram commutes by the construction of the isomorphism : Rewriting the previous diagram in the category of affines schemes, we get This factorization shows that is a homeomorphism on its image, which is . By the right hand vertical isomorphism, we get an homeomorphism between and the image of restricted to , which is , which is . Therefore, is closed in the subspace ; because was an arbitrary basis element, the lemma implies is closed.
Parenthetically, this discussion shows that we may always suppose without loss of generality that the affine open is of the form when is a closed embedding (and that the closed embedding itself restricts to a morphism of affine schemes which corresponds to the canonical projection .)
Showing the map is injective.
The idea that shows the map is injective follows directly from what we’ve just discussed and unfolded about closed embeddings.
Suppose and are two points of such that . We want to show . Let be an open affine neighborhood of , and let be its preimage by . The previous discussion shows that restricted to is actually an homeomorphism onto . Clearly, we have , and all possible preimages of , including and , must lie in . We see that for to be a bijection when restricted to , we must have the equality . This shows is injective, since the two points with equal image were after all arbitrary.
Takeaways
If is an open affine in and if , then is a homeomorphism between and .
Writing , the set corresponds to prime ideals in which contain , where is some ideal of that is determined by “locally”, that is, determined by what is as a map of affine schemes. More precisely, writing , the ideal is the kernel of the corresponding surjective map .