In algebraic geometry, an affine variety over an algebraically closed field k is the zero-locus in the affine n-space of some finite family of polynomials of n variables with coefficients in k that generate a prime ideal. If the condition of generating a prime ideal is removed, such a set is called an (affine) algebraic set. A Zariski open subvariety of an affine variety is called a quasi-affine variety.
If X is an affine variety defined by a prime ideal I, then the quotient ring
is called the coordinate ring of X. This ring is precisely the set of all regular functions on X; in other words, it is the space of global sections of the structure sheaf of X. A theorem of Serre gives a cohomological characterization of an affine variety: that is, an algebraic variety is affine if and only if
for any and any quasi-coherent sheaf F on X. (cf. Cartan's theorem B.) This makes the cohomological study of an affine variety non-existent, in a sharp contrast to the projective case in which cohomology groups of line bundles are of central interest.
An affine variety plays a role of a local chart for algebraic varieties; that is to say, general algebraic varieties such as projective varieties are obtained by gluing affine varieties. Linear structures that are attached to varieties are also (trivially) affine varieties; e.g., tangent spaces.
The most concrete point of view to describe an affine algebraic variety is that it is the set of solutions of a system of polynomial equations with coefficients in an algebraically closed field k. In short,
where is the maximal spectrum of the ring; i.e., the set of all maximal ideals and are polynomials that generate a prime ideal in .
The correspondence is given as follows. Let k be a field. Given the intersection of the zeros of 's, there is the canonical injection
Example: Let . Then there are three kinds of prime ideals in A:
- Principal ideals generated by irreducible polynomials.
- Maximal ideals
- They correspond to , hypersurfaces and (closed) points of .
Let A be the quotient of the polynomial ring by a prime ideal (equivalently, an integral domain of finite type over k). Each element f in A is then identified with the function by letting be the image of in . This is another form of the Hilbert nullstellensatz. If f is nonzero, then let (i.e., the complement of ) and then denote the localization by
Let be the topological space with the topology generated by (called the Zariski topology). Then, with the above definition, is the sheaf on X; called the structure sheaf of X. Together with the structure sheaf, X is called an affine variety.
Elements of A are called the regular functions on X and elements of regular functions on that open set . (Intuitively, any function , g regular globally, should be regular on the complement of the zeros of f.)
One can show that the three numbers: the topological dimension of X, the Krull dimension of A and the transcendental degree of the field of the fractions of A all coincide. The common number is called the dimension of the variety X.
First properties 
Let where A, B are integral domains that are the quotient of the polynomial ring , k an algebraically closed field.
- A morphism of affine varieties: Each k-algebra homomorphism defines the continuous function by
- (It is true for this particular ring that the pre-image of a maximal ideal is maximal; cf. Jacobson ring) Any function arises in this way is called a morphism of affine varieties. Now, if Y is k, then may be identified with a regular function. By the same logic, if , then can be thought of as an n-tuple of regular functions. Since , a morphism between affine varieties in general would have this form.
- Any closed subset of an affine variety has the form ; in particular, it is an affine variety.
- For any f in A, the open set is an affine subvariety of X isomorphic to . Not every open subvariety is of this form
- The normalization of an affine variety is affine.
Rational points 
|This section requires expansion. (March 2013)|
Tangent spaces 
|This section requires expansion. (March 2013)|
Tangent spaces may be defined just as in calculus. Let be the affine variety. Then the affine subvariety of defined by the linear equations
is called the tangent space at  (A more intrinsic definition is given by Zariski tangent space.) If the tangent space at x and the variety X have the same dimension, the point x is said to be smooth; otherwise, singular.
The important difference from calculus is that the inverse function theorem fails. To alleviate this problem, one has to consider the étale topology instead of the Zariski topology. (cf. Milne, Étale)
See also: Tangent space to a functor.
The original article was written as a partial human translation of the corresponding French article.