Unit 1, lesson 3

Basis Exchange and Dimension

Why every basis of a finite-dimensional space has the same length, proved with the exchange lemma, and how dimension, extracting and extending a basis, and the dimension of a subspace follow from it.

  • Video 3
  • Bases and Linear Maps

A basis of R3\mathbb{R}^3 has three vectors, and a first course uses that count freely. But why could no cleverly chosen basis of R3\mathbb{R}^3 have four vectors, and how would you count directions in the polynomial space P2\mathcal{P}_2, where there are no axes to look at? The answer is an argument about spanning lists and independent lists, not a picture. This lesson proves that any two bases of a finite-dimensional space have the same length, which makes dimension well defined, and then shows how to shrink a spanning list or grow an independent list into a basis.

Key terms

Exchange lemma

Definition Let VV be a vector space over F\mathbb{F}, where F\mathbb{F} is R\mathbb{R} or C\mathbb{C}, and let all lists be finite. The lemma rests on a replacement step. If w1,…,wnw_1, \dots, w_n span VV and v=a1w1+⋯+anwnv = a_1 w_1 + \cdots + a_n w_n with ak≠0a_k \ne 0, then replacing wkw_k by vv gives a list that still spans VV, because

wk=1ak(v−∑j≠kajwj).w_k = \frac{1}{a_k}\Bigl(v - \sum_{j \ne k} a_j w_j\Bigr).

The exchange lemma says that if v1,…,vmv_1, \dots, v_m are linearly independent in VV and w1,…,wnw_1, \dots, w_n span VV, then m≤nm \le n. Moreover, after the wjw_j are renumbered, the list v1,…,vm,wm+1,…,wnv_1, \dots, v_m, w_{m+1}, \dots, w_n spans VV.

To prove it, insert v1,v2,…v_1, v_2, \dots one at a time. Suppose v1,…,vkv_1, \dots, v_k have replaced kk of the wjw_j and the current list still spans VV. Write vk+1v_{k+1} as a combination of the current list. Some coefficient on a remaining wjw_j must be nonzero, since otherwise vk+1v_{k+1} would be a combination of v1,…,vkv_1, \dots, v_k, which contradicts independence. Replacing that wjw_j by vk+1v_{k+1} keeps the list spanning. If mm were larger than nn, then after nn steps no wjw_j would remain, and the same reasoning would make vn+1v_{n+1} a combination of v1,…,vnv_1, \dots, v_n, which is impossible. So m≤nm \le n.

In plain words Each independent vector can take the seat of some spanning vector without losing anything that was reachable. There are only nn seats, so an independent list can never be longer than a spanning list.

Example In R2\mathbb{R}^2 take the standard basis e1,e2e_1, e_2 as the spanning list, and insert v1=(2,3)v_1 = (2, 3) and v2=(1,1)v_2 = (1, 1), which are independent because neither is a multiple of the other. First v1=2e1+3e2v_1 = 2e_1 + 3e_2, and the coefficient of e1e_1 is not zero, so v1,e2v_1, e_2 spans R2\mathbb{R}^2, with

e1=12v1−32e2.e_1 = \tfrac{1}{2}v_1 - \tfrac{3}{2}e_2.

Next v2=12v1−12e2v_2 = \tfrac{1}{2}v_1 - \tfrac{1}{2}e_2, and the coefficient of the remaining vector e2e_2 is not zero, so v1,v2v_1, v_2 spans R2\mathbb{R}^2. Solving gives e2=v1−2v2e_2 = v_1 - 2v_2 and then e1=−v1+3v2e_1 = -v_1 + 3v_2.

Invariance of basis size

Definition Let VV be a vector space over F\mathbb{F} that is spanned by some finite list. Then every linearly independent list in VV has at most as many vectors as that spanning list, and any two bases of VV have the same number of vectors. For the proof, let b1,…,bpb_1, \dots, b_p and c1,…,cqc_1, \dots, c_q be bases of VV. The first list is independent and the second spans, so p≤qp \le q by the exchange lemma. Exchanging the roles gives q≤pq \le p, so p=qp = q. The scalar field stays fixed throughout, and bases of the same set over R\mathbb{R} and over C\mathbb{C} may have different lengths.

In plain words However a basis is chosen, it has the same number of vectors. That count belongs to the space and its field, not to any particular basis.

Example The standard basis e1,e2,e3e_1, e_2, e_3 of R3\mathbb{R}^3 spans and is independent. So no independent list in R3\mathbb{R}^3 has four vectors, and no list of two vectors spans R3\mathbb{R}^3, since otherwise the independent list e1,e2,e3e_1, e_2, e_3 would be longer than a spanning list. Every basis of R3\mathbb{R}^3 therefore has exactly three vectors. Over different fields the count can differ. The space C2\mathbb{C}^2 has bases of length 22 over C\mathbb{C} and of length 44 over R\mathbb{R}, and there is no conflict, because these are bases for different scalar fields.

Dimension

