Processing math: 100%
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

13.4: Subspaces and Basis

( \newcommand{\kernel}{\mathrm{null}\,}\)

Outcomes

  1. Utilize the subspace test to determine if a set is a subspace of a given vector space.
  2. Extend a linearly independent set and shrink a spanning set to a basis of a given vector space.

In this section we will examine the concept of subspaces introduced earlier in terms of Rn. Here, we will discuss these concepts in terms of abstract vector spaces.

Consider the definition of a subspace.

Definition 13.4.1: Subspace

Let V be a vector space. A subset WV is said to be a subspace of V if ax+byW whenever a,bR and x,yW.

The span of a set of vectors as described in Definition 9.2.3 is an example of a subspace. The following fundamental result says that subspaces are subsets of a vector space which are themselves vector spaces.

Theorem 13.4.1: Subspaces are Vector Spaces

Let W be a nonempty collection of vectors in a vector space V. Then W is a subspace if and only if W satisfies the vector space axioms, using the same operations as those defined on V.

Proof

Suppose first that W is a subspace. It is obvious that all the algebraic laws hold on W because it is a subset of V and they hold on V. Thus u+v=v+u along with the other axioms. Does W contain 0? Yes because it contains 0u=0. See Theorem 9.1.1.

Are the operations of V defined on W? That is, when you add vectors of W do you get a vector in W? When you multiply a vector in W by a scalar, do you get a vector in W? Yes. This is contained in the definition. Does every vector in W have an additive inverse? Yes by Theorem 9.1.1 because v=(1)v which is given to be in W provided vW.

Next suppose W is a vector space. Then by definition, it is closed with respect to linear combinations. Hence it is a subspace.

Consider the following useful Corollary.

Corollary 13.4.1: Span is a Subspace

Let V be a vector space with WV. If W=span{v1,,vn} then W is a subspace of V.

When determining spanning sets the following theorem proves useful.

Theorem 13.4.2: Spanning Set

Let WV for a vector space V and suppose W=span{v1,v2,,vn}.

Let UV be a subspace such that v1,v2,,vnU. Then it follows that WU.

In other words, this theorem claims that any subspace that contains a set of vectors must also contain the span of these vectors.

The following example will show that two spans, described differently, can in fact be equal.

Example 13.4.1: Equal Span

Let p(x),q(x) be polynomials and suppose U=span{2p(x)q(x),p(x)+3q(x)} and W=span{p(x),q(x)}. Show that U=W.

Solution

We will use Theorem 13.4.2 to show that UW and WU. It will then follow that U=W.

  1. UW Notice that 2p(x)q(x) and p(x)+3q(x) are both in W=span{p(x),q(x)}. Then by Theorem 13.4.2 W must contain the span of these polynomials and so UW.
  2. WU Notice that p(x)=37(2p(x)q(x))+27(p(x)+3q(x))q(x)=17(2p(x)q(x))+27(p(x)+3q(x)) Hence p(x),q(x) are in span{2p(x)q(x),p(x)+3q(x)}. By Theorem 13.4.2 U must contain the span of these polynomials and so WU.

To prove that a set is a vector space, one must verify each of the axioms given in Definition 9.1.2 and 9.1.3. This is a cumbersome task, and therefore a shorter procedure is used to verify a subspace.

Procedure 13.4.1: Subspace Test

Suppose W is a subset of a vector space V. To determine if W is a subspace of V, it is sufficient to determine if the following three conditions hold, using the operations of V:

  1. The additive identity 0 of V is contained in W.
  2. For any vectors w1,w2 in W, w1+w2 is also in W.
  3. For any vector w1 in W and scalar a, the product aw1 is also in W.

Therefore it suffices to prove these three steps to show that a set is a subspace.

Consider the following example.

Example 13.4.2: Improper Subspaces

Let V be an arbitrary vector space. Then V is a subspace of itself. Similarly, the set {0} containing only the zero vector is also a subspace.

