13.4: Subspaces and Basis
- Last updated
- Jul 20, 2020
- Save as PDF
- Page ID
- 44333
( \newcommand{\kernel}{\mathrm{null}\,}\)
Outcomes
- Utilize the subspace test to determine if a set is a subspace of a given vector space.
- 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 W⊆V is said to be a subspace of V if a→x+b→y∈W whenever a,b∈R and →x,→y∈W.
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 0→u=→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 →v∈W.
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 W⊆V. 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 W⊆V for a vector space V and suppose W=span{→v1,→v2,⋯,→vn}.
Let U⊆V be a subspace such that →v1,→v2,⋯,→vn∈U. Then it follows that W⊆U.
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 U⊆W and W⊆U. It will then follow that U=W.
- U⊆W 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 U⊆W.
- W⊆U 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 W⊆U.
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:
- The additive identity →0 of V is contained in W.
- For any vectors →w1,→w2 in W, →w1+→w2 is also in W.
- For any vector →w1 in W and scalar a, the product a→w1 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}.
- The vector →0 is clearly contained in {→0}, so the first condition is satisfied.
- 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.
- Let →w1 be in {→0} and let a be an arbitrary scalar. Then a→w1=a→0=→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 W⊆P2 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.
- 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.
- 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.
- 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.
- span{→v1,⋯,→vn}=V
- {→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 r≤s.
- 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 r≤s.
Define span{→y1,⋯,→ys}=V. Since each →xi is in span{→y1,⋯,→ys}, it follows there exist scalars c1,⋯,cs such that →x1=s∑i=1ci→yi 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, 1→x1+∑ri=20→xi=→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 ck≠0. Then solve (13.4.8) for →yk and obtain →yk∈span{→x1,s-1 vectors here⏞→y1,⋯,→yk−1,→yk+1,⋯,→ys}. Define {→z1,⋯,→zs−1} to be {→z1,⋯,→zs−1}={→y1,⋯,→yk−1,→yk+1,⋯,→ys} Now we can write →yk∈span{→x1,→z1,⋯,→zs−1} Therefore, span{→x1,→z1,⋯,→zs−1}=V. To see this, suppose →v∈V. Then there exist constants c1,⋯,cs such that →v=s−1∑i=1ci→zi+cs→yk. Replace this →yk with a linear combination of the vectors {→x1,→z1,⋯,→zs−1} to obtain →v∈span{→x1,→z1,⋯,→zs−1}. 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 l≤s<r and so l+1≤r. 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=l∑i=1ci→xi+p∑j=1dj→zj. 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 here⏞→z1,⋯→zk−1,→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, r≤s 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, m≤n and n≤m. 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 m∑i=1cij→ui=→vj. Therefore, n∑j=1dj→vj=→0 if and only if n∑j=1m∑i=1cijdj→ui=→0 if and only if m∑i=1(n∑j=1cijdj)→ui=→0 Now since {→u1,⋯,→un} is independent, this happens if and only if n∑j=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 [C→0] 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 →v1∈V where →v1≠0. If span{→v1}=V, then it follows that {→v1} is a basis for V. Otherwise, there exists →v2∈V 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 →v3∉span{→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={A∈M22 | A[101−1]=[110−1]A}. Then U is a subspace of M22 Find a basis of U, and hence dim(U).
Solution
Let A=[abcd]∈M22. Then A[101−1]=[abcd][101−1]=[a+b−bc+d−d] and [110−1]A=[110−1][abcd]=[a+cb+d−c−d]. If A∈U, then [a+b−bc+d−d]=[a+cb+d−c−d].
Equating entries leads to a system of four equations in the four variables a,b,c and d.
a+b=a+c−b=b+dc+d=−c−d=−d
or
b−c=0−2b−d=02c+d=0.
The solution to this system is a=s, b=−12t, c=−12t, d=t for any s,t∈R, and thus A=[st2−t2t]=s[1000]+t[0−12−121]. Let B={[1000],[0−12−121]}. 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 E∈S, let |E| denote the number of elements of E. Let m=min{|E| such that E∈S}. 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=m∑i=1ci→vi and not all the ci are equal to zero. Suppose ck≠0. Then solve for the vector →vk in terms of the other vectors. Consequently, V=span{→v1,⋯,→vk−1,→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+1∉span{→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 S⊆M22 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 R⊆M22 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 k∈S, there exists a subset of {→w1,⋯,→wm} consisting of exactly k vectors which is a spanning set for W. Thus m∈S. Pick the smallest positive integer in S. Call it k. Then there exists {→u1,⋯,→uk}⊆{→w1,⋯,→wm} such that span{→u1,⋯,→uk}=W. If k∑i=1ci→wi=→0 and not all of the ci=0, then you could pick cj≠0, divide by it and solve for →uj in terms of the others. →wj=∑i≠j(−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 i≠j. Thus k−1∈S 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+4x2−3x+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],[2−341],[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 [100−150010110001−5000001] 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+4x2−3x+2
Consider the following example.
Example 13.4.10: Shrinking a Spanning Set
Consider the set S⊆P2 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 r≥s.
- Proof
-
Let the dimension of V be n. Pick →w1∈W where →w1≠→0. 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+1∉span{→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 [1000100100−110010−1000011−1] 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.