# Dimension of an algebraic variety

In mathematics and specifically in algebraic geometry, the **dimension** of an algebraic variety may be defined in various equivalent ways.

Some of these definitions are of geometric nature, while some other are purely algebraic and rely on commutative algebra. Some are restricted to algebraic varieties while others apply also to any algebraic set. Some are intrinsic, as independent of any embedding of the variety into an affine or projective space, while other are related to such an embedding.

This definition generalizes a property of the dimension of a Euclidean space or a vector space. It is thus probably the definition that gives the easiest intuitive description of the notion.

This rephrases the previous definition into a more geometric language.

This relates the dimension of a variety to that of a differentiable manifold. More precisely, if *V* if defined over the reals, then the set of its real regular points, if it is not empty, is a differentiable manifold that has the same dimension as a variety and as a manifold.

This is the algebraic analogue to the fact that a connected manifold has a constant dimension. This can also be deduced from the result stated below the third definition, and the fact that the dimension of the tangent space is equal to the Krull dimension at any non-singular point (see Zariski tangent space).

This definition is not intrinsic as it apply only to algebraic sets that are explicitly embedded in an affine or projective space.

This is the algebraic translation of the fact that the intersection of *n* – *d* general hypersurfaces is an algebraic set of dimension *d*.

This allows, through a Gröbner basis computation to compute the dimension of the algebraic set defined by a given system of polynomial equations.

Taking initial ideals preserves Hilbert polynomial/series, and taking radicals preserves the dimension.^{[2]}

This allows to prove easily that the dimension is invariant under birational equivalence.

All the definitions of the previous section apply, with the change that, when *A* or *I* appear explicitly in the definition, the value of the dimension must be reduced by one. For example, the dimension of *V* is one less than the Krull dimension of *A*.

Without further information on the system, there is only one practical method, which consists of computing a Gröbner basis and deducing the degree of the denominator of the Hilbert series of the ideal generated by the equations.

This algorithm is implemented in several computer algebra systems. For example in Maple, this is the function *Groebner[HilbertDimension],* and in Macaulay2, this is the function *dim*.

The *real dimension* of a set of real points, typically a semialgebraic set, is the dimension of its Zariski closure. For a semialgebraic set S, the real dimension is one of the following equal integers:^{[3]}

The real dimension is more difficult to compute than the algebraic dimension.
For the case of a real hypersurface (that is the set of real solutions of a single polynomial equation), there exists a probabilistic algorithm to compute its real dimension.^{[4]}