Example 26.14.3 (Affine space with zero doubled). Let $k$ be a field. Let $n \geq 1$. Let $X_1 = \mathop{\mathrm{Spec}}(k[x_1, \ldots , x_ n])$, let $X_2 = \mathop{\mathrm{Spec}}(k[y_1, \ldots , y_ n])$. Let $0_1 \in X_1$ be the point corresponding to the maximal ideal $(x_1, \ldots , x_ n) \subset k[x_1, \ldots , x_ n]$. Let $0_2 \in X_2$ be the point corresponding to the maximal ideal $(y_1, \ldots , y_ n) \subset k[y_1, \ldots , y_ n]$. Let $U_{12} = X_1 \setminus \{ 0_1\} $ and let $U_{21} = X_2 \setminus \{ 0_2\} $. Let $\varphi _{12} : U_{12} \to U_{21}$ be the isomorphism coming from the isomorphism of $k$-algebras $k[y_1, \ldots , y_ n] \to k[x_1, \ldots , x_ n]$ mapping $y_ i$ to $x_ i$ (which induces $X_1 \cong X_2$ mapping $0_1$ to $0_2$). Let $X$ be the scheme obtained from the glueing data $(X_1, X_2, U_{12}, U_{21}, \varphi _{12}, \varphi _{21} = \varphi _{12}^{-1})$. Via the slight abuse of notation introduced above the example we think of $X_1, X_2 \subset X$ as open subschemes. There is a morphism $f : X \to \mathop{\mathrm{Spec}}(k[t_1, \ldots , t_ n])$ which on $X_1$ (resp. $X_2$) corresponds to $k$ algebra map $k[t_1, \ldots , t_ n] \to k[x_1, \ldots , x_ n]$ (resp. $k[t_1, \ldots , t_ n] \to k[y_1, \ldots , y_ n]$) mapping $t_ i$ to $x_ i$ (resp. $t_ i$ to $y_ i$). It is easy to see that this morphism identifies $k[t_1, \ldots , t_ n]$ with $\Gamma (X, \mathcal{O}_ X)$. Since $f(0_1) = f(0_2)$ we see that $X$ is not affine.
Note that $X_1$ and $X_2$ are affine opens of $X$. But, if $n = 2$, then $X_1 \cap X_2$ is the scheme described in Example 26.9.3 and hence not affine. Thus in general the intersection of affine opens of a scheme is not affine. (This fact holds more generally for any $n > 1$.)
Another curious feature of this example is the following. If $n > 1$ there are many irreducible closed subsets $T \subset X$ (take the closure of any non closed point in $X_1$ for example). But unless $T = \{ 0_1\} $, or $T = \{ 0_2\} $ we have $0_1 \in T \Leftrightarrow 0_2 \in T$. Proof omitted.
Comments (2)
Comment #2799 by Kat Christianson on
Comment #2902 by Johan on
There are also: