# Affine variety

In algebraic geometry, an **affine variety**, or **affine algebraic variety**, over an algebraically closed field *k* is the zero-locus in the affine space *k*^{n} 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.

Some texts do not require a prime ideal, and call *irreducible* an algebraic variety defined by a prime ideal. This article refers to zero-loci of not necessarily prime ideals as **affine algebraic sets**.

In some contexts, it is useful to distinguish the field k in which the coefficients are considered, from the algebraically closed field K (containing k) over which the zero-locus is considered (that is, the points of the affine variety are in *K*^{n}). In this case, the variety is said *defined over* k, and the points of the variety that belong to *k*^{n} are said *k-rational* or *rational over* k. In the common case where k is the field of real numbers, a k-rational point is called a *real point*.[1] When the field k is not specified, a *rational point* is a point that is rational over the rational numbers. For example, Fermat's Last Theorem asserts that the affine algebraic variety (it is a curve) defined by *x*^{n} + *y*^{n} − 1 = 0 has no rational points for any integer n greater than two.