Okay then, let’s build one of these schemes!

Pick your favourite commutative unital ring R. We’re going to build an object out of R which has three layers of structure:

  • A ground set
  • A topology to turn the set into a topological space
  • A sheaf of rings to turn the topological space into a ringed space

Let’s denote the set of all prime ideals of R by X=\text{Spec} (R). We call this the spectrum of the ring. This is our ground set – each point in our soon-to-be scheme X is a prime ideal of the ring R. Now let’s define a topology on X as follows: for an ideal I\subseteq R, we let V(I) = \left\{\mathfrak{p}\in\text{Spec}(R): I\subseteq\mathfrak{p}\right\} denote the collection of all prime ideals of R containing I. If we define the closed sets of our topology to be sets of the form V(I) for all the ideals I\subseteq R, this actually gives us a topology on \text{Spec}(R); it is easy to check that

  • V(R)=\varnothing
  • V(0) = X
  • V(I)\cup V(J) = V(I\cap J)
  • \bigcap_{\alpha\in A} V(I_\alpha) = V(\sum_{\alpha\in A} I_\alpha)

So we can take arbitrary intersections and finite unions of these closed sets, and they behave nicely because they correspond to nice operations (ideal intersections and sums) on the ideals of R, which we understand well. Since we can express the empty set and the whole space in terms of these sets V(I), they form a topology on X.

It is also possible to specify this topology using a basis of open sets; for an element f\in R, let’s define the principal open set D(f) = X\backslash V(f), where V(f) = V((f)) is the set of all prime ideals containing f (and is called a principal closed set). These principal open sets constitute a basis of open sets for the same topology on X=\text{Spec}(R), which is called the Zariski topology.

Here’s a first point to note which highlights the strong link between algebraic structure of the ring and geometric structure of the correspond spectrum, as a topological space. When is a singleton set \left\{\mathfrak{p}\right\}\subseteq\text{Spec}(R) closed in this topology? Well, precisely when this singleton is equal to one of our closed sets V(I) for some ideal I\subseteq R. Hence the set of prime ideals containing I is just \left\{\mathfrak{p}\right\}. Since I contains itself, we know I=\mathfrak{p}; but recall that every ideal of a ring is contained in a maximal ideal, so in fact \mathfrak{p} must be maximal if it is the only prime ideal containing itself. Conversely if \mathfrak{p} is maximal then the singleton set \left\{\mathfrak{p}\right\} is closed. So the closed points of the spectrum correspond to maximal ideals of the ring. This is exactly as in the case with varieties – there is a bijective correspondence between points (a_1, \dots, a_n) in an algebraic variety V over a field k and maximal ideals of the form (x_1 - a_1, \dots, x_n - a_n) in its coordinate ring k[V].

The difference in the scheme case is that there are points in the space which are not closed –  these points “keep track” of the different containments into maximal ideals. Geometrically I find it helpful to think of these points not as set-theoretic elements of a geometric object (although of course they are) but as geometric sub-structures of the whole object. For example, as we will see, the spectrum of the integers can be thought of as a long line, with closed points corresponding to the maximal ideals (p) for each prime number p spaced along the line. The line itself is one big “fuzzy” point, corresponding to the prime ideal (0), which is prime (as \mathbb{Z} is an integral domain) but not maximal. Making the jump from just considering the closed points of an algebraic variety (which don’t necessary encode much structure about each other) to considering all prime ideals of the ring – which encodes a lot more of the relationships within the geometric object – is one of the strengths of going from varieties to schemes.

One thing to note is that our closed sets V(I) can be defined by more than one ideal. In fact, given an ideal I\subseteq R, there’s a bigger ideal containing I called the radical of I and denoted by \sqrt{I}. It’s the ideal \sqrt{I} = \left\{ a\in R \vert \exists n\in\mathbb{N} : a^n \in I\right\}. And it turns out that V(I) = V(\sqrt{I}). Let’s see why:

Theorem: \sqrt{I} = \bigcap_{\mathfrak{p} \supseteq I} \mathfrak{p}

Proof: The proof relies on a result from commutative algebra: the nilradical of any ring (which is just the radical of the zero ideal in the ring) is the intersection of all the prime ideals of that ring. Now consider the quotient map q: R\rightarrow R/I sending each element of the ring to its coset in the quotient ring. The nilradical \text{nilrad}(R/I) = \bigcap_{\mathfrak{q}\in\text{Spec}(R/I)} \mathfrak{q} by the above. Taking preimages under the quotient map q we have \sqrt{I} = q^{-1} (\text{nilrad}(R/I)) = \bigcap_{\mathfrak{q}\in\text{Spec}(R/I)} q^{-1}(\mathfrak{q}). Recalling that the ideals of R/I are in bijective correspondence with the ideals of R containing I, and that taking preimages preserves “primeness”, gives the result.

To show V(I) = V(\sqrt{I}), we note one easy inclusion: if \mathfrak{p} contains \sqrt{I} then it certainly contains I since I\subseteq\sqrt{I}. This gives V(\sqrt{I})\subseteq V(I). Conversely if \mathfrak{p} contains I then \mathfrak{p} \supseteq \bigcap_{\mathfrak{q}\supseteq I} \mathfrak{q} = \sqrt{I} by the above theorem, so V(I) is contained in V(\sqrt{I}). This shows that two ideals can carve out the same set. So sometimes when it makes things easier for us we can assume our ideals are “radical” – that is, equal to their own radicals – a condition slightly weaker than being prime.

Another nice thing which follows from this is that we have V(I)\subseteq V(J) if and only if J\subseteq \sqrt{I} for ideals I, J\subseteq R. This will be helpful shortly in defining our structure sheaf.

I don’t want to go and look at any other technical properties of these spaces yet. First, I’d like to categorify everything. So we need to say what happens with ring homomorphisms!

Let \phi: A\rightarrow B be a ring homomorphism. Let’s define f =\text{Spec}(\phi) : \text{Spec}(B)\rightarrow\text{Spec}(A) by f(\mathfrak{p}) = \phi^{-1} (\mathfrak{p}). This is well-defined because the preimage of a prime ideal under a ring homomorphism is always prime. But there’s a very topological structure here:

Theorem: the map f=\text{Spec} (\phi) : \text{Spec}(B) \rightarrow \text{Spec}(A) is continuous.

Proof: It suffices to prove that the preimage of any closed set in \text{Spec}(A) is closed under f. Let I\subseteq A be an ideal of A and let I_B = \phi (I) B be the ideal of B generated by its image under \phi. It is easy to check that f^{-1} (V(I)) = V(I_B)\subseteq \text{Spec}(B) which is obviously closed, so we’re done.

It should be obvious that \text{Spec}(\text{id}_A) = \text{id}_{\text{Spec}(A)}. Now let’s suppose we have a chain of ring homomorphisms A\xrightarrow{\phi} B \xrightarrow{\psi} C. For an ideal \mathfrak{p}\subseteq C, composition of preimages behaves very nicely – we have (\psi \circ \phi)^{-1} (\mathfrak{p}) = \phi^{-1} (\psi^{-1} (\mathfrak{p})), from which it follows that \text{Spec}(\psi \circ\phi) = \text{Spec}(\phi) \circ \text{Spec}(\psi).

So now we have a magical machine \text{Spec} which takes a commutative ring and gives you back its spectrum, and takes a ring homomorphism and hands you a nice continuous map going in the opposite direction. And these things work correctly with regards to identity maps and compositions, just reversing all the maps. So of course this means we’ve got a functor \text{Spec}:\text{CRing}^\text{opp}\rightarrow\text{Top} from the opposite category of commutative (unital) rings to the category of topological spaces.

