The focus of Chapter 4 was solving problems of the form:
Given an matrix and a vector , find a vector such that
Now, we’d like to approach the same idea from a different perspective:
Given an matrix , what are all possible outputs we can make using ?
We’d also like to describe sets of possible outputs beyond and . By the end, we’ll have precise terminology to describe the set of possible outputs of a matrix like
This is a matrix, so its set of possible outputs is some collection of vectors in . We can’t draw this collection the way we can draw a line or plane in , but we can still describe it!
Example: A plane¶
Let’s start with the matrix
Suppose we multiply by . What are the components of the output?
Notice that any vector that could be an output of satisfies
Remember, a plane in is a set of vectors whose entries satisfy a linear equation involving , , and . Here, the plane is
Every output of lies on this plane: plugging in the entries of gives
And every vector on this plane is an output of . For example, is on the plane, since , and
The same idea works for any vector on the plane: use its first and third entries as the input, and the middle entry takes care of itself because . So the set of possible outputs of is exactly this plane.
Drag to rotate. The two columns, and , lie on the plane .
Span and column space¶
Recall the column perspective on matrix-vector multiplication. If we call the columns of and , then
Each input gives us a linear combination of the columns. Letting the input vary gives us all possible linear combinations. This set is called their span.
This isn’t your first time seeing the idea of a span:
The span of a single nonzero vector is a line through the origin.
The span of two nonzero vectors and is either a line through the origin if the vectors are linearly dependent (one is a scalar multiple of the other), or a plane through the origin if they are linearly independent (they don’t lie along the same line).
The new thing is that we’ve generalized the definition to an arbitrary number of vectors, with any number of entries. Intuitively, think of the span as the set of all new vectors you can produce using as building blocks.
When the vectors are the columns of a matrix, we give their span a special name.
Pay attention to the two numbers in the shape . Inputs have entries, while outputs have entries. So the column space is a subset of , regardless of how many columns there are.
For our matrix
we found that
a plane in .
This gives us a way to connect our new question back to the one from Chapter 4. Asking whether has a solution is asking whether is one of the outputs can produce. In our new terminology:
Adding a column¶
What happens to the column space if we add another column to ? It depends on whether that column can already be made using the original columns.
A redundant column¶
Now consider the matrix
Its first two columns are the same as ’s. Its third column is a linear combination of the first two:
Does this column give us any new outputs? Let’s write a general output:
This is still a combination of the first two columns. Conversely, we can produce any output of using by putting a zero in the third input entry. For example,
Thus . We call the third column redundant because removing it does not change the span.
But is not the only input that sends to . There are infinitely many! How can we find them? We solve
An LU factorization is
Forward substitution in gives . Then gives
Setting the free variable , the complete set of solutions is
The input corresponds to . For example, gives the different input , with the same output .
For , the only input producing this output is : the first and third output entries determine its two input entries. The extra column of gives us infinitely many ways to produce the same output, without changing which outputs are possible.
A column outside the span¶
Now consider the matrix
The third column is . It is not on , since . So it cannot be written as a linear combination of the first two columns. The three columns are linearly independent: none can be made using the other two. The span of all three columns is larger than the span of just the first two. We will formally define linear independence in Chapter 5.2.
All the old outputs are still available: . But now there are new outputs, too.
Do we get all of ? An LU factorization of answers this:
For any right-hand side, forward substitution determines one intermediate vector, and back substitution determines one input. There are no free variables or consistency conditions. Therefore,
Geometrically, the first two columns span a plane, and the third adds a direction outside that plane. Their linear combinations fill all of .
Adding a column can change which outputs are possible, how many inputs produce them, or both. In Chapter 5.2, we’ll connect these observations to linear independence and invertibility.
More examples¶
Example: A line or all of ¶
For , the second column is -3 times the first, so is a line:
This is what we mean by the line : the set of vectors whose entries satisfy that equation.
For , the columns are not scalar multiples, so
We can also see this using the inverse. The matrix is invertible, with
For any , the equation has the unique solution
Every vector in is therefore an output of .
, on the other hand, is not invertible. Trying the same inverse formula would require
which is undefined. Its columns only produce vectors on the line , so we cannot solve for every .