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:
we need to prove that all linear spaces have at least one basis (and we can do so only for some spaces called finite-dimensional spaces);
we need to prove that all the bases of a finite-dimensional space have the same cardinality (this is the so-called Dimension Theorem).
Recall that we have previously defined a basis for a space as a finite set of linearly independent vectors that span the space itself.
We now prove that all the bases of a given linear space have the same cardinality.
Proposition (Dimension
theorem)
Let
be a linear space. Let
and
be two bases of
.
Then,
.
The proof is by contradiction. Suppose that
.
Then, we can assume without loss of generality that
(you can always exchange the order of the two bases). Denote the first basis
by
and
the second basis
by
Since
is a basis, there exist
scalars
,
...,
such
that
At
least one of the scalars must be different from zero because otherwise we
would have
,
in contradiction with our hypothesis that
is
linearly independent from the other elements of
.
Without loss of generality, we can assume that
(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
is
also a basis. Because
is a basis, there exist
scalars
,
...,
such
that
At
least one of the scalars must be different from zero because otherwise we
would have
.
Furthermore, one of
must be different from zero because otherwise we would have
which
contradicts the hypothesis that
and
are linearly independent. We can assume without loss of generality
that
so
that we can apply the basis replacement theorem and form a new
basis
We
can proceed in this way until we get the
basis
But
we now have a contradiction:
cannot be a basis because
can be written as a linear combination of
and, as a consequence, the vectors of
are linearly dependent. Therefore, it must be that
.
We are going to restrict our definition of dimension to so-called finite-dimensional spaces, defined as follows.
Definition
A linear space
is said to be finite-dimensional if and only if there exists at least one
finite set of vectors
such
that
where
denotes the span of
.
In other words, a space is finite-dimensional if it has a finite spanning set.
The following proposition holds.
Proposition
Let
be a finite-dimensional linear space. Then,
possesses at least one basis.
Since
is finite-dimensional, it has a spanning set
.
Choose any
such that
.
By itself,
trivially constitutes a set of linearly independent vectors. By the
basis extension
theorem, given the independent set
and the spanning set
,
we can extend the independent set to form a basis for
.
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
be a finite-dimensional linear space. Let
be the cardinality (i.e., the number of elements) of any one of its bases.
Then,
is called the dimension of
.
The following example shows that the definition of dimension agrees with our
intuition: the dimension of the space of all
column vectors is
.
Example
Let
be the linear space of all
column vectors. Define the three
vectors
Then
are a basis for
because 1) any vector
can
be written
as
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
elements and the dimension of the space
is
.
Note that the dimension of a linear space of column vectors having
entries can be less than
,
as shown by the following example.
Example
Consider the linear space of all the
column
vectors
such
that their first two entries can be any scalars
and
,
and their third entry is equal to
.
Such a space is spanned by the
basis
whose
cardinality is equal to
.
Therefore, the dimension of the space is equal to
.
Below you can find some exercises with explained solutions.
Read the last example and show that
is indeed a basis.
Denote the two elements of the basis
byThe
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
that
is, as a linear combination of the two vectors belonging to the basis.
Find the dimension of the linear space
spanned by the two
vectors
The linear span of
and
is the space
of all vectors that can be written as linear combinations of
and
.
In other words, any
can be written
as
where
and
are two scalars. However, the two vectors
and
are linearly dependent
because
Therefore,
any vector
can be written
as
that
is, all vectors are multiples of
.
Thus,
is
a basis for
.
Its cardinality is
.
Therefore, the dimension of
is
.
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.
Most of the learning materials found on this website are now available in a traditional textbook format.