In mathematics, dimension theory is the study in terms of commutative algebra of the notion dimension of an algebraic variety (and by extension that of a scheme). The need of a theory for such an apparently simple notion results from the existence of many definitions of the dimension that are equivalent only in the most regular cases (see Dimension of an algebraic variety). A large part of dimension theory consists in studying the conditions under which several dimensions are equal, and many important classes of commutative rings may be defined as the rings such that two dimensions are equal; for example, a regular ring is a commutative ring such that the homological dimension is equal to the Krull dimension.