I am reading Ravi Vakil's notes and on page 137 (June 11, 2013 ver.) he explains why $U = \mathbb{A}_k^2 - \{ (x,y) \}$ is not an affine scheme in the following way (Please note I am paraphrasing it here): Suppose $(U, O_{\mathbb{A}^2}|_U)$ is an affine scheme, then we have $ (U, O_{\mathbb{A}^2}|_U) = (Spec $A$, O_{Spec A})$. By considering the global sections we have $$ A = \Gamma(U, O_{\mathbb{A}^2}|_U) \equiv k[x,y]. $$ So if $U$ is affine, then $U \cong \mathbb{A}^2$.
The prime ideal $(x,y)$ of $A$ should cut out a point in Spec $A$ by taking the generic point of V((x,y)). However, on $U$, $V(x) \cap V(y) = \emptyset.$ Contradiction.
I don't quite understand the last part of the argument here. Do we know that the closed subset $V(x)$ on $U$ correspond to $V(x)$ on $\mathbb{A}^2$? I would appreciate if someone could explain me in more detail how we obtain the conclusion at the end. Thanks!
Please note the following was my original question posted: Let $\mathbb{A}_k^2$ be the affine scheme Spec $k [x,y]$, where $k$ is a field. Could someone please explain me how to show $\mathbb{A}_k^2 - \{ (x,y) \}$ is not an affine scheme?
Here is a more detailed explanation whose actual content amounts to just what Vakil says. Suppose that $X = \mathbb{A}^2 \setminus \{0\}$ were affine. Then by what you said about its coordinate ring implies we have an isomorphism $X \overset{\phi}{\to} \mathbb{A}^2$. This induces an isomorphism $\phi^{\#} : \mathcal{O}_X(X) \to k[x, y]$ of coordinate rings. But we know by the earlier computation of the coordinate ring of $X$ that $\mathcal{O}_X(X) \cong k[x', y']$ via some other isomorphism $f$. This means $g := \phi^{\#} \circ f^{-1}$ is an isomorphism $k[x', y'] \to k[x, y]$ (writing $f$ in this way is unusual, and we usually just make this identification implicitly). As this is an isomorphism, the prime ideal $(x', y')$ must map to some prime ideal $\mathfrak{p} \subset k[x, y]$. But we understand the isomorphism $f$ very well, having constructed it by patching functions on open sets of $X$ together. In particular, we know that $V(f^{-1}(x', y')) = V(f^{-1}(x'))\cap V(f^{-1}(y'))$ is empty. But by the correspondence between maps of rings and maps of affine schemes, we get that this (empty) set must be in bijection with $V(\mathfrak{p}) \subset \mathbb{A}^2$. But this latter set cannot be empty, and so we've reached a contradiction.