Solution

Using the subspace test in Procedure 13.4.1 we can show that V and {0} are subspaces of V.

Since V satisfies the vector space axioms it also satisfies the three steps of the subspace test. Therefore V is a subspace.

Let’s consider the set {0}.

  1. The vector 0 is clearly contained in {0}, so the first condition is satisfied.
  2. Let w1,w2 be in {0}. Then w1=0 and w2=0 and so w1+w2=0+0=0 It follows that the sum is contained in {0} and the second condition is satisfied.
  3. Let w1 be in {0} and let a be an arbitrary scalar. Then aw1=a0=0 Hence the product is contained in {0} and the third condition is satisfied.

It follows that {0} is a subspace of V.

The two subspaces described above are called improper subspaces. Any subspace of a vector space V which is not equal to V or {0} is called a proper subspace.

Consider another example.

Example 13.4.3: Subspace of Polynomials

Let P2 be the vector space of polynomials of degree two or less. Let WP2 be all polynomials of degree two or less which have 1 as a root. Show that W is a subspace of P2.

Solution

First, express W as follows: W={p(x)=ax2+bx+c,a,b,c,R|p(1)=0}

We need to show that W satisfies the three conditions of Procedure 13.4.1.

  1. The zero polynomial of P2 is given by 0(x)=0x2+0x+0=0. Clearly 0(1)=0 so 0(x) is contained in W.
  2. Let p(x),q(x) be polynomials in W. It follows that p(1)=0 and q(1)=0. Now consider p(x)+q(x). Let r(x) represent this sum. r(1)=p(1)+q(1)=0+0=0 Therefore the sum is also in W and the second condition is satisfied.
  3. Let p(x) be a polynomial in W and let a be a scalar. It follows that p(1)=0. Consider the product ap(x). ap(1)=a(0)=0 Therefore the product is in W and the third condition is satisfied.

It follows that W is a subspace of P2.

Recall the definition of basis, considered now in the context of vector spaces.

Definition 13.4.2: Basis

Let V be a vector space. Then {v1,,vn} is called a basis for V if the following conditions hold.

  1. span{v1,,vn}=V
  2. {v1,,vn} is linearly independent

Consider the following example.

Example 13.4.4: Polynomials of Degree Two

Let P2 be the set polynomials of degree no more than 2. We can write P2=span{x2,x,1}. Is {x2,x,1} a basis for P2?

Solution

It can be verified that P2 is a vector space defined under the usual addition and scalar multiplication of polynomials.

Now, since P2=span{x2,x,1}, the set {x2,x,1} is a basis if it is linearly independent. Suppose then that ax2+bx+c=0x2+0x+0 where a,b,c are real numbers. It is clear that this can only occur if a=b=c=0. Hence the set is linearly independent and forms a basis of P2.

The next theorem is an essential result in linear algebra and is called the exchange theorem.

Theorem 13.4.3: Exchange Theorem

Let {x1,,xr} be a linearly independent set of vectors such that each xi is contained in span{y1,,ys}. Then rs.

Proof

The proof will proceed as follows. First, we set up the necessary steps for the proof. Next, we will assume that r>s and show that this leads to a contradiction, thus requiring that rs.

Define span{y1,,ys}=V. Since each xi is in span{y1,,ys}, it follows there exist scalars c1,,cs such that x1=si=1ciyi Note that not all of these scalars ci can equal zero. Suppose that all the ci=0. Then it would follow that x1=0 and so {x1,,xr} would not be linearly independent. Indeed, if x1=0, 1x1+ri=20xi=x1=0 and so there would exist a nontrivial linear combination of the vectors {x1,,xr} which equals zero. Therefore at least one ci is nonzero.

