Session 09 · Unit 1

Independence, Basis, and Dimension


The day four words get assigned clear meanings. A bunch of vectors is independent if no combination gives zero; they span a space if their combinations fill it; a basis is a set that does both; and the dimension is the number of vectors in any basis. The rank of a matrix turns out to be the dimension of its column space, and the number of free variables is the dimension of its null space.

A key fact to start: more unknowns than equations

Strang calls this “a key lecture” — the day the words independence, span, basis, and dimension “get assigned clear meanings.” And he’s careful about grammar from the first minute: a bunch of vectors is independent, spans a space, is a basis. We wouldn’t talk about a matrix being independent. The dimension is some number.

But first, a highly important fact he hadn’t called direct attention to earlier. Suppose AA has more columns than rows — nn unknowns, mm equations, with n>mn > m. Then Ax=0A\mathbf{x} = \mathbf{0} has nonzero solutions: there is something in the null space of AA besides the zero vector.

Why? Not just because “more unknowns than equations seems solvable” — we have a clear algorithm. Elimination reaches echelon form with nn variables and at most mm pivots, so there will be free variables — at least nmn - m of them. Assign a free variable a nonzero value (one, “or whatever I like”), solve for the pivot variables, and you have a solution to Ax=0A\mathbf{x} = \mathbf{0} that isn’t all zeros. Keep this fact in hand; the whole lecture leans on it.

Independence: no combination gives zero

The all-zero combination always gives zero, of course. The question is whether any other combination does. Examples, in the plane:

  • A vector and twice that vector. v1\mathbf{v}_1 and v2=2v1\mathbf{v}_2 = 2\mathbf{v}_1 are dependent for sure — “if the word dependent means anything, these should be dependent.” Two of the first minus the second is zero: 2v1v2=02\mathbf{v}_1 - \mathbf{v}_2 = \mathbf{0}.
  • A vector and the zero vector. Say v1=(2,1)\mathbf{v}_1 = (2, 1) and v2=(0,0)\mathbf{v}_2 = (0, 0). Dependent again: take zero v1\mathbf{v}_1‘s and six v2\mathbf{v}_2‘s — or five — and you get zero. If the zero vector is in the bunch, “independence is dead.”
  • Two vectors pointing different directions are independent: no combination gives zero except the zero combination.
  • Three vectors in the plane — any three, drawn however carelessly — are dependent. Why must that be?

The answer is the key fact from the start. Put the three vectors into the columns of a matrix AA — say v1=(2,1)\mathbf{v}_1 = (2, 1), v2=(1,2)\mathbf{v}_2 = (1, 2), v3=(2.5,1)\mathbf{v}_3 = (2.5, -1), making AA a 2×32 \times 3 matrix. More columns than rows, so there are free variables, so there is a nonzero c=(c1,c2,c3)\mathbf{c} = (c_1, c_2, c_3) with Ac=0A\mathbf{c} = \mathbf{0}. That says exactly: go out some v1\mathbf{v}_1, out some more v2\mathbf{v}_2, back on v3\mathbf{v}_3, and end up at zero. Dependent.

This is the move the course has been rehearsing for lectures: a combination of the columns is just AA times the vector of cc‘s, so dependence questions come back to the null space. (The abstract definition never mentioned a matrix — but most of the time our vectors are columns, and then this is the test.)

Spanning a space

We’ve actually seen the next word already. When we took a matrix’s columns and formed all their combinations, we got the column space. Those columns span the column space.

So “span” compresses “take all linear combinations” into one word. The columns of a matrix span the column space — always. Are they independent? Maybe yes, maybe no; it depends on the particular columns. What we’d really like is a set that spans and is independent — the right number of vectors. Fewer, and we wouldn’t have the whole space; more, and they wouldn’t be independent. The word for “just right” is coming.

Basis: enough vectors and not too many

Strang says he’ll always be asking for a basis now, because a basis tells you everything: give me a basis for a subspace and you’ve told me what that subspace is.

Example: bases for R3\mathbb{R}^3. The first basis that comes to mind:

[100],[010],[001]\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}, \quad \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}, \quad \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}

That’s the xx, yy, zz axes — if those aren’t independent, we’re in trouble. In matrix language, put them in columns: you get the identity matrix, whose null space is only the zero vector. Independent, and they span. A basis. But far from the only one.

