Skip to main content

Section 1.7 Basis and dimension

Next, we begin with an important result, sometimes known as the “Fundamental Theorem”:

Strategy.

We won’t give a complete proof of this theorem. The idea is straightforward, but checking all the details takes some work. Since {v1,,vk} is a spanning set, each of the vectors in our independent set can be written as a linear combination of v1,,vk. In particular, we can write
w1=a1v1+a2v2++anvn
for scalars a1,,an, and these scalars can’t all be zero. (Why? And why is this important?)
The next step is to argue that V=span{w1,v2,,vn}; that is, that we can replace v1 by w1 without changing the span. This will involve chasing some linear combinations, and remember that we need to check both inclusions to prove set equality. (This step requires us to have assumed that the scalar a1 is nonzero. Do you see why?)
Next, we similarly replace v2 with w2. Note that we can write
w2=aw1+b2v2++bnvn,
and at least one of the bi must be nonzero. (Why can’t they all be zero? What does Exercise 1.6.10 tell you about {w1,w2}?)
If we assume that b2 is one of the nonzero scalars, we can solve for v2 in the equation above, and replace v2 by w2 in our spanning set. At this point, you will have successfully argued that V=span{w1,w2,v3,,vn}.
Now, we repeat the process. If mn, we eventually run out of wi vectors, and all is well. The question is, what goes wrong if m>n? Then we run out of vj vectors first. We’ll be able to write V=span{w1,,wn}, and there will be some vectors wn+1,,wm leftover. Why is this a problem? (What assumption about the wi will we contradict?)
If a set of vectors spans a vector space V, but it is not independent, we observed that it is possible to remove a vector from the set and still span V using a smaller set. This suggests that spanning sets that are also linearly independent are of particular importance, and indeed, they are important enough to have a name.

Definition 1.7.2.

Let V be a vector space. A set B={e1,,en} is called a basis of V if B is linearly independent, and spanB=V.
The importance of a basis is that vector vector vV can be written in terms of the basis, and this expression as a linear combination of basis vectors is unique. Another important fact is that every basis has the same number of elements.

Strategy.

One way of proving the equality m=n is to show that mn and mn. We know that since both sets are bases, both sets are independent, and they both span V. Can you see a way to use Theorem 1.7.1 (twice)?

Proof.

Let A={e1,,en} and let B={f1,,fm}. Since both A and B are bases, both sets are linearly independent, and both sets span V. Since A is independent and spanB=V, we must have nm, by Theorem 1.7.1. Similarly, since spanA=V and B is independent, we must have nm, and therefore, n=m.
Suppose V=span{v1,,vn}. If this set is not linearly independent, Theorem 1.4.10 tells us that we can remove a vector from the set, and still span V. We can repeat this procedure until we have a linearly independent set of vectors, which will then be a basis. These results let us make a definition.

Definition 1.7.4.

Let V be a vector space. If V can be spanned by a finite number of vectors, then we call V a finite-dimensional vector space. If V is finite-dimensional (and non-trivial), and {e1,,en} is a basis of V, we say that V has dimension n, and write
dimV=n.
If V cannot be spanned by finitely many vectors, we say that V is infinite-dimensional.

Exercise 1.7.5.

Find a basis for U={XM22|XA=AX}, if A=[1100]

Example 1.7.6. Standard bases.

Most of the vector spaces we work with come equipped with a standard basis. The standard basis for a vector space is typically a basis such that the scalars needed to express a vector in terms of that basis are the same scalars used to define the vector in the first place. For example, we write an element of R3 as (x,y,z) (or x,y,z, or [xyz], or [xyz]…). We can also write
(x,y,z)=x(1,0,0)+y(0,1,0)+z(0,0,1).
The set {(1,0,0),(0,1,0),(0,0,1)} is the standard basis for R3. In general, the vector space Rn (written this time as column vectors) has standard basis
e1=[100],e2=[010],,en=[001].
From this, we can conclude (unsurprisingly) that dimRn=n.
Similarly, a polynomial p(x)Pn(R) is usually written as
p(x)=a0+a1x+a2x2++anxn,
suggesting the standard basis {1,x,x2,,xn}. As a result, we see that dimPn(R)=n+1.
For one more example, we note that a 2×2 matrix AM22(R) can be written as
[abcd]=a[1000]+b[0100]+c[0010]+d[0001],
which suggests a standard basis for M22(R), with similar results for any other matrix space. From this, we can conclude (exercise) that dimMmn(R)=mn.

Exercise 1.7.7.

Show that the following sets are bases of R3.

(b)

{(1,1,1),(1,1,1),(1,1,1)}
The next two exercises are left to the reader to solve. In each case, your goal should be to turn the questions of independence and span into a system of equations, which you can then solve using the computer.

Exercise 1.7.8.

Show that the following is a basis of M22:
{[1001],[0110],[1101],[1000]}.
Hint.
For independence, consider the linear combination
w[1001]+x[0110]+y[1101]+z[1000]=[1001].
Combine the left-hand side, and then equate entries of the matrices on either side to obtain a system of equations.

