I'm not sure whether this is nontrivial or not, but do there exist simple examples of an affine scheme $X$ having an open affine subscheme $U$ which is not principal in $X$? By a principal open of $X = \mathrm{Spec} \ A$, I mean anything of the form $D(f) = \{\mathfrak p \in \mathrm{Spec} \ A : f \notin \mathfrak p\}$, where $f$ is an element of $A$.
6 Answers
Let X be an elliptic curve with the identity element O removed. Let U=XP where P is a point of infinite order. Then U is affine by a RiemannRoch argument. Now suppose that U=D(f). Then on the entire elliptic curve, the divisor of f must be supported at P and O only. This implies that P is a torsion point, a contradiction.

$\begingroup$ Beautiful  do you think this is the "simplest" example we can get? (As far as "simple" is welldefined in this context...) $\endgroup$– WandererNov 30, 2009 at 0:12

$\begingroup$ Its the simplest compact example, because the curve of genus 0 has no open affine subschemes which aren't principal. $\endgroup$ Nov 30, 2009 at 1:00

$\begingroup$ @GregMuller is this example compact? Does not he remove the origin from the elliptic curve (making it noncompact, presumably)? $\endgroup$– user137767Apr 9, 2019 at 14:26

1$\begingroup$ It's not compact. I think it's the simplest geometric example. $\endgroup$ Apr 10, 2019 at 0:37
For a simple, really concrete example you can also look at:
$A=k[x,y,u,v]/(xy+ux^2+vy^2)$, $X =Spec(A)$, $I=(x,y)$, $U = D(I)$.
Then the functions $f=\frac{v}{x}=\frac{y+ux}{y^2}$ and $g=\frac{u}{y}=\frac{x+vy}{x^2}$ are defined on $U$. But $yf+xg=1$, so $U$ is affine!
Cheers,

5


$\begingroup$ Why does $Yf+Xg=1$ imply that $U$ is affine? $\endgroup$ Nov 27, 2012 at 1:19

4$\begingroup$ How do you show $D(X,Y)$ is not principal? $\endgroup$ Dec 29, 2014 at 6:12

2$\begingroup$ @Alison Miller: Take f_1=X, f_2=Y with notation from Hartshorne exercise II.2.17. What we need, is that U_X and U_Y are affine, and this obviously holds since U_X is the principal open subset D(X) of Spec(A), and similarly for U_Y. $\endgroup$ May 15, 2015 at 19:36
I just want to remark that there is a purely categorical characterization of the ideals $I \subseteq A$ such that the corresponding open subscheme $D(I) = V(I)^c$ of $\text{Spec}(A)$ is affine, namely that the ideal $I$ is codisjunctable. This means that there is a universal homomorphism $A \to B$ satisfying $IB=B$. This notion is studied in
Yves Diers, Codisjunctors and Singular Epimorphisms in the Category of Commutative Rings, Journal of Pure and Applied Algebra, 53, 1988, pp. 39  57

1

1$\begingroup$ @Babai: Consider the functor $\mathsf{CRing} \to \mathsf{Set}$ mapping $B$ to the set of homomorphisms $A \to B$ such that $IB=B$. Then, $I$ is called codisjunctable iff this functor is representable. $\endgroup$ Oct 21, 2016 at 13:58
Here is arguably the easiest example (morally of course the same as Peter McNamara's): The cuspidal affine cubic.
Let $k$ be a field of characteristic zero and let $A=k[x,y]/(y^2x^3)$, $X=\operatorname{Spec}A$, and $U=X\setminus \{(1,1)\}$.
$U$ is not a distinguished open: We have the isomorphism $A\simeq k[t^2,t^3] \subset k[t]$ given by $x\mapsto t^2, y\mapsto t^3$. So suppose there is a polynomial $f(x,y)$ representing a function in $A$ that vanishes only at $(1,1)$. Then $f(t^2,t^3)$ is a polynomial in $t$ that vanishes only at $t=1$. Therefore we have an equality, $f(t^2,t^3)= C(t1)^N$, for some $0\neq C\in k$ and some $N>0$. This is absurd, as one sees by considering the $t$coefficient.
$U$ is in fact affine: This follows either from Hartshorne II, 2.17 b), by considering the open subsets $U\cap D(x1)$ and $U\cap D(y1)$, or one can proceed as follows: By geometric intuition, one may expect the coordinate ring of $U$ to be the subring $B$ of $k(t)$ consisting of those elements $f$ satisfying $f'(0)=0$ and $f$ has no poles outside of $t=1$. Then it remains to show that $\operatorname{Spec} A\to \operatorname{Spec} B$ is an isomorphism onto $U$. One can check directly that the image is $U$, and we get isomorphisms after localizing at $t^21$ and $t^31$ respectively, which shows the claim.
Remarks: Instead of $(1,1)$ one can of course take any point on $X$ away from the origin. A similar argument works for the nodal cubic as long as one takes a point that doesn't correspond to a root of unity in the group law. That way one also gets an easy example in positive characteristic (although not over a finite field...).

$\begingroup$ Do you know if this example works also if the characteristic is positive? $\endgroup$– FunctorMay 10, 2022 at 21:32
Here is an example that may be considered easier than Hailong Dao's. (At least it is one dimensional smaller!)
Consider the ring $R=\mathbb{Z}[x,y,z]/\langle xyz(z1)\rangle$ and the ideal $I=\langle x,z\rangle$.
The ideal $I$ is not the radical of a principal ideal. So the complement of $\mathrm{Spec}(R/I)$ in $\mathrm{Spec}(R)$ is not $R_r$ for any $r$ in $R$.
In fact, this complement is given by the ring homomorphism $R\to S=\mathbb{Z}[x,t]$ where $z\mapsto 1+xt$ and $y\mapsto (1+xt)t$. In other words, the complement is $\mathrm{Spec}(S)\to\mathrm{Spec}(R)$ via this ring homomorphism.
To see this, let $f:R\to A$ be a ring homomorphism such that $f(x)$ and $f(z)$ generate the unit ideal. This means $af(x)+bf(z)=1$ for some $a,b\in A$.
Now, let $\tilde{f}(t)=a(f(z)1)+bf(y)$. One checks that this extends $f$ to $\tilde{f}:S\to A$.
I'm not entirely sure what you mean, but if you mean whose complement isn't principal, take $\mathbb{A}^2\setminus\{0\}$ which is an open subscheme of $\mathbb{A}^2$. Now, if you mean that the open subscheme isn't cut out by a single equation, any open subscheme other than the whole space will do for an irreducible scheme, because the only open set which is cut out by an ideal is the whole scheme.

$\begingroup$ I clarified my question... Sorry for being a bit vague. But your answer doesn't work, obviously. $\endgroup$– WandererNov 29, 2009 at 20:18

$\begingroup$ My answer still works. There is no function $f\in k[x,y]$ such that $f=0$ iff $x=y=0$, so $\mathbb{A}^2\setminus\{0\}$ is not determined by the nonvanishing of a single function. $\endgroup$ Nov 29, 2009 at 20:20

13$\begingroup$ But it's not affine, and that's really the point of the question! $\endgroup$– WandererNov 29, 2009 at 20:22
