Skip to content

Chapter 22. Dimension

Dimension is the number of independent directions in a vector space. For a finite-dimensional vector space, it is the number of vectors in any basis. This definition is valid because all bases of a vector space have the same number of elements.

Dimension turns the qualitative ideas of span and independence into a numerical invariant. It tells us how many coordinates are needed to describe each vector in the space.

22.1 Definition

Let VV be a vector space. If VV has a basis with nn vectors, then VV is said to have dimension nn. We write

dimV=n. \dim V = n.

If no finite basis exists, then VV is called infinite-dimensional.

The zero vector space

{0} \{0\}

has dimension 00. Its basis is the empty list. This convention is consistent: no independent direction is needed to describe the zero vector.

22.2 Dimension of Rn\mathbb{R}^n

The standard basis of Rn\mathbb{R}^n is

e1,e2,,en. e_1,e_2,\ldots,e_n.

There are nn vectors in this basis. Therefore

dim(Rn)=n. \dim(\mathbb{R}^n)=n.

For example,

dim(R2)=2,dim(R3)=3. \dim(\mathbb{R}^2)=2, \qquad \dim(\mathbb{R}^3)=3.

The plane has two independent directions. Ordinary three-dimensional space has three independent directions.

22.3 Dimension Counts Coordinates

If VV has dimension nn, then every vector in VV is described by nn coordinates after a basis is chosen.

Let

B=(v1,,vn) B=(v_1,\ldots,v_n)

be a basis of VV. Every vector vVv\in V has a unique expression

v=c1v1++cnvn. v=c_1v_1+\cdots+c_nv_n.

The coordinate vector is

[v]B=[c1cn]. [v]_B= \begin{bmatrix} c_1\\ \vdots\\ c_n \end{bmatrix}.

Thus an nn-dimensional vector space behaves like FnF^n once a basis is fixed.

22.4 Why Dimension Is Well-Defined

The definition of dimension depends on the fact that all bases have the same size. If one basis of VV had three vectors and another had five, then dimension would be ambiguous.

The dimension theorem states that all bases of a vector space have the same cardinality. In finite-dimensional linear algebra, this follows from the exchange principle: an independent set cannot contain more vectors than a spanning set.

In particular, if

B=(v1,,vn) B=(v_1,\ldots,v_n)

is a basis, then every other basis also contains nn vectors.

Therefore dimV\dim V depends only on the vector space VV, not on the chosen basis.

22.5 Independent Sets and Spanning Sets

Dimension controls the possible size of independent and spanning sets.

Let

dimV=n. \dim V=n.

Then:

StatementMeaning
Any independent set has at most nn vectorsThere are at most nn independent directions
Any spanning set has at least nn vectorsAt least nn vectors are needed to generate the space
Any independent set with nn vectors is a basisIt already has enough directions
Any spanning set with nn vectors is a basisIt has no room for redundancy

These facts are among the most useful dimension tests.

22.6 Dimension of Subspaces

If WW is a subspace of a finite-dimensional vector space VV, then

dimWdimV. \dim W \leq \dim V.

A subspace cannot have more independent directions than the space containing it.

For example, if

WR3, W \subseteq \mathbb{R}^3,

then the only possible finite dimensions are

0, 1, 2, 3. 0,\ 1,\ 2,\ 3.

The corresponding geometric cases are:

DimensionSubspace of R3\mathbb{R}^3
0The zero subspace
1A line through the origin
2A plane through the origin
3All of R3\mathbb{R}^3

22.7 Dimension of a Line

Let

W=span([213]). W=\operatorname{span} \left( \begin{bmatrix} 2\\ -1\\ 3 \end{bmatrix} \right).

The spanning vector is nonzero. Therefore the one-vector list

([213]) \left( \begin{bmatrix} 2\\ -1\\ 3 \end{bmatrix} \right)

is linearly independent.

It spans WW by definition. Hence it is a basis of WW, and

dimW=1. \dim W=1.