Good! Now let’s add that elusive final layer of structure – the structure sheaf \mathcal{O}_X. Recall that our principal open sets D(f) = X\backslash V(f) formed a base \mathcal{B} for the Zariski topology on X = \text{Spec}(R). We want to define a \mathcal{B}-sheaf which we can extend to a unique sheaf on X, so we’ll have to start by defining what this sheaf should do to the basic open sets and their restrictions. Let’s define \mathcal{O}_X (D(f)) = R_f to be the localisation of R at the multiplicative set S_f : = \left\{1,f,f^2,\dots\right\}. Elegantly put, this is a ring R_f with a ring homomorphism L_f : R\rightarrow R_f sending each element of S_f to a unit in R_f, and universal with respect to this property. So if \phi: R\rightarrow B is another ring homomorphism with the property that \phi sends each element of S_f to a unit of B then there exists a unique \psi: R_f \rightarrow B such that \phi = \psi\circ L_f.


Practically put, we can just formally invert all the elements of S_f, and thus we’re allowed to work with “fractions” in our ring, whose denominators consist of powers of f. If f is nilpotent, then the definition of localisation means that R_f is the zero ring, so “dividing by 0” here just kills the whole ring.

Before discussing what the restricition maps ought to be, we should consider what we’re trying to model here. Recall that in a previous post I said we wanted schemes to be geometric objects on which the rings they’re built from act like rings of functions on the space. So we can think of the principal open set D(f) as that piece of X=\text{Spec}(R) on which the “function” f is nonzero. So R_f should be thought of as the ring of functions on D(f) where we’re allowed to invert powers of the function f, because its inverse won’t blow up on this set.

Okay, great! Now let’s figure out what the restriction maps should be between basic open sets. If D(g)\subseteq D(f) then V(f)\subseteq V(g) and, as above, we have (g)\subseteq \sqrt{(f)} as ideals in R. Therefore there exists n\in\mathbb{N}_{\geq 0} and b\in R so that g^n = f b. In R_g we know g (and hence g^n) is a unit, so this means in R_g, f is also a unit, with f = (b^{-1} g^{n}). This gives us a natural restriction homomorphism A_f \rightarrow A_g given by a f^{-k} \mapsto a (b^{-1} g^n)^{-k} = (a b^k ) g^{-nk}. It is this map which gives us our restriction \mathcal{O}_X (D(f))\rightarrow \mathcal{O}_X (D(g)).

Now we need to show that defining \mathcal{O}_X in this way on basic open sets gives us a \mathcal{B}-sheaf. Before doing this, we’ll give a useful lemma.

Lemma: Let X=\text{Spec}(R) and let \left\{f_a : a\in A\right\} be a collection of elements of R. Then X=\bigcup_{a\in A} D(f_a) if and only if (f_a : a\in A) = R.

Proof: Suppose that the basic open sets D(f_a) cover X. This happens iff the intersection \bigcap_{a\in A} V(f_a) is empty, and this happens iff there is no prime ideal which contains every f_a. Hence the ideal (f_a : a\in A) must be the whole ring.

What does this tell us? It means we can write 1\in R as a linear combination of the f_a‘s, and recall that linear combinations are always finite. This means that the subcover \left\{ D(f_a): 1\leq a\leq n\right\} of only those f_a‘s involved in this linear combination is also an open cover of X. Hence, X is compact! As it is always possible to choose elements in a ring R generating the whole ring, this tells us that every (affine) scheme is compact.

Okay, now let’s show that \mathcal{O}_X defined above is a \mathcal{B}-sheaf.

Theorem: \mathcal{O}_X is actually a \mathcal{B}-sheaf.

