Unit 3, lesson 15

Bases and Dimension

What a basis is, how an ordered basis gives each vector a coordinate vector, how to prune a spanning list or extend an independent list to a basis, and why dimension, the size of any basis, is well defined.

  • Video 15
  • Subspaces, Independence and Bases

The vector (3,2)(3, 2) is three steps along (1,0)(1, 0) plus two steps along (0,1)(0, 1). It is also one step along (1,0)(1, 0) plus two steps along (1,1)(1, 1). Both descriptions are correct, but the numbers mean something only once you know which vectors they multiply and in which order. A basis is a list of reference vectors that describes every vector of a space in exactly one way. This lesson builds bases by removing redundant vectors or adding missing directions, and shows that every basis of a space has the same size, its dimension.

Key terms

Basis

Definition Tuples such as (1,1)(1, 1) stand for column vectors. Let WW be a subspace of Rn\mathbb{R}^n. A basis of WW is a list of vectors in WW that is linearly independent and spans WW. Spanning means every vector of WW is a linear combination of the list, and independence means that combination is unique. So a list of vectors in WW is a basis of WW exactly when every vector of WW is a combination of the list in exactly one way. Whether a list is a basis depends on the space it is meant to describe, so always name that space.

In plain words A basis has enough vectors to reach everything in the space and no spare ones.

Example The list (1,0)(1, 0), (1,1)(1, 1) is a basis of R2\mathbb{R}^2. Solving

a(1,0)+b(1,1)=(a+b, b)=(x,y)\begin{aligned} a(1, 0) + b(1, 1) &= (a + b,\ b) \\[0.4em] &= (x, y) \end{aligned}

gives b=yb = y and a=x−ya = x - y, exactly one answer for every (x,y)(x, y). Both conditions matter. The list (1,0)(1, 0), (2,0)(2, 0) neither spans R2\mathbb{R}^2 nor is independent. Adding (0,1)(0, 1) makes it span, but it is still dependent. The single vector (1,0)(1, 0) is independent but spans only the xx-axis, so it is a basis of the xx-axis and not of R2\mathbb{R}^2.

Standard basis

Definition For j=1,…,nj = 1, \dots, n let ej\mathbf{e}_j be the vector in Rn\mathbb{R}^n with 11 in entry jj and 00 in every other entry. The list (e1,…,en)(\mathbf{e}_1, \dots, \mathbf{e}_n) is the standard basis of Rn\mathbb{R}^n. It is a basis because every x=(x1,…,xn)\mathbf{x} = (x_1, \dots, x_n) satisfies

x=x1e1+x2e2+⋯+xnen,\mathbf{x} = x_1\mathbf{e}_1 + x_2\mathbf{e}_2 + \cdots + x_n\mathbf{e}_n,

and comparing entries shows that no other coefficients work. The matrix with these columns is the identity matrix InI_n, which has a pivot in every column.

In plain words The ordinary entries of a vector are its coordinates relative to the standard basis.

Example In R3\mathbb{R}^3 the vector (3,−1,2)(3, -1, 2) equals 3e1−e2+2e33\mathbf{e}_1 - \mathbf{e}_2 + 2\mathbf{e}_3. The standard basis of R3\mathbb{R}^3 is not a basis of the plane WW given by z=x+yz = x + y. A basis of WW must consist of vectors in WW, and none of e1\mathbf{e}_1, e2\mathbf{e}_2, e3\mathbf{e}_3 satisfies z=x+yz = x + y.

Coordinate vector

Definition An ordered basis of a subspace WW is a basis whose vectors are taken in a fixed order, written B=(b1,…,bk)\mathcal{B} = (\mathbf{b}_1, \dots, \mathbf{b}_k). Each v\mathbf{v} in WW can be written in exactly one way as v=c1b1+⋯+ckbk\mathbf{v} = c_1\mathbf{b}_1 + \cdots + c_k\mathbf{b}_k, and the coordinate vector of v\mathbf{v} relative to B\mathcal{B} is the column of these coefficients,

[v]B=[c1⋮ck].[\mathbf{v}]_{\mathcal{B}} = \begin{bmatrix} c_1 \\ \vdots \\ c_k \end{bmatrix}.

