affine variety definition I had this very elementary question which baffles me. Most introductions to the topic define an affine variety as a subset of affine space that is the zero-locus of a set of polynomials.
Now, $X:=\mathbb{A}\setminus\{0\}$ does not satisfy this property. Yet I see in many places that it is treated as an affine variety (e.g. on Wikipedia) because it is isomorphic (not biregular, but birational, I guess) to the zero-locus of one variety that does satisfy the above definition (the zero-locus of $\langle xy-1\rangle$ on $\mathbb{A}^2$). Now, there's a circularity problem here, since for two objects to be isomorphic they must first be in the same category, and, according to our original definition, the first object $X$ is not an object in the category of affine varieties (over the given field, say $\mathbb{C}$). I assume there's some reference with a definition that captures this silly issue and gives a broader definition that pleases me, but I can't find it. The question then is: what should such a definition of an affine variety (in a classical sense, that is, avoiding schemes and the like) be? I mean a definition that includes the $X$ above (and similar other objects) as an affine variety.
 A: I am also extremely annoyed when people say things like this. Until you describe what a non-affine variety is, statements like so-and-so is not an affine variety are meaningless: a priori being an affine variety is extra structure on a set, not a property. If being affine is a property if some larger class of objects, you first need to describe what that larger class of objects is!
Let me restrict my attention to $\mathbb{A}^1 \setminus \{ 0 \}$. What sort of object is this? One answer is that it can be usefully thought of as a "Zariski sheaf," namely a functor
$$\mathbb{G}_m : \text{CRing} \ni R \mapsto R^{\times} \in \text{Set}$$
from commutative rings to sets satisfying a sheaf condition. (Note that this does something a bit more general than just "remove the origin" on commutative rings that aren't fields: it removes all non-invertible elements.) The sense in which $\mathbb{G}_m$ is an affine variety, even though it is not a closed subvariety of $\mathbb{A}^1$, is that this sheaf is representable by a commutative ring, namely $\mathbb{Z}[x, x^{-1}]$. 
(A more naive guess is $R \mapsto R \setminus \{ 0 \}$, but this isn't even a functor.) 
Other answers are possible at various levels of sophistication; you can look up the terms "quasi-affine" and "quasi-projective" variety. 
A: Here is the usual workaround.  Let $k$ be the algebraically closed field you're working with.  One has a notion of a sheaf of $k$-algebras on a topological space $X$.  A $k$-ringed space is a pair $(X, \mathcal O_X)$, where $X$ is a topological space, and $\mathcal O_X$ is a sheaf of $k$-algebras on $X$.  You can define morphisms of $k$-ringed spaces, so $k$-ringed spaces form a category.
Now if $Y$ is a closed subset of $k^n$ (in the Zariski topology) for some $n \geq 0$, then one can define a canonical sheaf of $k$-algebras $\mathcal O_Y$ on $Y$.  Namely for $U$ open in $Y$, $\mathcal O_Y(U)$ is the $k$-algebra of regular functions $U \rightarrow k$.  The pair $(Y, \mathcal O_Y)$ is a locally ringed space.
One then defines an affine variety to be any $k$-ringed space $(X, \mathcal O_X)$ satisfying the following property: there exists a closed subset $Y \subseteq k^n$ for some $n \geq 0$, and an isomorphism $f$ from $(X, \mathcal O_X)$ onto $(Y, \mathcal O_Y)$ in the category of $k$-ringed spaces.
In your case, $X := k \setminus \{0\}$ is a locally ringed space with sheaf $\mathcal O_{k|X}$, where $\mathcal O_{k|X}$ is the restriction of the canonical sheaf $\mathcal O_k$ of the closed set $k$.  As you indicated, there is an isomorphism of $k$-ringed spaces of $(X, \mathcal O_{k|X})$ onto the affine variety $(Z(xy-1), \mathcal O_{Z(xy-1)})$.
EDIT: there are a few different, nonequivalent definitions of "affine variety" in the literature.  I saw you tagged this with "algebraic groups" and gave the definition you would find in Springer, assuming $k$ is algebraically closed.  But in most places, e.g. Hartshorne, the definition is different.  For example, a closed subset of $k^n$ is only referred to being affine if it is irreducible.  Worse, there is the notion of an "abstract affine variety," which is a bit different from the definition I just gave, e.g. the underlying space is typically not T1.  I'm getting a bit off-topic here, but there is a fully faithful functor from which (irreducible) affine varieties in your sense correspond to abstract affine varieties in the sense of Hartshorne.
A: The typical choice of the larger category you are referring to is one of the following (in increasing order of generality):


*

*Varieties;

*Schemes;

*Locally ringed spaces.


The category of affine varieties is a full subcategory of each of them. Depending on your definition of variety (there are many different conventions), viewing them as a full subcategory of the category of schemes might require some work. See Hartshorne, Proposition II.2.6 for one such statement. Remarks II.4.10.1 and II.4.10.2 of [loc. cit] also deserve mention here.
Remark. Note by the way that even though $\mathbb A^1 \setminus\{0\} \cong V(xy - 1)$ is affine, the same is not true for $\mathbb A^n \setminus \{0\}$ for $n > 1$. See Hartshorne, Exercise I.3.6 for the case $n = 2$.
A: To first establish a category in which to define 'affine-ness' we will think of the category of varieties over $k$ as in Hartshorne §1.3 where the objects are (quasi)affine and (quasi)projective varieties and morphisms are continuous maps where pushforwards of 'regular' functions are 'regular' (I use quotes because the meaning of regular depends on the object and whether it is embedded in $\mathbb{A}^n$ or $\mathbb{P}^n$.) 
It is perfectly adequate to then define 'affine-ness' as being isomorphic to a closed, irreducible $Y \subseteq \mathbb{A}^n$. After all this is an equivalence relation. This is even a useful mode of thought since varieties are 'locally affine', meaning they have a basis of affine, open sets. So, for instance, if we are checking if a point on a projective variety is singular, a local property, we can reduce to the case of checking if $\mathcal{O} (Y)_\mathfrak{m}$ is regular for some affine $Y$. Determining singularities is now straight forward.
But this characterization misses the point that simple results about affine varieties reveal. The equivalence between the category of affine varieties and the opposite category of finitely generated, integral $k$-domains suggests that the geometry of affine varieties is completely determined just by their global ring $\mathcal{O} (Y)$. Indeed, in an affine variety the radical ideals of the global ring correspond bijectively to the closed subsets, and the regular functions on the complement of a hyperplane $V(f)$ are just localizations by $f$, etc. 
We actually have a fairly basic result which allows us to formulate an if and only if condition for affineness. Recall that if $X, Y$ are varieties then the $k$-homomorphisms $\varphi: A(Y) \to \mathcal{O} (X)$ are induced bijectively from from morphisms $f: X \to Y$ and vice versa. For any variety $Y$ consider the affine variety $\hat{Y}$ corresponding to the $k$-domain $\mathcal{O} (Y)$. The identity map $i: A(\hat{Y}) \to \mathcal{O} (Y)$ induces a morphism $j: Y \to \hat{Y}$. Then $Y$ is affine if and only if $j$ is an isomorphism. We see how this fails for any projective $X, \operatorname{dim} X>0$ as the induced morphism just maps $X$ onto a point. Similarly the variety $W = \mathbb{A}^2 \setminus \{ (0,0) \}$ is not affine because the induced morphism is the injection $Y \hookrightarrow \mathbb{A}^2$.