Definition A vector space VV over F\mathbb{F} is finite-dimensional if some finite list spans it. Such a space has a basis, by the extraction result below, and its dimension dim⁡V\dim V, written dim⁡FV\dim_{\mathbb{F}} V when the field needs saying, is the number of vectors in any basis. The zero space {0}\{0\} has the empty list as a basis and dimension 00. If dim⁡V=n\dim V = n, then

  • every list of more than nn vectors in VV is linearly dependent,
  • no list of fewer than nn vectors spans VV,
  • a list of exactly nn vectors that is independent also spans, so it is a basis,
  • a list of exactly nn vectors that spans is also independent, so it is a basis.

The first two facts are the exchange lemma applied with a basis of VV. For the third, if an independent list of nn vectors did not span VV, appending a vector uu outside its span would give an independent list of n+1n + 1 vectors, as shown under extension below, which the first fact rules out. For the fourth, a dependent spanning list of nn vectors could lose one vector and still span, which the second fact rules out.

In plain words Dimension is the largest number of independent vectors, and also the smallest number of vectors that can span. In a space of known dimension nn, a list of nn vectors needs only one of the two checks, but it does need one.

Example The standard dimensions are dim⁡Fn=n\dim \mathbb{F}^n = n, dim⁡Pn=n+1\dim \mathcal{P}_n = n + 1 and dim⁡RCn=2n\dim_{\mathbb{R}} \mathbb{C}^n = 2n. The three vectors u1=(1,0,1)u_1 = (1, 0, 1), u2=(0,1,1)u_2 = (0, 1, 1) and u1+u2=(1,1,2)u_1 + u_2 = (1, 1, 2) do not form a basis of R3\mathbb{R}^3, even though there are three of them. They are dependent, and their span is only the plane z=x+yz = x + y. The count alone proves nothing without independence or spanning.

Extracting a basis from a spanning list

Definition Every finite list that spans a vector space VV over F\mathbb{F} contains a basis of VV. To find one, as long as the list is linearly dependent, remove a vector that is a linear combination of the others. A dependent list always has such a vector, since a relation c1w1+⋯+cnwn=0c_1 w_1 + \cdots + c_n w_n = 0 with ck≠0c_k \ne 0 can be solved for wkw_k. Removing it does not change the span, and the length drops each time, so the process stops, and it can stop only at a list that is independent and still spans VV. In particular, every finite-dimensional space has a basis.

In plain words A spanning list may carry passengers that add nothing new. Remove them one at a time and what remains is a basis.

Example In the real space P2\mathcal{P}_2 the list 1,t,1+t,t21, t, 1 + t, t^2 spans, since every element has the form a⋅1+b⋅t+c⋅t2a \cdot 1 + b \cdot t + c \cdot t^2. It is dependent, because 1+t=1⋅1+1⋅t1 + t = 1 \cdot 1 + 1 \cdot t, so remove 1+t1 + t. The remaining list 1,t,t21, t, t^2 still spans, and it is independent because a+bt+ct2a + bt + ct^2 is the zero polynomial only when a=b=c=0a = b = c = 0. So 1,t,t21, t, t^2 is a basis. The list 1,t,1+t1, t, 1 + t is not a basis, even though it also has three vectors. It is dependent, and no combination of it produces t2t^2.

Extending an independent list to a basis

Definition In a finite-dimensional vector space VV over F\mathbb{F}, every linearly independent list can be extended to a basis of VV. The key fact is that if v1,…,vpv_1, \dots, v_p is independent and u∉span⁡(v1,…,vp)u \notin \operatorname{span}(v_1, \dots, v_p), then v1,…,vp,uv_1, \dots, v_p, u is independent. Indeed, in a relation a1v1+⋯+apvp+cu=0a_1 v_1 + \cdots + a_p v_p + cu = 0, a nonzero cc would put uu in the span, so c=0c = 0, and then independence gives a1=⋯=ap=0a_1 = \cdots = a_p = 0. To extend, take a spanning list w1,…,wnw_1, \dots, w_n of VV and go through it in order, appending wjw_j whenever it is not in the span of the current list. Each step keeps the list independent, and at the end every wjw_j lies in its span, so the list spans VV.

In plain words An independent list may leave directions uncovered. Add vectors from outside the current span, one at a time, until nothing is left outside.

Example In R3\mathbb{R}^3 the independent list u1=(1,0,1)u_1 = (1, 0, 1), u2=(0,1,1)u_2 = (0, 1, 1) spans the plane z=x+yz = x + y, and e3=(0,0,1)e_3 = (0, 0, 1) is not on that plane. So u1,u2,e3u_1, u_2, e_3 is independent. It also spans, because

au1+bu2+ce3=(a,b,a+b+c),a u_1 + b u_2 + c e_3 = (a, b, a + b + c),

