The dimension of a vector space is the number of vectors in a basis over its underlying field. For finite-dimensional spaces, it is a nonnegative integer; for infinite-dimensional spaces, it is an infinite cardinal number. Dimension measures independent linear directions rather than the total number of vectors. It is a fundamental invariant in linear algebra, written , or when the scalar field needs to be specified. (linear.axler.net)
Definition and basis independence
A basis is a set of vectors that satisfies two conditions: linear independence and spanning. Independence means that a finite linear combination of basis vectors equals zero only when all its coefficients are zero. Spanning means that every vector in the space is such a combination. Together, these conditions make the representation unique. If is a basis, then
For finite-dimensional spaces, this counts the basis vectors; more generally, the vertical bars denote cardinality. (github.com)
The definition does not depend on which basis is selected. In the finite case, the essential comparison theorem states that an independent set cannot contain more vectors than a spanning set. Applying this in both directions to two bases proves that their sizes agree. Thus, bases may differ in their vectors and ordering without changing dimension. (webspace.ship.edu)
In an -dimensional space, every independent set has at most vectors, and every spanning set has at least . An independent set of exactly vectors is automatically a basis; so is a spanning set of exactly vectors. These criteria often establish a basis without separately checking both defining conditions. (linear.axler.net)
Coordinates and examples
The coordinate space has dimension . Its standard basis consists of vectors , where has a single entry in position and zeros elsewhere. More generally, an ordered basis gives each vector a unique expression
The assignment is a linear isomorphism with . Consequently, finite-dimensional vector spaces over the same field are isomorphic exactly when their dimensions agree. Dimension classifies their linear structure, but not additional structures such as a chosen inner product. (github.com)
The zero space has dimension zero: its basis is the empty set, not the set containing the zero vector. The space of polynomials of degree at most , including the zero polynomial, has basis
and dimension . A line through the origin has dimension one, while a plane through the origin has dimension two, even when embedded in a larger coordinate space. (linear.axler.net)
Dependence on the scalar field
Dimension belongs to a space together with its scalar field. The complex numbers form a one-dimensional space over , with basis . Over the real numbers, the same set is two-dimensional, with basis , because every complex number has a unique expression with real . (math.stanford.edu)
More generally, a complex vector space of complex dimension has real dimension when scalar multiplication is restricted to real numbers. If is a complex basis, then
is a real basis. The change reflects which coefficients are permitted, rather than any change to the underlying vectors. (math.stanford.edu)
Subspaces and dimension formulas
Every linear subspace of a finite-dimensional space satisfies . A basis of can be extended to a basis of ; equality of dimensions therefore implies . For subspaces , their sum satisfies
The intersection term corrects for directions counted in both subspaces. The quotient space , whose elements are cosets modulo , satisfies
These subtraction formulas apply here to finite-dimensional spaces. (linear.axler.net)
Linear maps and computation
For a linear map with finite-dimensional domain, the rank–nullity theorem states
The kernel consists of vectors mapped to zero; the image consists of outputs attained by the map. Their dimensions are called nullity and rank, respectively. (linear.axler.net)
For an matrix , Gaussian elimination computes these quantities. The rank is the number of pivot columns, while nullity is the number of free variables in . To find the dimension of the span of given coordinate vectors, place them in the columns of a matrix and count its pivots. For a consistent linear system , the solution set is a translate of the kernel and has free parameters. (github.com)
Infinite-dimensional spaces
The polynomial space , without a degree bound, has the countably infinite basis . Every polynomial still uses only finitely many basis vectors. In standard set-theoretic foundations, the axiom of choice guarantees a basis for every vector space, and all bases of a given space have the same cardinality. (stanford.edu)
This algebraic notion must be distinguished from bases involving convergent infinite expansions. In a Hilbert space, an orthonormal basis spans through closure, not necessarily through finite combinations. Thus a Hilbert space can have a countable orthonormal basis while its algebraic, or Hamel, dimension is uncountable. (linear.axler.net)