Transposes, Permutations, Vector Spaces
The lecture that finishes chapter two and opens the real subject. First the loose ends — permutation matrices give the general factorization PA = LU, transposes flip rows and columns, and R transpose R is always symmetric. Then the big picture begins with vector spaces and subspaces, and the great example of building a subspace out of a matrix, the column space.
Finishing elimination: PA = LU
This lecture completes the chapter: two loose ends from last time — permutations and transposes — and then, as Strang puts it, “the beginning of real linear algebra”: vector spaces.
First, permutations. A permutation matrix executes row exchanges. We may have a perfectly good invertible matrix , but during elimination a zero shows up in a pivot position — and then we must reach below and swap in a row with a proper pivot, maybe more than once. The clean factorization — ones on the diagonal of , multipliers below; zeros below the diagonal of — quietly assumed no exchanges were ever needed. How do we account for them?
A moment of reality: a human checks whether the pivot is zero, but Matlab checks whether it is big enough, because pivots close to zero are numerically bad. Matlab does row exchanges that algebra doesn’t require — accuracy requires them. We’re doing algebra, so we exchange only when we have to.
Permutation matrices: the inverse is the transpose
What is , exactly? A permutation matrix is the identity matrix with reordered rows — where “reordered” includes the do-nothing reordering, so the identity itself counts. For matrices there are
of them — that counts all the possible reorderings of rows. So there are permutations of size , and of size — listing those “would be not so much fun.” With four rows the possibilities get interesting: you might exchange all four in one big cycle, one to two, two to three, three to four, four to one.
Every permutation matrix is invertible — we can always bring the rows back to normal order — and the matrix that undoes is simply its transpose:
Multiply a permutation by its transpose and the ones hit the ones, producing the identity.
Transposes and symmetric matrices
Strang realizes he hasn’t actually transposed a matrix on the board yet, so he’d better do it. Take a rectangular matrix, , and flip it across its main diagonal:
Three rows and two columns become two rows and three columns — “short and wider.” Each column becomes a row, each row becomes a column. In symbols:
Now the best matrices, the ones that show up in a lot of applications: symmetric matrices, the ones that transposing doesn’t change — . For example,
Whatever sits above the diagonal — the , the , the — had better sit in the mirror position below; transpose it and you get the same matrix back. Where the transpose gave the inverse was highly important but not simple to see — this one is totally simple to see.
Where do symmetric matrices come from? Our rectangular matrix above is absolutely far from symmetric — its transpose isn’t even the same shape. But here’s a way to manufacture symmetry out of it. Call the rectangular matrix ; then multiply.
Vector spaces: what the word “space” demands
Now the lecturer takes a breath, because chapter three begins: vector spaces and subspaces. The main things we do with vectors are add them and multiply them by numbers (scalars): and . Those two operations, combined, give linear combinations — and they are what vectors are for.
The first examples: is all two-dimensional real column vectors, such as , , — the whole -plane. (“I never drew before.”) Then , all vectors with three real components — note that lives in , not : one component happens to be zero, but it has three components. And the big example, : all column vectors with real components. (Complex numbers come much later.)
Why is the zero vector “the most important” one? Try removing it — the -plane with a puncture at the origin. That would be awful: multiplying by the scalar zero must land in the space, and adding to its opposite lands there too. Every vector space contains the zero vector.
And here’s a set that is not a vector space: the quarter of the plane with both components nonnegative. Adding is safe — plus stays in the quarter — but there’s a heck of a problem with scalars: multiply by and you’re way outside. The set is not closed under multiplication by all real numbers — closed is the right word — so it’s not a vector space.
Subspaces
Can a vector space live inside — following all the rules, but not needing the whole plane? Yes: a subspace. Suppose a subspace of contains one nonzero vector. Then it must contain twice that vector, half of it, minus a half of it, zero times it — every multiple. One vector forces the whole line through the origin. Addition then checks out: something on the line plus something else on the line is still on the line.
Not just any line, though. A dashed line that misses the origin fails immediately: multiply any of its vectors by zero and you land at the origin, off the line. Every subspace must contain the zero vector.
So we can list all the subspaces of :
- All of — the whole space counts as a subspace of itself.
- Any line through the zero vector, infinitely far in both directions. (It looks a lot like , but it is not — its vectors have two components.)
- The zero vector alone — Strang calls this subspace . It’s “too dumb to tell you” why it works: add zero to itself, still there; multiply by seventeen, still there. The littlest subspace.
For the list is: all of at one extreme, a plane through the origin, a line through the origin, and the zero vector alone at the bottom.
The column space: a subspace built from a matrix
Now the reality — where do subspaces come from? They come out of matrices. Take
The two columns are vectors in , and we want them in our subspace. But two columns alone are not a subspace — what else must be there? Their multiples: has to be in. Their sum: has to be in. One of the first plus three of the second. All the linear combinations — multiply each column by a number and add, the two operations of linear algebra. Include all the results, and the job is done: it’s guaranteed to be a subspace.
Geometrically: draw the column somewhere in 3-space, draw somewhere else. All combinations fill out the whole line through each — and everything in between, because we may add something from one line to something from the other. We get a plane through the origin. More than a line, less than all of . That’s the picture you have to see.
This is the central idea of the lecture — got a few vectors, not satisfied with a few vectors, we want a space of vectors — and it’s linear algebra at a higher level. Next lecture opens with the question this sets up: what does mean in the language of column spaces, and what other subspaces hide in ?
Problems
Work these with the lecture’s tools: the transpose rules, the closure test, and the column-space construction.
Elimination on
hits a zero in the first pivot position. Write down a permutation matrix that fixes this by exchanging rows 1 and 2, compute , and verify that .
Show solution
The permutation that exchanges rows 1 and 2 is the identity with those rows swapped:
Now the first pivot is and elimination can proceed to .
For the check: is its own transpose here (swapping rows 1 and 2 of gives a symmetric matrix), and
The ones hit the ones, so .
Let
Write down , compute , and confirm it is symmetric. Then explain in one line, using the transpose rule for products, why is also symmetric (no computation needed).
Show solution
Transposing swaps rows and columns:
The entry in row 1, column 2 is , and the entry in row 2, column 1 is — the same numbers in the other order. The matrix equals its transpose: symmetric.
For : transposes reverse order, so
unchanged by transposing, hence symmetric.
Which of the following subsets of are subspaces? For each failure, produce a specific vector and operation that leaves the set.
(a) All vectors on the line . (b) All vectors on the line . (c) All vectors whose first component is nonnegative.
Show solution
(a) Subspace. The line passes through the origin: vectors have the form . Adding two of them, , stays on the line; any scalar multiple stays on the line. Closed under both operations.
(b) Not a subspace. The line misses the origin: multiply the vector (which is on the line, since ) by the scalar and you get , which is not on the line (). Every subspace must contain the zero vector, and this one doesn’t.
(c) Not a subspace. This is a half-plane, like the quarter-plane in lecture. It’s closed under addition, but not under all scalars: is in the set, yet has negative first component and leaves the set.
Describe the column space of each matrix as a subspace of — the zero vector alone, a line, a plane, or all of :
Show solution
For : the second column is exactly twice the first, , so both columns lie on the same line through the origin. Every combination is a multiple of the first column. is a line in — all multiples of .
For : the columns and do not lie on one line — neither is a multiple of the other. Taking all combinations fills out both lines and everything in between: is a plane through the origin in . It cannot be all of : two vectors can never combine to fill three-dimensional space, just as the lecture’s two columns gave a plane, not everything.