It has kk entries, one for each basis vector, even when v\mathbf{v} itself has nn entries. For an ordered basis of all of Rn\mathbb{R}^n, put the basis vectors in the columns of the n×nn \times n matrix B=[b1 ⋯ bn]B = [\mathbf{b}_1 \ \cdots \ \mathbf{b}_n]. Then v=B[v]B\mathbf{v} = B[\mathbf{v}]_{\mathcal{B}}. Reordering the basis reorders the coordinates in the same way, while the vector itself does not move.

In plain words Coordinates are the weights on the basis vectors, read in the order of the basis. Only the standard basis gives every vector coordinates equal to its ordinary entries.

Example Let B=(b1,b2)\mathcal{B} = (\mathbf{b}_1, \mathbf{b}_2) with b1=(1,0)\mathbf{b}_1 = (1, 0) and b2=(1,1)\mathbf{b}_2 = (1, 1). By the basis example, (x,y)=(x−y)b1+yb2(x, y) = (x - y)\mathbf{b}_1 + y\mathbf{b}_2, so v=(3,2)\mathbf{v} = (3, 2) has [v]B=(1,2)[\mathbf{v}]_{\mathcal{B}} = (1, 2). Multiplying by BB rebuilds the vector,

B[v]B=[1101][12]=[32].B[\mathbf{v}]_{\mathcal{B}} = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix} 3 \\ 2 \end{bmatrix}.

In the reversed order (b2,b1)(\mathbf{b}_2, \mathbf{b}_1) the same vector has coordinates (2,1)(2, 1). A basis of a plane gives two coordinates even inside R3\mathbb{R}^3. With the ordered basis C=((1,0,1),(0,1,1))\mathcal{C} = ((1, 0, 1), (0, 1, 1)) of the plane z=x+yz = x + y, found below, the vector (2,5,7)=2(1,0,1)+5(0,1,1)(2, 5, 7) = 2(1, 0, 1) + 5(0, 1, 1) has [(2,5,7)]C=(2,5)[(2, 5, 7)]_{\mathcal{C}} = (2, 5).

Pruning a spanning list

Definition Let v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k span a subspace WW of Rn\mathbb{R}^n. While the list is dependent, choose a dependence relation and remove one vector whose coefficient in it is nonzero. That vector is a combination of the others, so the shorter list still spans WW. Each step removes a vector, so after at most kk steps the list is independent and still spans WW, which makes it a basis of WW. In particular every finite spanning list of WW contains a basis of WW. In Rn\mathbb{R}^n the relations come from elimination on the matrix whose columns are the listed vectors.

In plain words Throw out redundant vectors one at a time, choosing only vectors that a relation shows to be redundant, until no redundancy is left.

Example The vectors c1=(1,0,1)\mathbf{c}_1 = (1, 0, 1), c2=(0,1,1)\mathbf{c}_2 = (0, 1, 1) and c3=(1,1,2)\mathbf{c}_3 = (1, 1, 2) lie in the plane WW given by z=x+yz = x + y and span it, since every (x,y,x+y)(x, y, x + y) equals xc1+yc2x\mathbf{c}_1 + y\mathbf{c}_2. They satisfy c1+c2−c3=0\mathbf{c}_1 + \mathbf{c}_2 - \mathbf{c}_3 = \mathbf{0}. Every coefficient is nonzero, so any one of the three may go. Removing c3\mathbf{c}_3 leaves c1,c2\mathbf{c}_1, \mathbf{c}_2, and ac1+bc2=(a,b,a+b)a\mathbf{c}_1 + b\mathbf{c}_2 = (a, b, a + b) is 0\mathbf{0} only when a=b=0a = b = 0. So (c1,c2)(\mathbf{c}_1, \mathbf{c}_2) is a basis of WW. Removing c1\mathbf{c}_1 instead gives a different basis, (c2,c3)(\mathbf{c}_2, \mathbf{c}_3).

Extending an independent list

