In mathematics, the dimension of a vector space V is the cardinality (i.e. the number of vectors) of a basis of V over its base field.[1][2] It is sometimes called Hamel dimension (after Georg Hamel) or algebraic dimension to distinguish it from other types of dimension.

For every vector space there exists a basis,[a] and all bases of a vector space have equal cardinality;[b] as a result, the dimension of a vector space is uniquely defined. We say ${\displaystyle V}$ is finite-dimensional if the dimension of ${\displaystyle V}$ is finite, and infinite-dimensional if its dimension is infinite.

The dimension of the vector space ${\displaystyle V}$ over the field ${\displaystyle F}$ can be written as ${\displaystyle \dim _{F}(V)}$ or as ${\displaystyle [V:F],}$ read "dimension of ${\displaystyle V}$ over ${\displaystyle F}$". When ${\displaystyle F}$ can be inferred from context, ${\displaystyle \dim(V)}$ is typically written.

## Examples

The vector space ${\displaystyle \mathbb {R} ^{3))$ has

${\displaystyle \left$$(\begin{pmatrix}1\\0\\0\end{pmatrix)),{\begin{pmatrix}0\\1\\0\end{pmatrix)),{\begin{pmatrix}0\\0\\1\end{pmatrix))\right$$)$
as a standard basis, and therefore ${\displaystyle \dim _{\mathbb {R} }(\mathbb {R} ^{3})=3.}$ More generally, ${\displaystyle \dim _{\mathbb {R} }(\mathbb {R} ^{n})=n,}$ and even more generally, ${\displaystyle \dim _{F}(F^{n})=n}$ for any field ${\displaystyle F.}$

The complex numbers ${\displaystyle \mathbb {C} }$ are both a real and complex vector space; we have ${\displaystyle \dim _{\mathbb {R} }(\mathbb {C} )=2}$ and ${\displaystyle \dim _{\mathbb {C} }(\mathbb {C} )=1.}$ So the dimension depends on the base field.

The only vector space with dimension ${\displaystyle 0}$ is ${\displaystyle \{0\},}$ the vector space consisting only of its zero element.

## Properties

If ${\displaystyle W}$ is a linear subspace of ${\displaystyle V}$ then ${\displaystyle \dim(W)\leq \dim(V).}$

To show that two finite-dimensional vector spaces are equal, the following criterion can be used: if ${\displaystyle V}$ is a finite-dimensional vector space and ${\displaystyle W}$ is a linear subspace of ${\displaystyle V}$ with ${\displaystyle \dim(W)=\dim(V),}$ then ${\displaystyle W=V.}$

The space ${\displaystyle \mathbb {R} ^{n))$ has the standard basis ${\displaystyle \left\{e_{1},\ldots ,e_{n}\right\},}$ where ${\displaystyle e_{i))$ is the ${\displaystyle i}$-th column of the corresponding identity matrix. Therefore, ${\displaystyle \mathbb {R} ^{n))$ has dimension ${\displaystyle n.}$

Any two finite dimensional vector spaces over ${\displaystyle F}$ with the same dimension are isomorphic. Any bijective map between their bases can be uniquely extended to a bijective linear map between the vector spaces. If ${\displaystyle B}$ is some set, a vector space with dimension ${\displaystyle |B|}$ over ${\displaystyle F}$ can be constructed as follows: take the set ${\displaystyle F(B)}$ of all functions ${\displaystyle f:B\to F}$ such that ${\displaystyle f(b)=0}$ for all but finitely many ${\displaystyle b}$ in ${\displaystyle B.}$ These functions can be added and multiplied with elements of ${\displaystyle F}$ to obtain the desired ${\displaystyle F}$-vector space.

An important result about dimensions is given by the rank–nullity theorem for linear maps.

If ${\displaystyle F/K}$ is a field extension, then ${\displaystyle F}$ is in particular a vector space over ${\displaystyle K.}$ Furthermore, every ${\displaystyle F}$-vector space ${\displaystyle V}$ is also a ${\displaystyle K}$-vector space. The dimensions are related by the formula

${\displaystyle \dim _{K}(V)=\dim _{K}(F)\dim _{F}(V).}$
In particular, every complex vector space of dimension ${\displaystyle n}$ is a real vector space of dimension ${\displaystyle 2n.}$

Some formulae relate the dimension of a vector space with the cardinality of the base field and the cardinality of the space itself. If ${\displaystyle V}$ is a vector space over a field ${\displaystyle F}$ then and if the dimension of ${\displaystyle V}$ is denoted by ${\displaystyle \dim V,}$ then:

If dim ${\displaystyle V}$ is finite then ${\displaystyle |V|=|F|^{\dim V}.}$
If dim ${\displaystyle V}$ is infinite then ${\displaystyle |V|=\max(|F|,\dim V).}$

## Generalizations

A vector space can be seen as a particular case of a matroid, and in the latter there is a well-defined notion of dimension. The length of a module and the rank of an abelian group both have several properties similar to the dimension of vector spaces.

The Krull dimension of a commutative ring, named after Wolfgang Krull (1899–1971), is defined to be the maximal number of strict inclusions in an increasing chain of prime ideals in the ring.

### Trace

The dimension of a vector space may alternatively be characterized as the trace of the identity operator. For instance, ${\displaystyle \operatorname {tr} \ \operatorname {id} _{\mathbb {R} ^{2))=\operatorname {tr} \left({\begin{smallmatrix}1&0\\0&1\end{smallmatrix))\right)=1+1=2.}$ This appears to be a circular definition, but it allows useful generalizations.

Firstly, it allows for a definition of a notion of dimension when one has a trace but no natural sense of basis. For example, one may have an algebra ${\displaystyle A}$ with maps ${\displaystyle \eta :K\to A}$ (the inclusion of scalars, called the unit) and a map ${\displaystyle \epsilon :A\to K}$ (corresponding to trace, called the counit). The composition ${\displaystyle \epsilon \circ \eta :K\to K}$ is a scalar (being a linear operator on a 1-dimensional space) corresponds to "trace of identity", and gives a notion of dimension for an abstract algebra. In practice, in bialgebras, this map is required to be the identity, which can be obtained by normalizing the counit by dividing by dimension (${\displaystyle \epsilon :=\textstyle {\frac {1}{n))\operatorname {tr} }$), so in these cases the normalizing constant corresponds to dimension.

Alternatively, it may be possible to take the trace of operators on an infinite-dimensional space; in this case a (finite) trace is defined, even though no (finite) dimension exists, and gives a notion of "dimension of the operator". These fall under the rubric of "trace class operators" on a Hilbert space, or more generally nuclear operators on a Banach space.

A subtler generalization is to consider the trace of a family of operators as a kind of "twisted" dimension. This occurs significantly in representation theory, where the character of a representation is the trace of the representation, hence a scalar-valued function on a group ${\displaystyle \chi :G\to K,}$ whose value on the identity ${\displaystyle 1\in G}$ is the dimension of the representation, as a representation sends the identity in the group to the identity matrix: ${\displaystyle \chi (1_{G})=\operatorname {tr} \ I_{V}=\dim V.}$ The other values ${\displaystyle \chi (g)}$ of the character can be viewed as "twisted" dimensions, and find analogs or generalizations of statements about dimensions to statements about characters or representations. A sophisticated example of this occurs in the theory of monstrous moonshine: the ${\displaystyle j}$-invariant is the graded dimension of an infinite-dimensional graded representation of the monster group, and replacing the dimension with the character gives the McKay–Thompson series for each element of the Monster group.[3]