Every one-dimensional subspace is a line through the origin.

22.8 Dimension of a Plane

Consider

W={(x,y,z)R3:x+2yz=0}. W=\{(x,y,z)\in\mathbb{R}^3:x+2y-z=0\}.

Solve for xx:

x=2y+z. x=-2y+z.

Then

[xyz]=[2y+zyz]=y[210]+z[101]. \begin{bmatrix} x\\ y\\ z \end{bmatrix} = \begin{bmatrix} -2y+z\\ y\\ z \end{bmatrix} = y \begin{bmatrix} -2\\ 1\\ 0 \end{bmatrix} + z \begin{bmatrix} 1\\ 0\\ 1 \end{bmatrix}.

Thus

W=span([210],[101]). W= \operatorname{span} \left( \begin{bmatrix} -2\\ 1\\ 0 \end{bmatrix}, \begin{bmatrix} 1\\ 0\\ 1 \end{bmatrix} \right).

These two vectors are not scalar multiples of one another. Hence they are linearly independent.

Therefore they form a basis of WW, and

dimW=2. \dim W=2.

A single homogeneous linear equation in R3\mathbb{R}^3, when nonzero, usually defines a plane through the origin.

22.9 Dimension of Polynomial Spaces

Let PnP_n be the vector space of real polynomials of degree at most nn.

The list

1,x,x2,,xn 1,x,x^2,\ldots,x^n

is a basis of PnP_n. It contains n+1n+1 vectors. Therefore

dimPn=n+1. \dim P_n=n+1.

For example,

dimP0=1,dimP1=2,dimP2=3. \dim P_0=1, \qquad \dim P_1=2, \qquad \dim P_2=3.

The dimension is one more than the maximum degree because the constant term also gives an independent coefficient.

22.10 Dimension of Matrix Spaces

Let Mm×n(R)M_{m\times n}(\mathbb{R}) be the vector space of all m×nm\times n real matrices.

A matrix in this space has mnmn entries. Each entry can vary independently. Therefore

dimMm×n(R)=mn. \dim M_{m\times n}(\mathbb{R})=mn.

For example,

dimM2×2(R)=4, \dim M_{2\times 2}(\mathbb{R})=4,

because

[abcd] \begin{bmatrix} a&b\\ c&d \end{bmatrix}

has four independent entries.

A standard basis consists of matrices EijE_{ij}, where EijE_{ij} has a 11 in position (i,j)(i,j) and zeros elsewhere.

22.11 Infinite-Dimensional Spaces

A vector space is infinite-dimensional if no finite list spans it.

The vector space PP of all real polynomials is infinite-dimensional. The list

1,x,x2,x3, 1,x,x^2,x^3,\ldots

spans PP, but no finite sublist can span all polynomials. A finite list of polynomials has a maximum degree, so it cannot produce polynomials of higher degree.

The vector space of all real-valued functions on R\mathbb{R} is also infinite-dimensional.

In elementary linear algebra, most spaces are finite-dimensional. Infinite-dimensional spaces become central in analysis, Fourier theory, differential equations, and functional analysis.

22.12 Dimension and Coordinates

Dimension is not the number of elements in a vector space. Most vector spaces over R\mathbb{R} contain infinitely many vectors even when their dimension is finite.

For example,

R2 \mathbb{R}^2

has infinitely many vectors, but

dim(R2)=2. \dim(\mathbb{R}^2)=2.

Dimension counts the number of coordinates needed to specify a vector, not the number of vectors in the space.

Similarly, a line through the origin contains infinitely many vectors, but it has dimension 11.

22.13 Dimension and Linear Systems

Dimension appears naturally in solution sets of homogeneous systems.

Consider

Ax=0. Ax=0.

The solution set is the null space of AA. Its dimension is called the nullity of AA:

nullity(A)=dimNull(A). \operatorname{nullity}(A)=\dim \operatorname{Null}(A).

If there are many free variables, the null space has high dimension. If there are no free variables, the null space has dimension 00.