Another basis. Start with (1,1,2)(1, 1, 2) and (2,2,5)(2, 2, 5). Independent? Yes. Do they span R3\mathbb{R}^3? No — some vectors in R3\mathbb{R}^3 are not combinations of those two. We need a third vector, and it would be a goof to pick (3,3,7)(3, 3, 7): that’s the sum of the first two, it lies in their plane, and the attempt at a basis would be dead. Any vector not in that plane works — Strang tries (3,3,8)(3, 3, 8): “at least it’s not the sum of those two vectors,” and it does give a basis.

One more question, to be sure the idea has landed. Take just the two vectors (1,1,2)(1, 1, 2) and (2,2,5)(2, 2, 5) again. Are they a basis for anything? Sure — they’re independent, so they’re a basis for the space they span: a plane inside R3\mathbb{R}^3. Stick in (3,3,7)(3, 3, 7), which lies in that plane, and the three vectors still span the plane but are no longer a basis — independence is gone.

Every basis has the same size: dimension

The basis is not unique — “there’s zillions of bases.” Any invertible 3×33 \times 3 matrix has columns that form a basis for R3\mathbb{R}^3. But all those bases share something, and you saw it coming: when Strang stopped at two vectors, you said “not a basis” because there weren’t enough vectors.

So the four words, in order: independence looks at combinations not being zero; spanning looks at all the combinations; basis combines the two; dimension counts the vectors in any basis.

A worked example: both dimensions of a matrix

Other bases for that column space work too: columns 1 and 3, or 2 and 3, or 2 and 4 — or vectors not among the columns at all, like (2,2,2)(2, 2, 2) and (7,5,7)(7, 5, 7) (that’s the sum of all four columns). Independent, and the count is right: two.

The lecture ends with the language merging into two formulas. The rank of AA — the number of pivot columns — is the dimension of the column space. (“Of course, you say. It had to be.”) But mind the grammar: a matrix has a rank; a subspace has a dimension. You don’t take the dimension of AA — you take the dimension of the column space of AA. And for the null space: nn columns, rr of them pivots, leaves nrn - r free variables.

dimC(A)=r,dimN(A)=nr\dim C(A) = r, \qquad \dim N(A) = n - r

That’s the key spaces, their bases, and their dimensions.

Problems

Work these before revealing the solutions — they’re exactly the questions “the homework asks, the quizzes ask, the final exam will ask.”

Problem 9.1 Testing independence

Are the vectors

v1=[121],v2=[210],v3=[452]\mathbf{v}_1 = \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}, \quad \mathbf{v}_2 = \begin{bmatrix} 2 \\ 1 \\ 0 \end{bmatrix}, \quad \mathbf{v}_3 = \begin{bmatrix} 4 \\ 5 \\ 2 \end{bmatrix}

independent or dependent? If dependent, give a nonzero combination that equals the zero vector.

Show solution

Put them in the columns of AA and look for a nonzero vector in the null space. Try to write v3\mathbf{v}_3 as c1v1+c2v2c_1\mathbf{v}_1 + c_2\mathbf{v}_2: the third components force c1=2c_1 = 2, then the first components give 2+2c2=42 + 2c_2 = 4, so c2=1c_2 = 1. Check the middle: 2(2)+1(1)=52(2) + 1(1) = 5. ✓ So v3=2v1+v2\mathbf{v}_3 = 2\mathbf{v}_1 + \mathbf{v}_2, and

2v1+v2v3=0.2\mathbf{v}_1 + \mathbf{v}_2 - \mathbf{v}_3 = \mathbf{0}.

The vectors are dependent: (2,1,1)(2, 1, -1) is in the null space of the matrix with these columns, so the rank is 22, less than n=3n = 3.

Problem 9.2 Forced dependence

Explain, using pivots and free variables, why any four vectors in R3\mathbb{R}^3 must be dependent. Then state the general fact for nn vectors in Rm\mathbb{R}^m.

Show solution

Put the four vectors in the columns of a matrix AA, which is 3×43 \times 4. Elimination produces at most 33 pivots (one per row), so at most 33 of the 44 columns are pivot columns — at least one free variable is left over. Assign that free variable a nonzero value and solve for the pivot variables: this gives a nonzero c\mathbf{c} with Ac=0A\mathbf{c} = \mathbf{0}, i.e. a nonzero combination of the four vectors equal to zero. Dependent.