Say ck0. Then solve (13.4.8) for yk and obtain ykspan{x1,s-1 vectors herey1,,yk1,yk+1,,ys}. Define {z1,,zs1} to be {z1,,zs1}={y1,,yk1,yk+1,,ys} Now we can write ykspan{x1,z1,,zs1} Therefore, span{x1,z1,,zs1}=V. To see this, suppose vV. Then there exist constants c1,,cs such that v=s1i=1cizi+csyk. Replace this yk with a linear combination of the vectors {x1,z1,,zs1} to obtain vspan{x1,z1,,zs1}. The vector yk, in the list {y1,,ys}, has now been replaced with the vector x1 and the resulting modified list of vectors has the same span as the original list of vectors, {y1,,ys}.

We are now ready to move on to the proof. Suppose that r>s and that span{x1,,xl,z1,,zp}=V where the process established above has continued. In other words, the vectors z1,,zp are each taken from the set {y1,,ys} and l+p=s. This was done for l=1 above. Then since r>s, it follows that ls<r and so l+1r. Therefore, xl+1 is a vector not in the list, {x1,,xl} and since span{x1,,xl,z1,,zp}=V there exist scalars, ci and dj such that xl+1=li=1cixi+pj=1djzj. Not all the dj can equal zero because if this were so, it would follow that {x1,,xr} would be a linearly dependent set because one of the vectors would equal a linear combination of the others. Therefore, (13.4.9) can be solved for one of the zi, say zk, in terms of xl+1 and the other zi and just as in the above argument, replace that zi with xl+1 to obtain span{x1,xl,xl+1,p-1 vectors herez1,zk1,zk+1,,zp}=V Continue this way, eventually obtaining span{x1,,xs}=V. But then xr span{x1,,xs} contrary to the assumption that {x1,,xr} is linearly independent. Therefore, rs as claimed.

The following corollary follows from the exchange theorem.

Corollary 13.4.2: Two Bases of the Same Length

Let B1, B2 be two bases of a vector space V. Suppose B1 contains m vectors and B2 contains n vectors. Then m=n.

Proof

By Theorem 13.4.3, mn and nm. Therefore m=n.

This corollary is very important so we provide another proof independent of the exchange theorem above.

Proof

Suppose n>m. Then since the vectors {u1,,um} span V, there exist scalars cij such that mi=1cijui=vj. Therefore, nj=1djvj=0 if and only if nj=1mi=1cijdjui=0 if and only if mi=1(nj=1cijdj)ui=0 Now since {u1,,un} is independent, this happens if and only if nj=1cijdj=0,i=1,2,,m. However, this is a system of m equations in n variables, d1,,dn and m<n. Therefore, there exists a solution to this system of equations in which not all the dj are equal to zero. Recall why this is so. The augmented matrix for the system is of the form [C0] where C is a matrix which has more columns than rows. Therefore, there are free variables and hence nonzero solutions to the system of equations. However, this contradicts the linear independence of {u1,,um}. Similarly it cannot happen that m>n.

Given the result of the previous corollary, the following definition follows.

Definition 13.4.3: Dimension

A vector space V is of dimension n if it has a basis consisting of n vectors.

Notice that the dimension is well defined by Corollary 13.4.2. It is assumed here that n< and therefore such a vector space is said to be finite dimensional.

Example 13.4.5: Dimension of a Vector Space

Let P2 be the set of all polynomials of degree at most 2. Find the dimension of P2.

Solution

If we can find a basis of P2 then the number of vectors in the basis will give the dimension. Recall from Example 13.4.4 that a basis of P2 is given by S={x2,x,1} There are three polynomials in S and hence the dimension of P2 is three.

It is important to note that a basis for a vector space is not unique. A vector space can have many bases. Consider the following example.

Example 13.4.6: A Different Basis for Polynomials of Degree Two

Let P2 be the polynomials of degree no more than 2. Is {x2+x+1,2x+1,3x2+1} a basis for P2?

Solution