Proof: Let X = \text{Spec}(R).Write X_f := D(f) for the principal open set defined by f\in R, and first let’s suppose that f = 1_R so that X_f = X and \mathcal{O}_X (X_f) = R_f = R. Let \left\{X_{f_a}: a\in A\right\} be an open cover for X_f. Since X is compact, by the previous argument, we may assume that this is a finite covering, say \left\{X_{f_1}, \dots, X_{f_n}\right\}. Take g\in\mathcal{O}_X(X_f) = R such that the image of g in each \mathcal{O}_X (X_{f_i}) = R_{f_i} is zero. Translating this into a statement involving elements of R, we know there exist nonnegative integers k_1, \dots, k_n such that f_i^{k_i} g = 0 in R for each 1\leq i\leq n. Set k = \max\left\{k_i : 1\leq i \leq n\right\}. Then every element of the ideal (f_1^k, \dots, f_n^k)\subseteq R annihilates g. You can check that (f_1^k, \dots, f_n^k) contains the ideal (f_1, \dots, f_n)^{nk}. But this is just the ideal R^{nk}=R. Hence every element of R annihilates g, and therefore g=0 in R. So the identity axiom of sheaves holds.

Now suppose we have elements g_i \in R_{f_i} such that the images of g_i and g_j in R_{f_i f_j} are equal. Each g_i \in R_{f_i} is of the form g_i = a_i f_i^{-m_i} for m_i \in \mathbb{Z}. Again take m = \max\left\{m_i: 1\leq i\leq n\right\}; then each f_i^m g_i \in R_{f_i} = L_{f_i} (h_i) is the image of an element h_i \in R under the localisation map L_{f_i} : R\rightarrow R_{f_i}. Now since g_i and g_j are sent to the same element when localised to R_{f_i f_j} we have f_i^M h_j = (f_i f_j)^M g_j = (f_i f_j)^M g_i = f_j^M h_i for some large M.

Since \left\{X_{f_i} :1\leq i\leq n\right\} is an open cover of X, as we have seen this means that (f_1, \dots, f_n) = R. And with the same reasoning as in showing the identity sheaf axiom, we see that (f_1^M, \dots, f_n^M) = R too. Hence there exist elements e_i \in R so that \sum_{i=1}^n e_i f_i^M = 1. Set g = \sum_{i=1}^n e_i h_i. Then for each 1\leq j\leq n we have f_j^M g = \sum_{i=1}^n e_i f_j^M h_i = \sum_{i=1}^n e_i f_i^M h_j = h_j = f_j^M g_j. This shows that in R_{f_j}, L_{f_j} (g) = g_j, so there’s a unique g\in R which restricts to each g_j. This proves the gluing axiom in the case that X_f = X.

Now for an arbitrary 1\neq f\in R, we can cheat! Just set X' = X_f, R' = R_f and f_i' = f f_i for an open cover X' = \bigcup_i X'_{f_i '}. This then reduces everything to the case already proved, because now X' = \text{Spec}(R') and X'_{f'_i} = X_{f_i}. This completes the proof that \mathcal{O}_X is actually a \mathcal{B}-sheaf.

Fab! So we can now use what we know about sheaves to extend the \mathcal{B}-sheaf to a sheaf on the whole of X, which we’ll also call \mathcal{O}_X. Finally, we can make the following definitions:

Definition: an affine scheme is a ringed topological space of the form (\text{Spec}(R), \mathcal{O}_{\text{Spec}(R)}) for some commutative ring R as constructed above.

The general definition which we’ve been working towards so hard is now simple:

Definition: a scheme is a ringed topological space (X,\mathcal{O}_X) such that X is covered by open sets U_i such that there exist commutative rings R_i and isomorphisms U_i \cong \text{Spec}(R_i) (in the category of topological spaces) and \mathcal{O}_X \vert_{U_i} \cong \mathcal{O}_{\text{Spec}(R_i)} (in the category of sheaves on U_i).

So a scheme is patched together from affine schemes – or at least subspaces which are isomorphic to affine schemes as ringed spaces in themselves. After all this work just to make a definition, I think I’ll stop, and we’ll actually look at schemes in more depth in the next post.