Find an open subset of $\mathbb{A}^2$ which cannot be isomorphic to any affine variety

Find an open subset of $\mathbb{A}^2$ which (with its given Zariski topology) cannot be isomorphic to any affine variety. [Delete the point (0,0).]

My problem is I don't know how to prove it is impossible for a subset of $\mathbb{A}^2$ to be isomorphic to any affine variety.

-
This was nicely discussed on this site recently by David Speyer. Someone who is better than I am at searching can probably supply the link. – Pete L. Clark Jul 8 '11 at 8:27
I'm sorry, but I can't see the site... Would you please post the site once more? Thank you very much. – ShinyaSakai Jul 8 '11 at 8:41
@Pete: Dear pete, the best idea I can think of is to go to David Speyer's page and search his answers tagged in the algebraic geometry/topology section. – user9413 Jul 8 '11 at 9:04
The idea is that each regular function around $0$ naturally extends to it, so if it was an affine variety then it would be isomorphic to the whole space $A^2$. Because they would share the same regular functions. Unfortunately I need some time to give you a formal proof, because there are some technical details to fill in. – Giovanni De Gaetano Jul 8 '11 at 10:00
OK, see David Speyer's answer to this question: math.stackexchange.com/questions/47356/… – Pete L. Clark Jul 8 '11 at 10:07

Let me just mention a slightly more elementary (local-cohomology free) version of David Speyer's answer in the thread mentioned in the comments. Let $X$ be an affine normal scheme, and let $Z$ be a subset of codimension at least 2 (but nonempty). Then $X-Z$ is not affine. Indeed, $X-Z$ has the same ring of global sections as $X$, by the so-called "algebraic Hartogs lemma" (namely, that singularities of a rational function occur in codimension one for a normal scheme). So if $X-Z$ were affine, the natural map $X-Z \to X$ would be an isomorphism (as both have the same regular functions), which it is clearly not.

-
$@$Akhil: +1. Your answer nicely captures the basic phenomenon at work. – Pete L. Clark Jul 8 '11 at 19:15

And let me mention an even more elementary answer, expanding on Amitesh's hint.

Let $U$ be the punctured affine plane. Assuming that we have shown that there are no regular functions on $\mathbb{A}^2$ which vanish only at one point (I believe this follows from Krull's Hauptidealsatz), then it is clear that a regular function on $U$ is just the same thing as a regular function on $\mathbb{A}^2$. So its ring of regular functions is isomorphic to the ring of regular functions of $\mathbb{A}^2$.

Now consider the embedding $\Phi : U \hookrightarrow \mathbb{A}^2$. If $U$ were affine, then, by the equivalence of categories between $k\textbf{-Var}$ and (a certain full subcategory of) $k\textbf{-Alg}$, $\Phi$ is an isomorphism of varieties if and only if it induces an isomorphism of coordinate rings, and $\Phi$ does induce an isomorphism on each ring of regular functions. Yet $\Phi$ clearly cannot be an isomorphism as it is not surjective on points—a contradiction. So $U$ isn't affine.

-
Thank you for your answer. Although I cannot understand some details, I'll read your answer again when I know more on this subject. – ShinyaSakai Jul 9 '11 at 8:31