Suppose these vectors are linearly independent but do not form a spanning set for P2. Then by Lemma 9.3.2, we could find a fourth polynomial in P2 to create a new linearly independent set containing four polynomials. However this would imply that we could find a basis of P2 of more than three polynomials. This contradicts the result of Example 13.4.5 in which we determined the dimension of P2 is three. Therefore if these vectors are linearly independent they must also form a spanning set and thus a basis for P2.

Suppose then that a(x2+x+1)+b(2x+1)+c(3x2+1)=0(a+3c)x2+(a+2b)x+(a+b+c)=0 We know that {x2,x,1} is linearly independent, and so it follows that a+3c=0a+2b=0a+b+c=0 and there is only one solution to this system of equations, a=b=c=0. Therefore, these are linearly independent and form a basis for P2.

Consider the following theorem.

Theorem 13.4.4: Every Subspace has a Basis

Let W be a nonzero subspace of a finite dimensional vector space V. Suppose V has dimension n. Then W has a basis with no more than n vectors.

Proof

Let v1V where v10. If span{v1}=V, then it follows that {v1} is a basis for V. Otherwise, there exists v2V which is not in span{v1}. By Lemma 9.3.2 {v1,v2} is a linearly independent set of vectors. Then {v1,v2} is a basis for V and we are done. If span{v1,v2}V, then there exists v3span{v1,v2} and {v1,v2,v3} is a larger linearly independent set of vectors. Continuing this way, the process must stop before n+1 steps because if not, it would be possible to obtain n+1 linearly independent vectors contrary to the exchange theorem, Theorem 13.4.3.

If in fact W has n vectors, then it follows that W=V.

Theorem 13.4.5: Subspace of Same Dimension

Let V be a vector space of dimension n and let W be a subspace. Then W=V if and only if the dimension of W is also n.

Proof

First suppose W=V. Then obviously the dimension of W=n.

Now suppose that the dimension of W is n. Let a basis for W be {w1,,wn}. If W is not equal to V, then let v be a vector of V which is not contained in W. Thus v is not in span{w1,,wn} and by Lemma 9.7.2, {w1,,wn,v} is linearly independent which contradicts Theorem 13.4.3 because it would be an independent set of n+1 vectors even though each of these vectors is in a spanning set of n vectors, a basis of V.

Consider the following example.

Example 13.4.7: Basis of a Subspace

Let U={AM22 | A[1011]=[1101]A}. Then U is a subspace of M22 Find a basis of U, and hence dim(U).

Solution

Let A=[abcd]M22. Then A[1011]=[abcd][1011]=[a+bbc+dd] and [1101]A=[1101][abcd]=[a+cb+dcd]. If AU, then [a+bbc+dd]=[a+cb+dcd].

Equating entries leads to a system of four equations in the four variables a,b,c and d.

a+b=a+cb=b+dc+d=cd=d

or

bc=02bd=02c+d=0.

The solution to this system is a=s, b=12t, c=12t, d=t for any s,tR, and thus A=[st2t2t]=s[1000]+t[012121]. Let B={[1000],[012121]}. Then span(B)=U, and it is routine to verify that B is an independent subset of M22. Therefore B is a basis of U, and dim(U)=2.

The following theorem claims that a spanning set of a vector space V can be shrunk down to a basis of V. Similarly, a linearly independent set within V can be enlarged to create a basis of V.

Theorem 13.4.6: Basis of V

If V=span{u1,,un} is a vector space, then some subset of {u1,,un} is a basis for V. Also, if {u1,,uk}V is linearly independent and the vector space is finite dimensional, then the set {u1,,uk}, can be enlarged to obtain a basis of V.

Proof

Let S={E{u1,,un} such that span{E}=V}. For ES, let |E| denote the number of elements of E. Let m=min{|E| such that ES}. Thus there exist vectors {v1,,vm}{u1,,un} such that span{v1,,vm}=V and m is as small as possible for this to happen. If this set is linearly independent, it follows it is a basis for V and the theorem is proved. On the other hand, if the set is not linearly independent, then there exist scalars, c1,,cm such that 0=mi=1civi and not all the ci are equal to zero. Suppose ck0. Then solve for the vector vk in terms of the other vectors. Consequently, V=span{v1,,vk1,vk+1,,vm} contradicting the definition of m. This proves the first part of the theorem.