For a matrix with nn columns,

rank(A)+nullity(A)=n. \operatorname{rank}(A)+\operatorname{nullity}(A)=n.

This is the rank-nullity theorem. It will be studied in detail later.

22.14 Dimension of Column Space

The column space of a matrix AA is the span of its columns.

Its dimension is called the rank of AA:

rank(A)=dimCol(A). \operatorname{rank}(A)=\dim \operatorname{Col}(A).

The rank is the number of independent columns of AA. It is also the number of pivot columns in a row-reduced form of AA.

For example, if a matrix has three columns but only two pivot columns, then its column space has dimension 22.

Thus rank measures the dimension of the output space generated by the matrix.

22.15 Dimension of Row Space

The row space of a matrix is the span of its rows.

The dimension of the row space is also equal to the rank of the matrix. Thus

dimRow(A)=dimCol(A). \dim \operatorname{Row}(A) = \dim \operatorname{Col}(A).

This equality is not obvious from the definitions because row vectors and column vectors live in different spaces. It is one of the fundamental facts revealed by row reduction.

22.16 Dimension and Isomorphism

Two finite-dimensional vector spaces over the same field are isomorphic exactly when they have the same dimension.

If

dimV=dimW=n, \dim V=\dim W=n,

then choosing bases identifies both spaces with

Fn. F^n.

Thus they have the same linear structure.

For example, P2P_2 and R3\mathbb{R}^3 are isomorphic because both have dimension 33. The map

a+bx+cx2[abc] a+bx+cx^2 \mapsto \begin{bmatrix} a\\ b\\ c \end{bmatrix}

is a linear isomorphism.

The objects look different, but their vector space structure is the same.

22.17 Dimension Formula for Sums

If UU and WW are finite-dimensional subspaces of VV, then

dim(U+W)=dimU+dimWdim(UW). \dim(U+W) = \dim U+\dim W-\dim(U\cap W).

This formula corrects double counting. Vectors in the intersection belong to both UU and WW, so their dimension is counted twice in dimU+dimW\dim U+\dim W.

If

UW={0}, U\cap W=\{0\},

then

dim(U+W)=dimU+dimW. \dim(U+W)=\dim U+\dim W.

In that case, the sum is direct.

22.18 Dimension as Degrees of Freedom

Dimension can be interpreted as the number of degrees of freedom.

For example, the equation

x+y+z=0 x+y+z=0

in R3\mathbb{R}^3 leaves two free parameters. Hence its solution space has dimension 22.

The system

x+y+z=0,xy=0 \begin{aligned} x+y+z&=0,\\ x-y&=0 \end{aligned}

usually leaves one free parameter, so its solution space has dimension 11.

Each independent homogeneous linear equation reduces dimension by one. Dependent equations do not reduce dimension further.

22.19 Common Dimension Values

SpaceDimension
{0}\{0\}00
R\mathbb{R}11
Rn\mathbb{R}^nnn
PnP_n, polynomials of degree at most nnn+1n+1
Mm×n(R)M_{m\times n}(\mathbb{R})mnmn
A line through the origin in Rn\mathbb{R}^n11
A plane through the origin in R3\mathbb{R}^322
Col(A)\operatorname{Col}(A)rank(A)\operatorname{rank}(A)
Null(A)\operatorname{Null}(A)nullity(A)\operatorname{nullity}(A)

22.20 Summary

Dimension is the number of vectors in a basis. It counts independent directions, coordinates, or degrees of freedom.

The key ideas are:

ConceptMeaning
DimensionNumber of vectors in any basis
Finite-dimensional spaceHas a finite basis
Infinite-dimensional spaceHas no finite basis
Dimension of subspaceNumber of independent directions inside it
RankDimension of the column space
NullityDimension of the null space
Degrees of freedomNumber of independent parameters
Isomorphism criterionSame finite dimension over the same field

Dimension is one of the main invariants of linear algebra. It tells how large a vector space is in its linear structure, independent of the particular coordinates used to describe it.