In general: any nn vectors in Rm\mathbb{R}^m with n>mn > m are dependent, because the m×nm \times n matrix has at most mm pivots and therefore at least nmn - m free variables.

Problem 9.3 Completing a basis

The vectors v1=(1,0,1)\mathbf{v}_1 = (1, 0, 1) and v2=(1,1,0)\mathbf{v}_2 = (1, 1, 0) are independent. (a) What space are they a basis for? (b) Give a third vector v3\mathbf{v}_3 so that v1,v2,v3\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3 is a basis for R3\mathbb{R}^3, and a third vector that fails.

Show solution

(a) They are a basis for the space they span: the plane inside R3\mathbb{R}^3 consisting of all combinations c1v1+c2v2c_1\mathbf{v}_1 + c_2\mathbf{v}_2. They span it by construction and they’re independent, so both basis requirements hold.

(b) Any vector not in that plane works. Take v3=(0,0,1)\mathbf{v}_3 = (0, 0, 1): the matrix

[110010101]\begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 0 \\ 1 & 0 & 1 \end{bmatrix}

row reduces with three pivots (subtract row 1 from row 3 to get (0,1,1)(0, -1, 1), then add row 2), so it is invertible and the columns are a basis for R3\mathbb{R}^3.

A choice that fails: v3=v1+v2=(2,1,1)\mathbf{v}_3 = \mathbf{v}_1 + \mathbf{v}_2 = (2, 1, 1). It lies in the plane, the three vectors are dependent (v1+v2v3=0\mathbf{v}_1 + \mathbf{v}_2 - \mathbf{v}_3 = \mathbf{0}), and the attempt at a basis is dead.

Problem 9.4 Both dimensions at once

For

A=[134268134]A = \begin{bmatrix} 1 & 3 & 4 \\ 2 & 6 & 8 \\ 1 & 3 & 4 \end{bmatrix}

find a basis for the column space, a basis for the null space, and the dimensions of both. Check that the dimensions add to nn.

Show solution

Every column is a multiple of the first: column 2 is 3×3 \times column 1, column 3 is 4×4 \times column 1. Elimination leaves one pivot, so the rank is r=1r = 1.

Column space: the pivot column, (1,2,1)(1, 2, 1), is a basis by itself. dimC(A)=1\dim C(A) = 1 — the column space is a line in R3\mathbb{R}^3.

Null space: free variables x2,x3x_2, x_3. Special solutions: set (x2,x3)=(1,0)(x_2, x_3) = (1, 0), then x1+3=0x_1 + 3 = 0 gives (3,1,0)(-3, 1, 0); set (x2,x3)=(0,1)(x_2, x_3) = (0, 1), then x1+4=0x_1 + 4 = 0 gives (4,0,1)(-4, 0, 1). These two are independent and span the null space, so they’re a basis and dimN(A)=nr=31=2\dim N(A) = n - r = 3 - 1 = 2.

Check: dimC(A)+dimN(A)=1+2=3=n\dim C(A) + \dim N(A) = 1 + 2 = 3 = n. ✓

Problem 9.5 Dimension does half the work

A subspace SS of R4\mathbb{R}^4 is known to have dimension 22, and the vectors w1=(1,1,0,0)\mathbf{w}_1 = (1, 1, 0, 0) and w2=(0,1,1,0)\mathbf{w}_2 = (0, 1, 1, 0) both lie in SS. Without any further information about SS, show that w1,w2\mathbf{w}_1, \mathbf{w}_2 is a basis for SS.

Show solution

First, independence: c1w1+c2w2=(c1,c1+c2,c2,0)c_1\mathbf{w}_1 + c_2\mathbf{w}_2 = (c_1, c_1 + c_2, c_2, 0) equals zero only when c1=0c_1 = 0 (first component) and c2=0c_2 = 0 (third component). So they are independent.

Now use the lecture’s key point: if the dimension is known to be 22 and we have 22 independent vectors in the space, they are automatically a basis. Suppose they did not span SS. Then some vector of SS is outside their span, and adjoining it gives 33 independent vectors in SS — which could be extended to a basis of SS with at least 33 vectors, contradicting the fact that every basis of SS has exactly 22 vectors. So w1,w2\mathbf{w}_1, \mathbf{w}_2 span SS, and being independent as well, they are a basis.