Lecture 19 · Week 5· 13:12
Subspaces of Rn
Column space, null space.
Saved in this browser only. No account needed.
TranscriptThe full text of the lecture. Click any sentence to play the video from there.
Today: subspaces
Welcome back. Two kinds of sets have kept turning up in this course. The span of one vector is a line through the origin, and the span of two vectors in different directions is a plane through the origin. And in lecture ten, the solutions of a homogeneous system, A x equals zero, formed a line or a plane through the origin as well. These sets have three things in common. Each one contains the zero vector. Adding two of its vectors gives a vector that is still in the set. And so does scaling one of its vectors.
A set with these three properties is called a subspace. Today we define subspaces, and see that every span is one. Then we meet the two subspaces that come with every matrix: the column space and the null space. Together, they tell us which systems A x equals b can be solved, and how many solutions they have.
Subspaces
Here is the definition. Let H be a subset of F n. We say that H is a subspace of F n if three conditions hold. First, the zero vector is in H. Second, H is closed under addition: whenever u and v are in H, their sum u plus v is in H too. Third, H is closed under scalar multiplication: whenever u is in H, and c is a scalar, c u is in H. Closure means that once we are inside H, adding and scaling never take us out of it.
Every F n has two subspaces that come for free. The set that holds only the zero vector is a subspace, because zero plus zero is zero, and c times zero is zero. And F n itself is a subspace. These two are called the trivial subspaces. Now a real example: the line y equals two x, in the plane. Its points have the form (s, two s). Take two vectors on the line. Drawn tip to tail, their sum lands on the line again.
In coordinates, we add the vector (s, two s), and the vector (t, two t). In the first coordinate, we get s plus t. In the second, two s plus two t, which is two times s plus t. The second entry is twice the first, so the sum is on the line. And scaling: c times the vector (s, two s), is the vector (c s, two c s), again of the same form. Stretching or flipping an arrow along the line keeps it on the line. Finally, the zero vector is on the line, at s equals zero. So this line is a subspace.
Sets that are not subspaces
To see what each condition does, here are three sets in the plane that are not subspaces. The line y equals x plus one does not pass through the origin, so the zero vector is not on it. The first condition fails. The first quadrant contains zero, and the sum of two vectors in it stays in it. But scale the vector (one, one), by minus one, and we get the vector (minus one, minus one), which is outside. The third condition fails.
The two axes together are closed under scaling. But e one and e two are both on the axes, while their sum is the vector (one, one), which is on neither. The second condition fails. Here is a useful consequence of the definition. If H is a subspace, then every linear combination of vectors in H is in H too. Each term c i v i is in H, by closure under scaling, and adding the terms one at a time keeps us in H, by closure under addition.
Spans are subspaces
Our first theorem says that every span is a subspace. Let v one up to v k be vectors in F n. Then their span is a subspace of F n that contains each v i. And it is the smallest one: every subspace that contains v one up to v k contains the whole span. The zero vector is in the span: it is zero v one, plus and so on, up to zero v k.
If x and y are combinations of the v's, then adding them adds the weights: the weight of v one becomes c one plus d one, and so on. So x plus y is a combination too. And c times a combination multiplies every weight by c. So the span is a subspace, and each v i is in it, with weight one on v i and zero on the others. For the second part, take any subspace H that contains the v's. Every element of the span is a linear combination of them, so it lies in H, by the consequence we just proved.
So every line through the origin is a subspace, and so is every plane through the origin. In the plane F two, these are all the subspaces there are. The subspaces of F two are the zero subspace, the lines through the origin, and F two itself. This proof needs some care, so take it slowly, and pause if you need to. Suppose H is not just zero. Then it holds some nonzero vector v, and so it contains the whole line through v. If H is exactly that line, we are done. Otherwise, H holds a vector w that is not on the line. Then v and w are not multiples of each other. w equals c v is impossible, because w is not on the line. And v equals c w is impossible too: c equals zero would make v zero, and any other c would give w equals one over c, times v, back on the line. So v and w are linearly independent.
So an echelon form of the two by two matrix with columns v and w has a pivot in each of its two columns. These pivots lie in different rows, and there are only two rows, so every row has a pivot. So by lecture twelve, v and w span F two. H contains them both, so H contains their span, which is all of F two. In R three, the list is similar: zero, the lines and the planes through the origin, and R three itself. We prove this in the next lecture, where we measure subspaces by their dimension.
The column space
Now the first of the two subspaces that come with a matrix. Let A be an m by n matrix, with columns a one up to a n. The column space of A, written Col A, is the span of its columns. Each column is in F m, so Col A is a subspace of F m. We know that A x is the combination of the columns with weights x one up to x n. So Col A is exactly the set of all products A x, as x runs through F n. And this gives the column space its meaning: the system A x equals b has a solution exactly when b is in the column space of A.
Let's see one. Take the three by two matrix with columns (one, zero, one), and (zero, one, one). They point in different directions, so their span, Col A, is a plane through the origin of R three. Which vectors b lie on this plane? We row reduce A with b beside it, keeping the entries of b as letters. First, replace row three by row three minus row one. Its right hand side becomes b three minus b one.
Then replace row three by row three minus row two. The left part of row three becomes zero, and the right hand side becomes b three minus b one minus b two. The system is consistent exactly when this last entry is zero. So the column space is the plane b three equals b one plus b two. For example, the vector (one, two, three), is on the plane, because three is one plus two. Indeed, it is one times the first column, plus two times the second. But the vector (one, two, zero), is not on the plane, so A x equals the vector (one, two, zero), has no solution.
The null space
The second subspace is the null space. For an m by n matrix A, the null space, Nul A, is the set of all x in F n with A x equal to zero. It is the solution set of the homogeneous system. Notice where the two spaces live. The null space is made of inputs, so it lies in F n. The column space is made of outputs, so it lies in F m. The null space is a subspace of F n. The proof uses the linearity of the product, from lecture twelve.
The zero vector is in it, since A times zero is zero. If A u and A v are both zero, then A times u plus v is A u plus A v, which is zero plus zero, which is zero. And if A u is zero, then A times c u is c times A u, which is c times zero, which is zero. All three conditions hold.
Careful: this works only because the right hand side is zero. If b is not zero, the solutions of A x equals b do not form a subspace, because A times zero is zero, not b. In lecture twelve we saw what they form instead: one particular solution p, plus the null space. A copy of the null space, shifted away from the origin.
Computing the null space
How do we describe a null space completely? We solve A x equals zero, as in lecture ten. Here is an example: row one of A is (one, two, one), and row two is (two, four, two). The right hand side stays zero, so we row reduce A alone. Replace row two by row two minus two times row one. Row two becomes zero, and we are in reduced form. The pivot is in column one. So x one is a pivot variable, and x two and x three are free. Call them s and t. The equation left says x one equals minus two s minus t.
Now we split x by the parameters. Each entry is written as an s part plus a t part. The first entry is minus two s, minus t. The entry s splits into one s, plus zero t, and the entry t splits into zero s, plus one t. Collecting the s parts and the t parts, x is s times the vector (minus two, one, zero), plus t times the vector (minus one, zero, one). Call these vectors v and w. Every solution is a combination of v and w, so the null space of A is the span of v and w: a plane through the origin of R three. A quick check: A times v is minus two times the column (one, two), plus one times the column (two, four), plus zero times the third column. In the first coordinate, minus two plus two is zero, and in the second, minus four plus four is zero.
The column space of the same matrix lives in R two. The second column is two times the first, and the third equals the first. So Col A is the span of the vector (one, two), alone: a line in the plane. This method always works. Write the general solution of A x equals zero in parametric vector form, with one vector for each free variable. Those vectors span the null space. And if there are no free variables, the null space is just zero. Notice the contrast. The column space is given by spanning vectors, so it is easy to list its members, but testing a vector b takes a row reduction. The null space is given by a condition, so testing a vector x is easy, just compute A x, but listing its members takes a row reduction.
What the two spaces say
Finally, the two spaces answer the two big questions about a system. A x equals b has a solution for every b exactly when the column space is all of F m. By lecture twelve, that happens when an echelon form has a pivot in every row. And the solution, when there is one, is unique exactly when the null space is just zero, because the solutions are one particular solution plus the null space. That happens when there is a pivot in every column. For a square matrix, the two come together. An n by n matrix is invertible exactly when its null space is zero, and exactly when its column space is all of F n.
To sum up. A subspace contains zero, and is closed under addition and scaling. Every span is a subspace. The column space of A is the span of its columns: the right hand sides we can reach. The null space of A is the solution set of A x equals zero, and it decides how many ways there are to reach them. Before the next lecture, read section four point one of the course book, try the problems on sheet five about subspaces, and do the lecture check on this lecture's page at Open Semester dot com. Next time we ask how big a subspace is. We find the fewest vectors that span it, called a basis, and their number, the dimension. And we will prove that for an m by n matrix, the dimensions of the column space and the null space add up to n. 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
Decide for each set whether it is a subspace of . (a) , (b) , (c) .
Hint 1 of 2
Check the three conditions of Definition 4.1.1 for each set: is in it, it is closed under addition, and it is closed under scalar multiplication. One failure is enough for a no.
Hint 2 of 2
Start with : is ? Is ? For , take and multiply it by .
Worked solution
- (a) Yes. , a line through the origin, and every span is a subspace (Theorem 4.1.6). Directly: is the case ; ; .
- (b) No. , since , so condition (a) fails.
- (c) No. , but , since . Condition (c) fails.
- Question 2 of 3 Core
Let . Row reduce with to find when . For which number is in ? For that , find the weights with .
Hint 1 of 2
As in Example 4.1.10: keep the entries of as letters and row reduce until the left part of row three is zero. exactly when the last entry of that row is zero.
Hint 2 of 2
gives row three . Then gives .
Worked solution
- .
- The system is consistent exactly when , so , a plane through the origin.
- For : .
- Rows one and two give and . Check: .
- Question 3 of 3 Stretch
Let , which is already in reduced row echelon form. Write the general solution of as with and . Give the first entry of and the entries and of . Then decide: is ?
Hint 1 of 2
The pivots are in columns and , so and are pivot variables and , are free. Solve each equation for its pivot variable, then split into an part and a part (Proposition 4.1.15).
Hint 2 of 2
Row one says , so . Row two says , so . For , count the pivots in the rows (Theorem 4.1.16(a)).
Worked solution
- The pivots are in columns and ; and are free. Row one: , so . Row two: , so .
- Split by the parameters: , so (Proposition 4.1.15). So , , .
- Check: and .
- is an echelon form of itself with a pivot in each of its two rows, so by Theorem 4.1.16(a). Indeed, columns one and three are and , which already span .
How did it go?