and a target (x,y,z)(x, y, z) is reached by exactly one choice, a=xa = x, b=yb = y and c=z−x−yc = z - x - y. For instance, (2,3,4)=2u1+3u2−e3(2, 3, 4) = 2u_1 + 3u_2 - e_3. The extension is not unique. Running the procedure with the spanning list e1,e2,e3e_1, e_2, e_3 appends e1e_1 first, since e1e_1 is not on the plane either, and produces the basis u1,u2,e1u_1, u_2, e_1.

Dimension of a subspace

Definition Let VV be a finite-dimensional vector space over F\mathbb{F} and let UU be a subspace of VV. Then UU is finite-dimensional and dim⁡U≤dim⁡V\dim U \le \dim V. Moreover, dim⁡U=dim⁡V\dim U = \dim V only when U=VU = V. For the proof, start with the empty list and, as long as the current list does not span UU, append a vector of UU outside its span. Each list is independent, so by the exchange lemma, with a basis of VV as the spanning list, at most dim⁡V\dim V vectors can be appended. The process therefore stops at a basis of UU with at most dim⁡V\dim V vectors. If dim⁡U=dim⁡V=n\dim U = \dim V = n, that basis is an independent list of nn vectors in VV, so it spans VV, and U=VU = V.

In plain words A subspace cannot hold more independent directions than the whole space, and a subspace with as many independent directions as the whole space is the whole space.

Example In the real space P3\mathcal{P}_3, which has dimension 44, let U={p∈P3:p(1)=0}U = \{p \in \mathcal{P}_3 : p(1) = 0\}. The constant polynomial 11 is not in UU, so U≠P3U \ne \mathcal{P}_3 and therefore dim⁡U≤3\dim U \le 3. The polynomials t−1t - 1, t2−1t^2 - 1 and t3−1t^3 - 1 lie in UU, and they are independent, because the combination

a(t−1)+b(t2−1)+c(t3−1)a(t - 1) + b(t^2 - 1) + c(t^3 - 1)

has coefficients aa, bb and cc on tt, t2t^2 and t3t^3, so it is the zero polynomial only when a=b=c=0a = b = c = 0. So dim⁡U≥3\dim U \ge 3, hence dim⁡U=3\dim U = 3, and these three polynomials form a basis of UU with no separate spanning argument.

Check yourself

  1. Explain without computing why the vectors (1,0,1)(1, 0, 1), (0,1,1)(0, 1, 1), (1,1,0)(1, 1, 0) and (1,1,1)(1, 1, 1) in R3\mathbb{R}^3 are linearly dependent. Then find a dependence relation.
Show the answer

The three standard basis vectors span R3\mathbb{R}^3, so by the exchange lemma an independent list in R3\mathbb{R}^3 has at most three vectors. A list of four must be dependent. For a relation, the first three vectors add up to (2,2,2)(2, 2, 2), which is twice the fourth, so

(1,0,1)+(0,1,1)+(1,1,0)−2(1,1,1)=0.\begin{aligned} &(1, 0, 1) + (0, 1, 1) + (1, 1, 0) \\[0.4em] &\quad - 2(1, 1, 1) = 0. \end{aligned}
  1. In the real space P2\mathcal{P}_2, extend the independent list 1+t1 + t, t+t2t + t^2 to a basis by running through the spanning list 1,t,t21, t, t^2.
Show the answer

A combination a(1+t)+b(t+t2)=a+(a+b)t+bt2a(1 + t) + b(t + t^2) = a + (a + b)t + bt^2 equals 11 only if b=0b = 0, a+b=0a + b = 0 and a=1a = 1, which is impossible. So 11 is outside the span, and appending it gives the independent list 1+t1 + t, t+t2t + t^2, 11. This list has 3=dim⁡P23 = \dim \mathcal{P}_2 independent vectors, so it is already a basis, and tt and t2t^2 are not appended. As a check, t=(1+t)−1t = (1 + t) - 1 and t2=(t+t2)−(1+t)+1t^2 = (t + t^2) - (1 + t) + 1.

  1. Let VV be a vector space of dimension 44 over F\mathbb{F}. Which statements are true? (a) Every list of five vectors in VV is linearly dependent. (b) Every list of four vectors in VV is a basis. (c) No list of three vectors spans VV. (d) Every linearly independent list of four vectors spans VV.
Show the answer

Statement (a) is true, by the exchange lemma with a basis of four vectors as the spanning list. Statement (b) is false. If v1,v2,v3,v4v_1, v_2, v_3, v_4 is a basis, the list v1,v1,v2,v3v_1, v_1, v_2, v_3 has four vectors but is dependent, since the coefficients 1,−1,0,01, -1, 0, 0 give v1−v1+0v2+0v3=0v_1 - v_1 + 0v_2 + 0v_3 = 0. Counting is not enough without checking independence or spanning. Statement (c) is true, because a spanning list of three vectors would be shorter than the independent list given by a basis. Statement (d) is true, because an independent list whose length equals the dimension is a basis.

How this lesson connects

It also uses span, linear independence and bases from a first linear algebra course.