Exercise 1.7.9.

Show that {1+x,x+x2,x2+x3,x3} is a basis for P3.
Hint.
For independence, consider the linear combination
a(1+x)+b(x+x2)+c(x2+x3)+dx3=0.
When dealing with polynomials, we need to collect like terms and equate coefficients:
a1+(a+b)x+(b+c)x2+(c+d)x3=0,
so the coefficients a,a+b,b+c,c+d must all equal zero.

Exercise 1.7.10.

Find a basis and dimension for the following subspaces of P2:
We’ve noted a few times now that if wspan{v1,,vn}, then
span{w,v1,,vn}=span{v1,,vn}
If w is not in the span, we can make another useful observation:

Strategy.

We want to show that a set of vectors is linearly independent, so we should begin by setting a linear combination of these vectors equal to the zero vector. Our goal is to show that all the coefficients have to be zero.
Since the vector u is “special”, its coefficient gets a different treatment, using a familiar tautology: either this coefficient is zero, or it isn’t.
what if the coefficient of u is nonzero? Does that contradict one of our assumptions? If the coefficient of u is zero, then it disappears from our linear combination. What assumption applies to the remaining vectors?

Proof.

Suppose S={v1,,vn} is independent, and that uspanS. Suppose we have
au+c1v1+c2v2++cnbn=0
for scalars a,c1,,cn. We must have a=0; otherwise, we can multiply by 1a and rearrange to obtain
u=c1av1cnavn,
but this would mean that uspanS, contradicting our assumption.
With a=0 we’re left with
c1v1+c2v2++cnbn=0,
and since we assumed that the set S is independent, we must have c1=c2==cn=0. Since we already showed a=0, this shows that {u,v1,,vn} is independent.
This is, in fact, an “if and only if” result. If uspan{v1,,vn}, then {u,v1,,vn} is not independent. Above, we argued that if V is finite dimensional, then any spanning set for V can be reduced to a basis. It probably won’t surprise you that the following is also true.

Strategy.

We have an independent set of vectors that doesn’t span our subspace. That means there must be some vector in U that isn’t in the span, so Lemma 1.7.11 applies: we can add that vector to our set, and get a larger independent set.
Now it’s just a matter of repeating this process until we get a spanning set. But there’s one gap: how do we know the process has to stop? Why can’t we just keep adding vectors forever, getting larger and larger independent sets?

Proof.

This follows from Lemma 1.7.11. If our independent set of vectors spans U, then it’s a basis and we’re done. If not, we can find some vector not in the span, and add it to our set to obtain a larger set that is still independent. We can continue adding vectors in this fashion until we obtain a spanning set.
Note that this process must terminate: V is finite-dimensional, so there is a finite spanning set for V. By the Steinitz Exchange lemma, our independent set cannot get larger than this spanning set.

Strategy.

Much of this theorem sums up some of what we’ve learned so far: As long as a vector space V contains a nonzero vector v, the set {v} is independent and can be enlarged to a basis, by Lemma 1.7.12. The size of any spanning set is at least as big as the dimension of V, by Theorem 1.7.1.
To understand why we can enlarge a given independent set using elements of an existing basis, we need to think about why there must be some vector in this basis that is not in the span of our independent set, so that we can apply Lemma 1.7.12.

Proof.

Let V be a finite-dimensional, non-trivial vector space. If v0 is a vector in V, then {v} is linearly independent. By Lemma 1.7.12, we can enlarge this set to a basis of V, so V has a basis.
Now, suppose V=span{w1,,wm}, and let B={v1,,vn} be a basis for V. By definition, we have dimV=n, and by Theorem 1.7.1, since B is linearly independent, we must have nm.
Let us now consider an independent set I={u1,,uk}. Since I is independent and B spans V, we must have kn. If spanIV, there must be some element of B that is not in the span of I: if every element of B is in spanI, then spanI=span(BI) by Theorem 1.4.10. And since B is a basis, it spans V, so every element of I is in the span of B, and we similarly have that span(BI)=spanB, so spanB=spanI.
Since we can find an element of B that is not in the span of I, we can add that element to I, and the resulting set is still independent. If the new set spans V, we’re done. If not, we can repeat the process, adding another vector from B. Since the set B is finite, this process must eventually end.

Exercise 1.7.14.

Find a basis of M22(R) that contains the vectors
v=[1100],w=[0101].

Exercise 1.7.15.

Extend the set {1+x,x+x2,xx3} to a basis of P3(R).

Exercise 1.7.16.

Give two examples of infinite-dimensional vector spaces. Support your answer.

Exercise 1.7.17.

Determine whether the following statements are true or false.

(a)

    A set of 2 vectors can span R3.
  • True.

  • We know that the standard basis for R3 contains three vectors, and as a basis, it is linearly independent. According to Theorem 1.7.1, a spanning set cannot be larger than an independent set.
  • False.

  • We know that the standard basis for R3 contains three vectors, and as a basis, it is linearly independent. According to Theorem 1.7.1, a spanning set cannot be larger than an independent set.

