In mathematics, the

**dimension**of a vector space

*V*is the cardinality (i.e. the number of vectors) of a Hamel basis of

*V*. It is sometimes called

**Hamel dimension**when it is necessary to distinguish it from other types of dimension. Every basis of a vector space has equal cardinality and so the Hamel dimension of a vector space is uniquely defined.

The Hamel dimension is a natural generalization of the dimension of Euclidean space, since *E*^{ n} is a vector space of dimension *n* over **R** (the reals). However, the Hamel dimension depends on the base field, so while **R** has dimension 1 when considered as a vector space over itself, it has dimension *c* (the cardinality of the continuum) when considered as a vector space over **Q** (the rationals).

Some simple formulae relate the Hamel dimension of a vector space with the cardinality of the base field and the cardinality of the space itself.
If *V* is a vector space over a field *K* then, denoting the Hamel dimension of *V* by dim*V*, we have:

- If dim
*V*is finite, then |*V*| = |*K*|^{dimV}. - If dim
*V*is infinite, then |*V*| = max(|*K*|, dim*V*).