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;
we need to prove that all the bases of a linear space have the same cardinality (this is the so-called Dimension Theorem).
Remember that in these lecture notes we are concentrating on linear spaces whose elements are finite-dimensional vectors or matrices.
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 byand the second basis bySince is a basis, there exist scalars , ..., such thatAt 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 thatis also a basis. Because is a basis, there exist scalars , ..., such thatAt 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 thatso that we can apply the basis replacement theorem and form a new basisWe can proceed in this way until we get the basisBut 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 .
The following proposition holds.
Proposition Let be a linear space. Then, possesses at least one basis.
Suppose first that the elements of are all the -dimensional vectors, that is, all the vectors having entries. Denote by a vector such that its -th entry is and all the other entries are . Then is a basis for because 1) any vector can be written aswhere is the -th entry of , and 2) no element of can be written as a linear combination of the others (they are linearly independent). Thus, if contains all the -dimensional vectors, then it has at least one basis: the basis shown above. Now, suppose that does not contain all the -dimensional vectors, but just a subset of them. Take any vector . Define If the span of coincides with , then is a basis of . If it does not, then take a vector that does not belong to the span of and definewhich is a set of linearly independent vectors (because of the way in which we have selected ). If spans , then it is a basis of . Otherwise, take a vector that does not belong to the span of and set Continue in this manner until you find a basis. You will find one in less than steps because 1) is included in the set of all -dimensional vectors; 2) we have proved that is a basis for and has cardinality ; 3) by the Dimension Theorem no other basis can have cardinality larger than (a fortiori for which is a subset of the set of all -dimensional vectors). A matrix can be written as a vector by stacking its columns vertically. Thus, the result just proved for vectors can be applied also to matrices.
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 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 -dimensional real vectors (i.e., having real entries) is .
Example Let be the linear space of all vectors having real entries. From the proof of the existence of a basis, we know that is a basis for , where is a vector such that its -th entry is and all the other entries are . Thus, has elements and the dimension of the space is .
Note that the dimension of a linear space of vectors having entries can be less than , as shown by the following example.
Example Consider the linear space of -dimensional vectorssuch that their first two entries can be any scalars and , and their third entry is equal to . Such a space is spanned by the basiswhose 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 asthat 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 aswhere and are two scalars. However, the two vectors and are linearly dependent becauseTherefore, any vector can be written asthat is, all vectors are multiples of . Thus, is a basis for . Its cardinality is . Therefore, the dimension of is .
Most of the learning materials found on this website are now available in a traditional textbook format.