## 10.21 Open and closed subsets of spectra

It turns out that open and closed subsets of a spectrum correspond to idempotents of the ring.

Lemma 10.21.1. Let $R$ be a ring. Let $e \in R$ be an idempotent. In this case

$\mathop{\mathrm{Spec}}(R) = D(e) \amalg D(1-e).$

Proof. Note that an idempotent $e$ of a domain is either $1$ or $0$. Hence we see that

\begin{eqnarray*} D(e) & = & \{ \mathfrak p \in \mathop{\mathrm{Spec}}(R) \mid e \not\in \mathfrak p \} \\ & = & \{ \mathfrak p \in \mathop{\mathrm{Spec}}(R) \mid e \not= 0\text{ in }\kappa (\mathfrak p) \} \\ & = & \{ \mathfrak p \in \mathop{\mathrm{Spec}}(R) \mid e = 1\text{ in }\kappa (\mathfrak p) \} \end{eqnarray*}

Similarly we have

\begin{eqnarray*} D(1-e) & = & \{ \mathfrak p \in \mathop{\mathrm{Spec}}(R) \mid 1 - e \not\in \mathfrak p \} \\ & = & \{ \mathfrak p \in \mathop{\mathrm{Spec}}(R) \mid e \not= 1\text{ in }\kappa (\mathfrak p) \} \\ & = & \{ \mathfrak p \in \mathop{\mathrm{Spec}}(R) \mid e = 0\text{ in }\kappa (\mathfrak p) \} \end{eqnarray*}

Since the image of $e$ in any residue field is either $1$ or $0$ we deduce that $D(e)$ and $D(1-e)$ cover all of $\mathop{\mathrm{Spec}}(R)$. $\square$

Lemma 10.21.2. Let $R_1$ and $R_2$ be rings. Let $R = R_1 \times R_2$. The maps $R \to R_1$, $(x, y) \mapsto x$ and $R \to R_2$, $(x, y) \mapsto y$ induce continuous maps $\mathop{\mathrm{Spec}}(R_1) \to \mathop{\mathrm{Spec}}(R)$ and $\mathop{\mathrm{Spec}}(R_2) \to \mathop{\mathrm{Spec}}(R)$. The induced map

$\mathop{\mathrm{Spec}}(R_1) \amalg \mathop{\mathrm{Spec}}(R_2) \longrightarrow \mathop{\mathrm{Spec}}(R)$

is a homeomorphism. In other words, the spectrum of $R = R_1\times R_2$ is the disjoint union of the spectrum of $R_1$ and the spectrum of $R_2$.

Proof. Write $1 = e_1 + e_2$ with $e_1 = (1, 0)$ and $e_2 = (0, 1)$. Note that $e_1$ and $e_2 = 1 - e_1$ are idempotents. We leave it to the reader to show that $R_1 = R_{e_1}$ is the localization of $R$ at $e_1$. Similarly for $e_2$. Thus the statement of the lemma follows from Lemma 10.21.1 combined with Lemma 10.17.6. $\square$

We reprove the following lemma later after introducing a glueing lemma for functions. See Section 10.24.

Lemma 10.21.3. Let $R$ be a ring. For each $U \subset \mathop{\mathrm{Spec}}(R)$ which is open and closed there exists a unique idempotent $e \in R$ such that $U = D(e)$. This induces a 1-1 correspondence between open and closed subsets $U \subset \mathop{\mathrm{Spec}}(R)$ and idempotents $e \in R$.

Proof. Let $U \subset \mathop{\mathrm{Spec}}(R)$ be open and closed. Since $U$ is closed it is quasi-compact by Lemma 10.17.10, and similarly for its complement. Write $U = \bigcup _{i = 1}^ n D(f_ i)$ as a finite union of standard opens. Similarly, write $\mathop{\mathrm{Spec}}(R) \setminus U = \bigcup _{j = 1}^ m D(g_ j)$ as a finite union of standard opens. Since $\emptyset = D(f_ i) \cap D(g_ j) = D(f_ i g_ j)$ we see that $f_ i g_ j$ is nilpotent by Lemma 10.17.2. Let $I = (f_1, \ldots , f_ n) \subset R$ and let $J = (g_1, \ldots , g_ m) \subset R$. Note that $V(J)$ equals $U$, that $V(I)$ equals the complement of $U$, so $\mathop{\mathrm{Spec}}(R) = V(I) \amalg V(J)$. By the remark on nilpotency above, we see that $(IJ)^ N = (0)$ for some sufficiently large integer $N$. Since $\bigcup D(f_ i) \cup \bigcup D(g_ j) = \mathop{\mathrm{Spec}}(R)$ we see that $I + J = R$, see Lemma 10.17.2. By raising this equation to the $2N$th power we conclude that $I^ N + J^ N = R$. Write $1 = x + y$ with $x \in I^ N$ and $y \in J^ N$. Then $0 = xy = x(1 - x)$ as $I^ N J^ N = (0)$. Thus $x = x^2$ is idempotent and contained in $I^ N \subset I$. The idempotent $y = 1 - x$ is contained in $J^ N \subset J$. This shows that the idempotent $x$ maps to $1$ in every residue field $\kappa (\mathfrak p)$ for $\mathfrak p \in V(J)$ and that $x$ maps to $0$ in $\kappa (\mathfrak p)$ for every $\mathfrak p \in V(I)$.

To see uniqueness suppose that $e_1, e_2$ are distinct idempotents in $R$. We have to show there exists a prime $\mathfrak p$ such that $e_1 \in \mathfrak p$ and $e_2 \not\in \mathfrak p$, or conversely. Write $e_ i' = 1 - e_ i$. If $e_1 \not= e_2$, then $0 \not= e_1 - e_2 = e_1(e_2 + e_2') - (e_1 + e_1')e_2 = e_1 e_2' - e_1' e_2$. Hence either the idempotent $e_1 e_2' \not= 0$ or $e_1' e_2 \not= 0$. An idempotent is not nilpotent, and hence we find a prime $\mathfrak p$ such that either $e_1e_2' \not\in \mathfrak p$ or $e_1'e_2 \not\in \mathfrak p$, by Lemma 10.17.2. It is easy to see this gives the desired prime. $\square$

Lemma 10.21.4. Let $R$ be a nonzero ring. Then $\mathop{\mathrm{Spec}}(R)$ is connected if and only if $R$ has no nontrivial idempotents.

Proof. Obvious from Lemma 10.21.3 and the definition of a connected topological space. $\square$

Lemma 10.21.5. Let $R$ be a ring. Let $I$ be a finitely generated ideal. Assume that $I = I^2$. Then $V(I)$ is open and closed in $\mathop{\mathrm{Spec}}(R)$, and $R/I \cong R_ e$ for some idempotent $e \in R$.

Proof. By Nakayama's Lemma 10.20.1 there exists an element $f = 1 + i$, $i \in I$ in $R$ such that $fI = 0$. It follows that $V(I) = D(f)$ by a simple argument. Also, $0 = fi = i + i^2$, and hence $f^2 = 1 + i + i + i^2 = 1 + i = f$, so $f$ is an idempotent. Consider the canonical map $R \to R_ f$. It is surjective since $x/f^ n = x/f = xf/f^2 = xf/f = x/1$ in $R_ f$. Any element of $I$ is in the kernel since $fI = 0$. If $x \mapsto 0$ in $R_ f$, then $f^ nx = 0$ for some $n > 0$ and hence $(1 + i)x = 0$ hence $x \in I$. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).