Lecture 23 · Week 6· 15:23
Basis and dimension in general
Independence, spanning sets, exchange lemma, finite dimension.
Saved in this browser only. No account needed.
TranscriptThe full text of the lecture. Click any sentence to play the video from there.
Today: bases of a vector space
Welcome back. In lecture twenty, we found bases and dimension for subspaces of F n. A basis is a list that is linearly independent and spans, and all bases of a subspace have the same length. Since then, we have met vector spaces in general: polynomials, matrices and functions, all treated as vectors. Today we bring bases and dimension to every vector space. Most of lecture twenty carries over word for word. But one proof does not. The key theorem, that an independent list is never longer than a spanning list, was proved with matrices: the vectors became the columns of a matrix.
A polynomial is not a column of numbers, so that proof does not apply. Today we prove the theorem again, using only the rules of a vector space. The tool is the exchange lemma. Here is the plan. We define independence and bases in a vector space, and meet the spaces that are finite dimensional. We prove the exchange lemma. Then we show that every finite dimensional space has a basis, that every independent list can be extended to one, and that all bases have the same length. That length is the dimension. We finish with subspaces.
Bases of a vector space
Let V be a vector space over a field F. Vectors v one up to v k in V are linearly independent if the only weights in F that make c one v one, plus and so on, up to c k v k, equal to zero, are all zero. Otherwise they are dependent. A list of vectors in V is a basis of V if it is linearly independent and spans V. These are the same words as in lecture twenty. Only the space has changed. Our first example is P n of F, the polynomials of degree at most n. Its standard basis is the list one, x, x squared, and so on, up to x to the n.
These span, because every polynomial in P n is a zero, plus a one x, and so on, up to a n times x to the n: a combination of the list. And they are independent. If a zero plus a one x, and so on, is the zero polynomial, then every coefficient is zero, because the zero polynomial is the one whose coefficients are all zero. Count carefully: the list starts with the constant polynomial one, so it has n plus one vectors, not n.
The second example is the space of two by two matrices. Its standard basis has four matrices: E one one, E one two, E two one, and E two two. Each has a single entry one, and zeros everywhere else. A matrix with first row a, b, and second row c, d, splits into a E one one, plus b E one two, plus c E two one, plus d E two two. This is the zero matrix only if all four weights are zero. So the four matrices span, and they are independent. In the same way, the m by n matrices have a basis of m times n matrices, one for each position.
A basis gives every vector of V unique coordinates: every vector is a combination of the basis in exactly one way. The proof from lecture twenty uses only the rules of vector algebra, so it works here unchanged. We study coordinates in depth in lecture twenty five.
Finite-dimensional spaces
Bases are finite lists. So first we ask which spaces are spanned by a finite list at all. A vector space V is finite dimensional if some finite list of vectors spans V. Otherwise, V is infinite dimensional. F n, P n of F, and the m by n matrices are finite dimensional: their standard bases are finite spanning lists. The zero space is too: it is spanned by the empty list.
But P of F, the space of all polynomials, is infinite dimensional. Here is the proof. Take any finite list of polynomials, p one up to p k. Choose a whole number d so that all of them lie in P d: each nonzero one has degree at most d. P d is a subspace of P of F, so it contains every combination of the list. In other words, the span lies inside P d.
But x to the d plus one has degree d plus one, so it is not in P d, and not in the span. So no finite list spans P of F.
The exchange lemma
Now the heart of the lecture. Let V be a vector space over F. Suppose u one up to u m are linearly independent in V, and w one up to w k span V. Then m is at most k. Moreover, after renumbering the w's, the list u one up to u m, followed by w m plus one up to w k, still spans V. In words, an independent list is never longer than a spanning list. This proof is demanding, and it is the most important one today. Take it slowly, and pause or rewatch it if you need to. The idea is to move the u's into the spanning list one at a time. Each time a u comes in, one w goes out, and the list still spans V. If the u's outnumbered the w's, we would run out of w's to remove.
At the start, the list w one up to w k spans V. Now suppose that after j exchanges, the list u one up to u j, followed by the remaining w's, spans V. Renumber the w's, so that the remaining ones are w j plus one up to w k. This list spans V, so u j plus one is a combination of it: c one u one, plus and so on, up to c j u j, plus d j plus one w j plus one, and so on, up to d k w k. At least one of the weights d is not zero. If they were all zero, or if no w's were left, then u j plus one would be a combination of u one up to u j. Moving it to the other side gives a dependence relation, with the weight minus one on u j plus one. That contradicts independence.
So renumber the w's, so that d j plus one is not zero. Then we can solve for w j plus one: it is one over d j plus one, times u j plus one minus all the other terms. So w j plus one lies in the span of the new list: u one up to u j plus one, followed by w j plus two up to w k. This span is a subspace that contains every vector of the old spanning list, so it is all of V. The exchange worked. Each of the m steps removes one w, and we showed that there is always one left to remove. So there are at least m of the w's: m is at most k.
Let's watch two exchanges in P one of R, the polynomials of degree at most one. The list one, x spans it. Our independent vectors are u one, which is one plus x, and u two, which is one minus x. First, u one is one times one, plus one times x. The weight of the polynomial one is not zero, so we solve for it: one is u one minus x. So u one, x still spans: u one has taken the place of one. Next, write u two in the new list. Replace its one by u one minus x: u two is u one minus two x. The weight of x is minus two, which is not zero, so x is one half of u one minus u two. Now u one, u two spans P one: both of the old vectors have been exchanged.
Check: the difference of one plus x and one minus x is two x, and half of it is x.
Every space has a basis
The exchange lemma has three big consequences. But first, a simpler fact that needs no exchange: every finite spanning list can be shrunk to a basis. Let v one up to v k span V. Then some of these vectors form a basis of V. If V is the zero space, this basis is the empty list. The proof is the loop from lecture twenty. If the list is independent, it is a basis, and we stop. If it is dependent, take a dependence relation, and a vector whose weight is not zero. Solve for that vector: it is a combination of the others.
Removing it does not change the span, because in any combination, we can replace it by that expression. So we remove it, and repeat. The list gets shorter each time, so the loop stops, at an independent list that still spans V. In the zero space, every nonempty list is dependent, so the loop ends at the empty list. So every finite dimensional vector space has a basis.
Extending to a basis
Now the first consequence of the exchange lemma, and today's main theorem. Let V be finite dimensional. Then every linearly independent list in V can be extended to a basis of V. Again, we grow the list. If it spans V, it is a basis, and we stop. If not, choose a vector w in V outside its span, and add it at the end. The longer list is still independent. Call the current list v one up to v p. Suppose a combination of these vectors, plus b times w, is zero. If b were not zero, we could solve for w, and w would be in the span. So b is zero. The current list is independent, so its weights are zero too.
Why must the loop stop? This is where we need the exchange lemma. V is finite dimensional, so some list of k vectors spans V. Every list we build is independent, so by the exchange lemma, it has at most k vectors. The list cannot keep growing, so the loop stops, and it stops only at a basis. In F n, lecture twenty stopped this loop with a fact proved with matrices. Now the exchange lemma does that job, in any vector space.
Dimension
The second consequence: in a finite dimensional space V, any two bases have the same number of vectors. Take two bases, with k and m vectors. The first spans V, and the second is independent, so by the exchange lemma, m is at most k. Exchange the roles, and k is at most m. So k equals m. This number is the dimension of V, written dim V. The zero space has dimension zero.
Now we read off dimensions from the standard bases. F n has dimension n. The m by n matrices have dimension m times n, so the two by two matrices have dimension four. And P n of F has dimension n plus one. For example, P two, the polynomials of degree at most two, has dimension three, with basis one, x, x squared. P of F has no finite spanning list, so it has no basis of the kind we use, which is a finite list. It is simply called infinite dimensional.
When the count is right
The third consequence: if we know the dimension, counting does much of the work. Let V have dimension n. First, every independent list in V has at most n vectors, and every spanning list has at least n. Both follow from the exchange lemma, with a basis playing one of the two roles. Second, any n independent vectors form a basis. Extend them to a basis: it has n vectors, so nothing was added.
Third, any n vectors that span V form a basis. Shrink them to a basis: it has n vectors, so nothing was removed.
Example: extending a list in P2
Let's extend a list in P two of R. Take p one, which is one plus x, and p two, which is x plus x squared. A combination, a times p one, plus b times p two, is a, plus a plus b times x, plus b times x squared. If this is the zero polynomial, the constant term gives a equals zero, and the x squared term gives b equals zero. So p one and p two are independent.
P two has dimension three, so every basis of it has three vectors, and we must add exactly one more. We try the standard basis vectors in turn. Is the constant polynomial one in the span? For the combination to equal one, the x squared term needs b equals zero, and the constant term needs a equals one. But then the x term is a plus b, which is one, not zero. So one is not in the span, and we add it. Now the three polynomials one plus x, x plus x squared, and one are independent, in a space of dimension three. By the count, they form a basis. We never had to check that they span.
Subspaces
Last, subspaces. Let V be finite dimensional, and let U be a subspace of V. Then U is finite dimensional, and its dimension is at most the dimension of V. If the two are equal, then U is all of V. We grow a basis of U, starting from the empty list, and each time adding a vector of U outside the span. Every list we build is independent in V, so it has at most dim V vectors. So the loop stops, at a basis of U with at most dim V vectors. If dim U equals dim V, that basis of U is a list of dim V independent vectors in V, so it is a basis of V. Then U, its span, is all of V.
For example, the symmetric two by two matrices form a subspace of the two by two matrices. Such a matrix has first row a, c, and second row c, b. It splits into a E one one, plus b E two two, plus c times the sum of E one two and E two one. So these three matrices span the subspace, and the combination is the zero matrix only if a, b and c are all zero. The subspace has dimension three. That is less than four, so it is not all of the two by two matrices.
Summary
Let's summarise. Independence, spanning and bases have the same definitions in every vector space. A space is finite dimensional if a finite list spans it. The space of all polynomials is infinite dimensional. The exchange lemma: an independent list is never longer than a spanning list. Its proof moves the independent vectors in one at a time, and pushes spanning vectors out. In a finite dimensional space, every spanning list shrinks to a basis, every independent list extends to one, and all bases have the same length: the dimension. F n has dimension n, P n has n plus one, and the m by n matrices have m times n.
A subspace of a finite dimensional space is finite dimensional, with dimension at most that of the space. Before the next lecture, read section four point five of the course book, try the problems on sheet six about bases and dimension, and do the lecture check on this lecture's page at Open Semester dot com. Next time, we find the dimension of a sum of two subspaces: the dimension formula. See you there.
In this lecture
Materials
Check yourself
3 questions, from warm-up to stretch
Work each one out on paper, type your answer and press Check. Stuck? Open a hint; the worked solution is there when you need it.
- Question 1 of 3 Warm-up
Use Example 4.5.14 to find and . Then decide: can five polynomials in be linearly independent?
Hint 1 of 2
Count the vectors in the standard bases: for , and the matrices with a single for .
Hint 2 of 2
By Theorem 4.5.15(a), an independent list in a space of dimension has at most vectors.
Worked solution
- The standard basis of is , so .
- The standard basis of is , one matrix for each entry, so .
- The basis spans with vectors, so an independent list has at most vectors, by Theorem 4.5.15(a), which follows from the exchange lemma (Theorem 4.5.8). Five polynomials in are never independent.
- Question 2 of 3 Core
In let , and . Find and with . Then decide whether is a basis of , and whether is.
Hint 1 of 2
Collect terms as in Example 4.5.16: . Compare the coefficients with those of .
Hint 2 of 2
For the second list, ask whether is in . If not, the list of three is independent, and ; use Theorem 4.5.15(b).
Worked solution
- . For this to be , the term gives and the term gives ; the constant term checks: .
- So , and is linearly dependent: it is not a basis.
- and are independent: gives and . The constant is not in their span: needs and , and then the constant term is .
- So is independent (adding a vector outside the span keeps a list independent). It has vectors and , so by Theorem 4.5.15(b) it is a basis, with no need to check that it spans. Check: and .
- Question 3 of 3 Stretch
Let be the set of real matrices whose diagonal entries add up to zero, . It is a subspace of . Find . Let be the symmetric matrices in , those with as well; find . Is all of ?
Hint 1 of 2
Split a matrix of as in Example 4.5.18. With , it is .
Hint 2 of 2
The matrices in that combination span , and the combination is only if all the weights are zero. For , set and split again. For the last part, use Theorem 4.5.17.
Worked solution
- A matrix of has , so it splits as .
- So , , span (each has diagonal sum , so it lies in ). The combination is only if its entries , , are all zero, so they are independent: a basis, and .
- In also : . The two matrices lie in , span it, and the combination is only if , so .
- , so by Theorem 4.5.17: for example .
How did it go?