(b)

    It is possible for a set of 2 vectors to be linearly independent in R3.
  • True.

  • There are many such examples, including {(1,0,0),(0,1,0)}.
  • False.

  • There are many such examples, including {(1,0,0),(0,1,0)}.

(c)

    A set of 4 vectors can span R3.
  • True.

  • Add any vector you want to a basis for R3, and the resulting set will span.
  • False.

  • Add any vector you want to a basis for R3, and the resulting set will span.

(d)

    It is possible for a set of 4 vectors to be linearly independent in R3.
  • True.

  • We know that 3 vectors can span R3, and an independent set cannot be larger than a spanning set.
  • False.

  • We know that 3 vectors can span R3, and an independent set cannot be larger than a spanning set.
Let’s recap our results so far:
  • A basis for a vector space V is an independent set of vectors that spans V.
  • The number of vectors in any basis of V is a constant, called the dimension of V.
  • The number of vectors in any independent set is always less than or equal to the number of vectors in a spanning set.
  • In a finite-dimensional vector space, any independent set can be enlarged to a basis, and any spanning set can be cut down to a basis by deleting vectors that are in the span of the remaining vectors.
Another important aspect of dimension is that it reduces many problems, such as determining equality of subspaces, to counting problems.

Proof.

  1. Suppose UW, and let B={u1,,uk} be a basis for U. Since B is a basis, it’s independent. And since BU and UW, BW. Thus, B is an independent subset of W, and since any basis of W spans W, we know that dimU=kdimW, by Theorem 1.7.1.
  2. Suppose UW and dimU=dimW. Let B be a basis for U. As above, B is an independent subset of W. If WU, then there is some wW with wU. But U=spanB, so that would mean that B{w} is a linearly independent set containing dimU+1 vectors. This is impossible, since dimW=dimU, so no independent set can contain more than dimU vectors.
An even more useful counting result is the following:

Strategy.

This result is a combination of three observations:
  1. The dimension of V is the size of any basis
  2. Any independent set can be enlarged to a basis, and cannot have more vectors than a basis.
  3. Any spanning set contains a basis, and cannot have fewer vectors than a basis.

Proof.

If S is independent, then it can be extended to a basis B with SB. But S and B both contain n vectors (since dimV=n), so we must have S=B.
If S spans V, then S must contain a basis B, and as above, since S and B contain the same number of vectors, they must be equal.
Theorem 1.7.19 saves us a lot of time, since it tells us that, when we know the dimension of V, we do not have to check both independence and span to confirm a basis; checking one of the two implies the other. (And usually independence is easier to check.)
We saw this in Exercise 1.7.7: given a set of vectors in R3, we form the matrix A with these vectors as columns. This matrix becomes the coefficient matrix for the system of equations we obtain when checking for independence, and for the system we obtain when checking for span. In both cases, the condition on A is the same; namely, that it must be invertible.

Exercises Exercises

1.

Find a basis {p(x),q(x)} for the vector space {f(x)P2(R)f(3)=f(1)} where P2(R) is the vector space of polynomials in x with degree less than or equal to 2.

2.

Find a basis for the vector space {AM22(R)tr(A)=0} of 2×2 matrices with trace 0.

3.

    True or false: if a set S of vectors is linearly independent in a vector space V, but S does not span V, then S can be extended to a basis for V by adding vectors.
  • True.

  • What if V is infinite-dimensional?
  • False.

  • What if V is infinite-dimensional?

4.

    True or false: if V=span{v1,v2,v3}, then dimV=3.
  • True.

  • What if the set {v1,v2,v3} is linearly dependent?
  • False.

  • What if the set {v1,v2,v3} is linearly dependent?

5.

    True or false: if U is a subspace of a vector space V, and U=span(S) for a finite set of vectors S, then S contains a basis for U.
  • True.

  • Since S is finite and spans U, the subspace U is finite-dimensional. If S is linearly dependent, we can remove vectors from S until we obtain a set that spans U and is linearly independent.
  • False.

  • Since S is finite and spans U, the subspace U is finite-dimensional. If S is linearly dependent, we can remove vectors from S until we obtain a set that spans U and is linearly independent.

6.

Suppose that S1 and S2 are nonzero subspaces, with S1 contained inside S2, and suppose that dim(S2)=3.
(a) What are the possible dimensions of S1?
(b) If S1S2 then what are the possible dimensions of S1?

7.

Let P2 be the vector space of all polynomials of degree 2 or less, and let H be the subspace spanned by 7x2x2, 4x21 and 2(9x2+x).
(a) What is the dimension of the subspace H?
(b) Is {7x2x2,4x21,2(9x2+x)} a basis for P2?
Be sure you can explain and justify your answer.
(c) Give a basis for the subspace H.

8.

Let P2 be the vector space of all polynomials of degree 2 or less, and let H be the subspace spanned by 7x210x5, 19x27x7 and (3x+1).
(a) What is the dimension of the subspace H?
(b) Is {7x210x5,19x27x7,(3x+1)} a basis for P2?
Be sure you can explain and justify your answer.
(c) Give a basis for the subspace H.
You have attempted 1 of 21 activities on this page.