Skip to main content
5 of 5
replaced http://mathoverflow.net/ with https://mathoverflow.net/

The abstract reason for this is that $\mathbb A^2$ satisfies Serre's property $(S_2)$ (which follows from being smooth) and hence every regular function is determined in codimension $1$. In other words, the point is that a regular function on $\mathbb A^2\setminus \{0\}$ is a rational function on $\mathbb A^2$ and the locus of indeterminacy of a rational function on $\mathbb A^2$ is of pure codimension $1$ (think of meromorphic functions on $\mathbb C^2$), so if you leave out something of codimension at least $2$, then you cannot get new regular functions. This implies that the natural injection of the ring of regular functions on $\mathbb A^2\setminus \{0\}$ into the ring of regular functions on $\mathbb A^2$ is an isomorphism, but then they can't be both affine as then they would have to be isomorphic. (Note that I did not just say that their rings of regular functions are isomorphic, but that the isomorphism is induced by the embedding).

More generally this argument shows that if $X$ is an affine variety of dimension at least $2$ and $P\in X$ is a closed point such that $\mathrm{depth}_P\mathscr O_X\geq 2$ (this is automatic if for example $X$ is normal, or a complete intersection in something smooth, or Cohen-Macaulay), then $X\setminus\{P\}$ is not affine.

This is an instance of Hartogs' theorem on extending holomorphic functions on normal complex analytic spaces. See this MO question for more.

Sándor Kovács
  • 42.9k
  • 2
  • 109
  • 155