Definition Let v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k be linearly independent vectors in a subspace WW of Rn\mathbb{R}^n, and let w\mathbf{w} be a vector of WW outside span⁡{v1,…,vk}\operatorname{span}\{\mathbf{v}_1, \dots, \mathbf{v}_k\}. Then the list v1,…,vk,w\mathbf{v}_1, \dots, \mathbf{v}_k, \mathbf{w} is still linearly independent. In any relation among the longer list the coefficient of w\mathbf{w} must be zero, since otherwise w\mathbf{w} would lie in the span of the others, and then the independence of the original list makes every other coefficient zero as well. As long as the list does not span WW, such a w\mathbf{w} exists, so the step can be repeated. It stops after at most n−kn - k steps, because an independent list in Rn\mathbb{R}^n has at most nn vectors, and the result is a basis of WW that contains the original list.

In plain words Add a direction of the target space that the list cannot reach yet. That never creates a redundancy, and you keep going until the list reaches the whole target space.

Example Here the target space is all of R3\mathbb{R}^3. The independent pair c1,c2\mathbf{c}_1, \mathbf{c}_2 spans only the plane WW, so it is not yet a basis of R3\mathbb{R}^3. The vector e3=(0,0,1)\mathbf{e}_3 = (0, 0, 1) lies outside that span, because 1≠0+01 \ne 0 + 0, so c1,c2,e3\mathbf{c}_1, \mathbf{c}_2, \mathbf{e}_3 is independent. It also spans R3\mathbb{R}^3, because

(x,y,z)=x c1+y c2+(z−x−y) e3.\begin{aligned} (x, y, z) &= x\,\mathbf{c}_1 + y\,\mathbf{c}_2 \\[0.4em] &\quad + (z - x - y)\,\mathbf{e}_3. \end{aligned}

So (c1,c2,e3)(\mathbf{c}_1, \mathbf{c}_2, \mathbf{e}_3) is a basis of R3\mathbb{R}^3. In this ordered basis the vector (2,−1,0)(2, -1, 0) has coordinates (2,−1,−1)(2, -1, -1).

Dimension

Definition Let WW be a subspace of Rn\mathbb{R}^n. If WW is spanned by mm vectors, then every linearly independent list in WW has at most mm vectors. Consequently any two bases of WW have the same number of vectors, since each is independent and each spans. This common number is the dimension of WW, written dim⁡W\dim W.

The bound comes from elimination. Write each vector of an independent list u1,…,uk\mathbf{u}_1, \dots, \mathbf{u}_k in WW as a combination of the mm spanning vectors and collect the coefficients as the columns of an m×km \times k matrix CC. If k>mk > m, some column of CC has no pivot, since CC has only mm rows, so Ch=0C\mathbf{h} = \mathbf{0} for some nonzero h\mathbf{h}. The combination h1u1+⋯+hkukh_1\mathbf{u}_1 + \cdots + h_k\mathbf{u}_k is the combination of the spanning vectors with coefficients Ch=0C\mathbf{h} = \mathbf{0}, so it equals 0\mathbf{0}. That is a nontrivial relation among independent vectors, which is impossible.

The empty list is independent, since it allows no nontrivial relation, and its span is {0}\{\mathbf{0}\}, since its only combination, the empty sum, equals 0\mathbf{0}. So the zero subspace has the empty list as its basis, and dim⁡{0}=0\dim \{\mathbf{0}\} = 0. Every subspace of Rn\mathbb{R}^n has a basis, obtained by extending the empty list, and dim⁡W≤n\dim W \le n, with equality only for W=RnW = \mathbb{R}^n. In Rn\mathbb{R}^n a list of exactly nn vectors is a basis as soon as it is independent, and also as soon as it spans.

In plain words Dimension counts independent directions. It belongs to the space, not to the basis you happen to pick, and it can be smaller than the number of entries the vectors have.

Example The plane WW given by z=x+yz = x + y has the basis (c1,c2)(\mathbf{c}_1, \mathbf{c}_2), so dim⁡W=2\dim W = 2, even though its vectors have three entries. The standard basis gives dim⁡R3=3\dim \mathbb{R}^3 = 3, and a line through the origin, spanned by one nonzero vector, has dimension 11. Any three vectors in WW, such as c1,c2,c3\mathbf{c}_1, \mathbf{c}_2, \mathbf{c}_3, must be dependent, because three is more than dim⁡W=2\dim W = 2.