To obtain the second part, begin with {u1,,uk} and suppose a basis for V is {v1,,vn} If span{u1,,uk}=V, then k=n. If not, there exists a vector uk+1span{u1,,uk} Then from Lemma 9.3.2, {u1,,uk,uk+1} is also linearly independent. Continue adding vectors in this way until n linearly independent vectors have been obtained. Then span{u1,,un}=V because if it did not do so, there would exist un+1 as just described and {u1,,un+1} would be a linearly independent set of vectors having n+1 elements. This contradicts the fact that {v1,,vn} is a basis. In turn this would contradict Theorem 13.4.3. Therefore, this list is a basis.

Recall Example 9.3.4 in which we added a matrix to a linearly independent set to create a larger linearly independent set. By Theorem 13.4.6 we can extend a linearly independent set to a basis.

Example 13.4.8: Adding to a Linearly Independent Set

Let SM22 be a linearly independent set given by S={[1000],[0100]} Enlarge S to a basis of M22.

Solution

Recall from the solution of Example 9.3.4 that the set RM22 given by R={[1000],[0100],[0010]} is also linearly independent. However this set is still not a basis for M22 as it is not a spanning set. In particular, [0001] is not in spanR. Therefore, this matrix can be added to the set by Lemma 9.3.2 to obtain a new linearly independent set given by T={[1000],[0100],[0010],[0001]}

This set is linearly independent and now spans M22. Hence T is a basis.

Next we consider the case where you have a spanning set and you want a subset which is a basis. The above discussion involved adding vectors to a set. The next theorem involves removing vectors.

Theorem 13.4.7: Basis from a Spanning Set

Let V be a vector space and let W be a subspace. Also suppose that W=span{w1,,wm}. Then there exists a subset of {w1,,wm} which is a basis for W.

Proof

Let S denote the set of positive integers such that for kS, there exists a subset of {w1,,wm} consisting of exactly k vectors which is a spanning set for W. Thus mS. Pick the smallest positive integer in S. Call it k. Then there exists {u1,,uk}{w1,,wm} such that span{u1,,uk}=W. If ki=1ciwi=0 and not all of the ci=0, then you could pick cj0, divide by it and solve for uj in terms of the others. wj=ij(cicj)wi Then you could delete wj from the list and have the same span. In any linear combination involving wj, the linear combination would equal one in which wj is replaced with the above sum, showing that it could have been obtained as a linear combination of wi for ij. Thus k1S contrary to the choice of k. Hence each ci=0 and so {u1,,uk} is a basis for W consisting of vectors of {w1,,wm}.

Consider the following example of this concept.

Example 13.4.9: Basis from a Spanning Set

Let V be the vector space of polynomials of degree no more than 3, denoted earlier as P3. Consider the following vectors in V. 2x2+x+1,x3+4x2+2x+2,2x3+2x2+2x+1,x3+4x23x+2,x3+3x2+2x+1 Then, as mentioned above, V has dimension 4 and so clearly these vectors are not linearly independent. A basis for V is {1,x,x2,x3}. Determine a linearly independent subset of these which has the same span. Determine whether this subset is a basis for V.

Solution

