Search for probability and statistics terms on Statlect
StatLect

Dimension of a linear space

by , PhD

The dimension of a linear space is defined as the cardinality (i.e., the number of elements) of its bases.

For the definition of dimension to be rigorous, we need two things:

Recall that we have previously defined a basis for a space as a finite set of linearly independent vectors that span the space itself.

Table of Contents

Dimension theorem

We now prove that all the bases of a given linear space have the same cardinality.

Proposition (Dimension theorem) Let $S$ be a linear space. Let [eq1] and [eq2] be two bases of $S$. Then, $n=m$.

Proof

The proof is by contradiction. Suppose that $n
eq m$. Then, we can assume without loss of generality that $n<m$ (you can always exchange the order of the two bases). Denote the first basis by[eq3]and the second basis by[eq4]Since $Y_{0}$ is a basis, there exist $m$ scalars $lpha _{1}$, ...,$lpha _{m}$ such that[eq5]At least one of the scalars must be different from zero because otherwise we would have $x_{1}=0$, in contradiction with our hypothesis that $x_{1} $is linearly independent from the other elements of X. Without loss of generality, we can assume that $lpha _{1}
eq 0$ (if it is not, we can re-number the vectors in the basis). By the basis replacement theorem (see the lecture entitled Basis of a linear space, and in particular the proof of the theorem), we have that[eq6]is also a basis. Because $Y_{1}$ is a basis, there exist $m$ scalars $eta _{1}$, ...,$eta _{m}$ such that[eq7]At least one of the scalars must be different from zero because otherwise we would have $x_{2}=0$. Furthermore, one of [eq8] must be different from zero because otherwise we would have [eq9]which contradicts the hypothesis that $x_{1}$ and $x_{2}$ are linearly independent. We can assume without loss of generality that[eq10]so that we can apply the basis replacement theorem and form a new basis[eq11]We can proceed in this way until we get the basis[eq12]But we now have a contradiction: $Y_{n}$ cannot be a basis because $y_{n+1}$ can be written as a linear combination of [eq13] and, as a consequence, the vectors of $Y_{n}$ are linearly dependent. Therefore, it must be that $m=n$.

Finite-dimensional space

We are going to restrict our definition of dimension to so-called finite-dimensional spaces, defined as follows.

Definition A linear space $S$ is said to be finite-dimensional if and only if there exists at least one finite set of vectors [eq14] such that[eq15]where [eq16] denotes the span of [eq17].

In other words, a space is finite-dimensional if it has a finite spanning set.

Existence of a basis

The following proposition holds.

Proposition Let $S$ be a finite-dimensional linear space. Then, $S$ possesses at least one basis.

Proof

Since $S$ is finite-dimensional, it has a spanning set [eq18]. Choose any $sin S$ such that $s
eq 0$. By itself, $left{ s
ight} $ trivially constitutes a set of linearly independent vectors. By the basis extension theorem, given the independent set $left{ s
ight} $ and the spanning set [eq19], we can extend the independent set to form a basis for $S$.

Definition of dimension

Having established that a linear space always possesses a basis and all its bases have the same cardinality, we are now ready to define the concept of dimension of a linear space.

Definition Let $S$ be a finite-dimensional linear space. Let n be the cardinality (i.e., the number of elements) of any one of its bases. Then, n is called the dimension of $S$.

The following example shows that the definition of dimension agrees with our intuition: the dimension of the space of all Kx1 column vectors is K.

Example Let $S$ be the linear space of all $3	imes 1$ column vectors. Define the three vectors[eq20]Then $e_{1},e_{2},e_{3}$ are a basis for $S$ because 1) any vector [eq21]can be written as[eq22]and 2) no element of the basis can be written as a linear combination of the others (as a consequence, they are linearly independent). Thus, the basis has $3$ elements and the dimension of the space $S$ is $3$.

Note that the dimension of a linear space of column vectors having K entries can be less than K, as shown by the following example.

Example Consider the linear space of all the $3	imes 1$ column vectors[eq23]such that their first two entries can be any scalars $lpha _{1}$ and $lpha _{2}$, and their third entry is equal to 0. Such a space is spanned by the basis[eq24]whose cardinality is equal to $2$. Therefore, the dimension of the space is equal to $2$.

Solved exercises

Below you can find some exercises with explained solutions.

Exercise 1

Read the last example and show that $B$ is indeed a basis.

Solution

Denote the two elements of the basis by[eq25]The two vectors are linearly independent because neither of them is a multiple of the other one. Furthermore, all the vectors of the space can be written as[eq26]that is, as a linear combination of the two vectors belonging to the basis.

Exercise 2

Find the dimension of the linear space $S$ spanned by the two vectors[eq27]

Solution

The linear span of $s_{1}$ and $s_{2}$ is the space $S$ of all vectors that can be written as linear combinations of $s_{1}$ and $s_{2}$. In other words, any $sin S$ can be written as[eq28]where $lpha _{1}$ and $lpha _{2}$ are two scalars. However, the two vectors $s_{1}$ and $s_{2}$ are linearly dependent because[eq29]Therefore, any vector $sin S$ can be written as[eq30]that is, all vectors are multiples of $s_{1}$. Thus, [eq31]is a basis for $S$. Its cardinality is 1. Therefore, the dimension of $S$ is 1.

How to cite

Please cite as:

Taboga, Marco (2021). "Dimension of a linear space", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/dimension-of-a-linear-space.

The books

Most of the learning materials found on this website are now available in a traditional textbook format.