Check yourself

  1. Let B=((2,1),(1,1))\mathcal{B} = ((2, 1), (1, 1)). Find [v]B[\mathbf{v}]_{\mathcal{B}} for v=(3,1)\mathbf{v} = (3, 1), check it by rebuilding v\mathbf{v}, and give the coordinates of v\mathbf{v} in the reversed order ((1,1),(2,1))((1, 1), (2, 1)).
Show the answer

Solve 2a+b=32a + b = 3 and a+b=1a + b = 1. Subtracting gives a=2a = 2, and then b=−1b = -1. So [v]B=(2,−1)[\mathbf{v}]_{\mathcal{B}} = (2, -1), and indeed

2 (2,1)−(1,1)=(3,1).2\,(2, 1) - (1, 1) = (3, 1).

In the reversed order the entries swap, giving (−1,2)(-1, 2).

  1. The vectors (1,1,0)(1, 1, 0), (0,1,1)(0, 1, 1) and (1,0,1)(1, 0, 1) are linearly independent. Explain why they form a basis of R3\mathbb{R}^3 without checking that they span, and find the coordinates of (2,0,0)(2, 0, 0) in this ordered basis.
Show the answer

The space R3\mathbb{R}^3 has dimension 33, and in R3\mathbb{R}^3 a list of exactly three independent vectors is a basis. Two independent vectors would not be enough, and four vectors would be dependent. For the coordinates, solve

c1(1,1,0)+c2(0,1,1)+c3(1,0,1)=(2,0,0),\begin{aligned} &c_1(1, 1, 0) + c_2(0, 1, 1) \\[0.4em] &\quad + c_3(1, 0, 1) = (2, 0, 0), \end{aligned}

that is c1+c3=2c_1 + c_3 = 2, c1+c2=0c_1 + c_2 = 0 and c2+c3=0c_2 + c_3 = 0. The last two give c2=−c1c_2 = -c_1 and c3=c1c_3 = c_1, so 2c1=22c_1 = 2. The coordinates are (1,−1,1)(1, -1, 1), and (1,1,0)−(0,1,1)+(1,0,1)=(2,0,0)(1, 1, 0) - (0, 1, 1) + (1, 0, 1) = (2, 0, 0) confirms them.

  1. Let HH be the plane x−y+2z=0x - y + 2z = 0 in R3\mathbb{R}^3, with p=(1,1,0)\mathbf{p} = (1, 1, 0), q=(−2,0,1)\mathbf{q} = (-2, 0, 1) and r=(−1,1,1)\mathbf{r} = (-1, 1, 1). Is p,q,r\mathbf{p}, \mathbf{q}, \mathbf{r} a basis of HH? If not, prune it to a basis, state dim⁡H\dim H, and then extend your basis to a basis of R3\mathbb{R}^3.
Show the answer

All three vectors satisfy the equation of HH. But p+q=(−1,1,1)=r\mathbf{p} + \mathbf{q} = (-1, 1, 1) = \mathbf{r}, so the list is dependent and is not a basis. Remove r\mathbf{r}. The combination ap+bq=(a−2b, a, b)a\mathbf{p} + b\mathbf{q} = (a - 2b,\ a,\ b) is zero only when a=b=0a = b = 0, so p,q\mathbf{p}, \mathbf{q} is independent. It spans HH, because a vector of HH has x=y−2zx = y - 2z and therefore

(y−2z, y, z)=y p+z q.(y - 2z,\ y,\ z) = y\,\mathbf{p} + z\,\mathbf{q}.

So (p,q)(\mathbf{p}, \mathbf{q}) is a basis of HH and dim⁡H=2\dim H = 2. To extend, pick a vector outside HH, such as e1=(1,0,0)\mathbf{e}_1 = (1, 0, 0), since 1−0+2⋅0=1≠01 - 0 + 2 \cdot 0 = 1 \ne 0. The list p,q,e1\mathbf{p}, \mathbf{q}, \mathbf{e}_1 is then independent, and three independent vectors in R3\mathbb{R}^3 form a basis. Explicitly,

(x,y,z)=y p+z q+(x−y+2z) e1.\begin{aligned} (x, y, z) &= y\,\mathbf{p} + z\,\mathbf{q} \\[0.4em] &\quad + (x - y + 2z)\,\mathbf{e}_1. \end{aligned}

How this lesson connects

Where this leads in Linear Algebra II