# Chapter 22. Dimension

# 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 \(V\) be a vector space. If \(V\) has a basis with \(n\) vectors, then \(V\) is said to have dimension \(n\). We write

$$
\dim V = n.
$$

If no finite basis exists, then \(V\) is called infinite-dimensional.

The zero vector space

$$
\{0\}
$$

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

## 22.2 Dimension of \(\mathbb{R}^n\)

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

$$
e_1,e_2,\ldots,e_n.
$$

There are \(n\) vectors in this basis. Therefore

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

For example,

$$
\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 \(V\) has dimension \(n\), then every vector in \(V\) is described by \(n\) coordinates after a basis is chosen.

Let

$$
B=(v_1,\ldots,v_n)
$$

be a basis of \(V\). Every vector \(v\in V\) has a unique expression

$$
v=c_1v_1+\cdots+c_nv_n.
$$

The coordinate vector is

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

Thus an \(n\)-dimensional vector space behaves like \(F^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 \(V\) 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=(v_1,\ldots,v_n)
$$

is a basis, then every other basis also contains \(n\) vectors.

Therefore \(\dim V\) depends only on the vector space \(V\), not on the chosen basis.

## 22.5 Independent Sets and Spanning Sets

Dimension controls the possible size of independent and spanning sets.

Let

$$
\dim V=n.
$$

Then:

| Statement | Meaning |
|---|---|
| Any independent set has at most \(n\) vectors | There are at most \(n\) independent directions |
| Any spanning set has at least \(n\) vectors | At least \(n\) vectors are needed to generate the space |
| Any independent set with \(n\) vectors is a basis | It already has enough directions |
| Any spanning set with \(n\) vectors is a basis | It has no room for redundancy |

These facts are among the most useful dimension tests.

## 22.6 Dimension of Subspaces

If \(W\) is a subspace of a finite-dimensional vector space \(V\), then

$$
\dim W \leq \dim V.
$$

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

For example, if

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

then the only possible finite dimensions are

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

The corresponding geometric cases are:

| Dimension | Subspace of \(\mathbb{R}^3\) |
|---|---|
| 0 | The zero subspace |
| 1 | A line through the origin |
| 2 | A plane through the origin |
| 3 | All of \(\mathbb{R}^3\) |

## 22.7 Dimension of a Line

Let

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

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

$$
\left(
\begin{bmatrix}
2\\
-1\\
3
\end{bmatrix}
\right)
$$

is linearly independent.

It spans \(W\) by definition. Hence it is a basis of \(W\), and

$$
\dim W=1.
$$

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

## 22.8 Dimension of a Plane

Consider

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

Solve for \(x\):

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

Then

$$
\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=
\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 \(W\), and

$$
\dim W=2.
$$

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

## 22.9 Dimension of Polynomial Spaces

Let \(P_n\) be the vector space of real polynomials of degree at most \(n\).

The list

$$
1,x,x^2,\ldots,x^n
$$

is a basis of \(P_n\). It contains \(n+1\) vectors. Therefore

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

For example,

$$
\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 \(M_{m\times n}(\mathbb{R})\) be the vector space of all \(m\times n\) real matrices.

A matrix in this space has \(mn\) entries. Each entry can vary independently. Therefore

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

For example,

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

because

$$
\begin{bmatrix}
a&b\\
c&d
\end{bmatrix}
$$

has four independent entries.

A standard basis consists of matrices \(E_{ij}\), where \(E_{ij}\) has a \(1\) in position \((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 \(P\) of all real polynomials is infinite-dimensional. The list

$$
1,x,x^2,x^3,\ldots
$$

spans \(P\), 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 \(\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 \(\mathbb{R}\) contain infinitely many vectors even when their dimension is finite.

For example,

$$
\mathbb{R}^2
$$

has infinitely many vectors, but

$$
\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 \(1\).

## 22.13 Dimension and Linear Systems

Dimension appears naturally in solution sets of homogeneous systems.

Consider

$$
Ax=0.
$$

The solution set is the null space of \(A\). Its dimension is called the nullity of \(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 \(0\).

For a matrix with \(n\) columns,

$$
\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 \(A\) is the span of its columns.

Its dimension is called the rank of \(A\):

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

The rank is the number of independent columns of \(A\). It is also the number of pivot columns in a row-reduced form of \(A\).

For example, if a matrix has three columns but only two pivot columns, then its column space has dimension \(2\).

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

$$
\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

$$
\dim V=\dim W=n,
$$

then choosing bases identifies both spaces with

$$
F^n.
$$

Thus they have the same linear structure.

For example, \(P_2\) and \(\mathbb{R}^3\) are isomorphic because both have dimension \(3\). The map

$$
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 \(U\) and \(W\) are finite-dimensional subspaces of \(V\), then

$$
\dim(U+W) =
\dim U+\dim W-\dim(U\cap W).
$$

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

If

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

then

$$
\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
$$

in \(\mathbb{R}^3\) leaves two free parameters. Hence its solution space has dimension \(2\).

The system

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

usually leaves one free parameter, so its solution space has dimension \(1\).

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

## 22.19 Common Dimension Values

| Space | Dimension |
|---|---:|
| \(\{0\}\) | \(0\) |
| \(\mathbb{R}\) | \(1\) |
| \(\mathbb{R}^n\) | \(n\) |
| \(P_n\), polynomials of degree at most \(n\) | \(n+1\) |
| \(M_{m\times n}(\mathbb{R})\) | \(mn\) |
| A line through the origin in \(\mathbb{R}^n\) | \(1\) |
| A plane through the origin in \(\mathbb{R}^3\) | \(2\) |
| \(\operatorname{Col}(A)\) | \(\operatorname{rank}(A)\) |
| \(\operatorname{Null}(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:

| Concept | Meaning |
|---|---|
| Dimension | Number of vectors in any basis |
| Finite-dimensional space | Has a finite basis |
| Infinite-dimensional space | Has no finite basis |
| Dimension of subspace | Number of independent directions inside it |
| Rank | Dimension of the column space |
| Nullity | Dimension of the null space |
| Degrees of freedom | Number of independent parameters |
| Isomorphism criterion | Same 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.