Consider an isomorphism which maps R4 to V in the obvious way. Thus [1120] corresponds to 2x2+x+1 through the use of this isomorphism. Then corresponding to the above vectors in V we would have the following vectors in R4. [1120],[2241],[1222],[2341],[1231] Now if we obtain a subset of these which has the same span but which is linearly independent, then the corresponding vectors from V will also be linearly independent. If there are four in the list, then the resulting vectors from V must be a basis for V. The reduced row-echelon form for the matrix which has the above vectors as columns is [1001500101100015000001] Therefore, a basis for V consists of the vectors 2x2+x+1,x3+4x2+2x+2,2x3+2x2+2x+1,x3+3x2+2x+1. Note how this is a subset of the original set of vectors. If there had been only three pivot columns in this matrix, then we would not have had a basis for V but we would at least have obtained a linearly independent subset of the original set of vectors in this way.

Note also that, since all linear relations are preserved by an isomorphism, 15(2x2+x+1)+11(x3+4x2+2x+2)+(5)(2x3+2x2+2x+1)=x3+4x23x+2

Consider the following example.

Example 13.4.10: Shrinking a Spanning Set

Consider the set SP2 given by S={1,x,x2,x2+1} Show that S spans P2, then remove vectors from S until it creates a basis.

Solution

First we need to show that S spans P2. Let ax2+bx+c be an arbitrary polynomial in P2. Write ax2+bx+c=r(1)+s(x)+t(x2)+u(x2+1) Then, ax2+bx+c=r(1)+s(x)+t(x2)+u(x2+1)=(t+u)x2+s(x)+(r+u)

It follows that a=t+ub=sc=r+u

Clearly a solution exists for all a,b,c and so S is a spanning set for P2. By Theorem 13.4.6, some subset of S is a basis for P2.

Recall that a basis must be both a spanning set and a linearly independent set. Therefore we must remove a vector from S keeping this in mind. Suppose we remove x from S. The resulting set would be {1,x2,x2+1}. This set is clearly linearly dependent (and also does not span P2) and so is not a basis.

Suppose we remove x2+1 from S. The resulting set is {1,x,x2} which is both linearly independent and spans P2. Hence this is a basis for P2. Note that removing any one of 1,x2, or x2+1 will result in a basis.

Now the following is a fundamental result about subspaces.

Theorem 13.4.8: Basis of a Vector Space

Let V be a finite dimensional vector space and let W be a non-zero subspace. Then W has a basis. That is, there exists a linearly independent set of vectors {w1,,wr} such that {w1,,wr}=W Also if {w1,,ws} is a linearly independent set of vectors, then W has a basis of the form {w1,,ws,,wr} for rs.

Proof

Let the dimension of V be n. Pick w1W where w10. If w1,,ws have been chosen such that {w1,,ws} is linearly independent, if span{w1,,wr}=W, stop. You have the desired basis. Otherwise, there exists ws+1span{w1,,ws} and {w1,,ws,ws+1} is linearly independent. Continue this way until the process stops. It must stop since otherwise, you could obtain a linearly independent set of vectors having more than n vectors which is impossible.

The last claim is proved by following the above procedure starting with {w1,,ws} as above.

This also proves the following corollary. Let V play the role of W in the above theorem and begin with a basis for W, enlarging it to form a basis for V as discussed above.

Corollary 13.4.3: Basis Extension

Let W be any non-zero subspace of a vector space V. Then every basis of W can be extended to a basis for V.

Consider the following example.

Example 13.4.11: Basis Extension

Let V=R4 and let W=span{[1011],[0101]} Extend this basis of W to a basis of V.

Solution

An easy way to do this is to take the reduced row-echelon form of the matrix [101000010100100010110001] Note how the given vectors were placed as the first two and then the matrix was extended in such a way that it is clear that the span of the columns of this matrix yield all of R4. Now determine the pivot columns. The reduced row-echelon form is [100010010011001010000111] These are [1011],[0101],[1000],[0100] and now this is an extension of the given basis for W to a basis for R4.

Why does this work? The columns of (???) obviously span R4 the span of the first four is the same as the span of all six.


This page titled 13.4: Subspaces and Basis is shared under a CC BY license and was authored, remixed, and/or curated by Ken Kuttler (Lyryx) .

  • Was this article helpful?

Support Center

How can we help?