Orthogonal Vectors and Subspaces
A new chapter about orthogonality, and it opens by upgrading the big picture of the four subspaces. The test for perpendicular vectors is the dot product being zero, and the same idea extends to whole subspaces. The row space and null space turn out to be orthogonal complements, and the lecture closes by introducing the matrix A transpose A, the key to solving Ax = b when there is no solution.
A ninety-degree chapter
Lecture fourteen starts a new chapter — a chapter about orthogonality. What it means for vectors to be orthogonal, what it means for subspaces to be orthogonal, and eventually what it means for bases to be orthogonal. “This is a ninety-degree chapter,” Strang says.
The motivation is the big picture — the 18.06 picture of the four fundamental subspaces. We already know a lot about it: the row space and null space live in with dimensions and ; the column space and left null space live in with dimensions and . What the figure has been quietly claiming all along, and what this lecture proves, is that the angle between those paired subspaces is ninety degrees. The row space is orthogonal to the null space; the column space is orthogonal to the left null space. We knew what each subspace was and could compute bases for them. Now we know how they sit relative to each other.
When are two vectors orthogonal?
Orthogonal is just another word for perpendicular: in -dimensional space, the angle between the vectors is ninety degrees — they form a right triangle. So how do you test two vectors for orthogonality?
Why is that the right test? Go back to the Greeks. Pythagoras says: we have a right triangle exactly when the two leg lengths squared add up to the hypotenuse squared. With legs and , the hypotenuse is , so the right-angle condition is
Don’t think this is always true — for other triangles it isn’t. It’s equivalent to orthogonality. And the length squared of a vector is itself a transpose product: , a number that’s positive unless is the zero vector.
Now the same computation in letters. Expand the right side by matrix multiplication — just follow the rules:
The and cancel against the left side of Pythagoras. And for real vectors there’s no difference between and — both are — so what’s left is . Pythagoras boils down exactly to the dot-product test. “It’s just — I just want to say that’s really neat.”
One boundary case: what if is the zero vector? Follow the rules — zero dotted with anything is zero — so the zero vector is orthogonal to everybody.
When are two subspaces orthogonal?
Now extend the idea from vectors to subspaces.
To see what that definition really demands, take Strang’s classroom example in : the blackboard, extended to infinity, is a two-dimensional subspace; the floor is another one; put the origin at the crack where they meet — “thereby giving linear algebra its proper importance.” Are the blackboard and the floor orthogonal subspaces? The class votes; some yeses, some noes. No. A forty-five-degree vector in the blackboard and a vector in the floor are not at ninety degrees. Even worse, there’s a vector running along the crack that lies in both planes — and a nonzero vector is certainly not orthogonal to itself. In fact, if two subspaces meet in any nonzero vector, they cannot be orthogonal.
Run through the subspaces of the plane — the zero vector, lines through the origin, the whole plane. When is a line through the origin orthogonal to the whole plane? Never. To the zero subspace? Always. To a different line through the origin? Exactly when the two lines meet at ninety degrees — they intersect only at zero, and they’re orthogonal. That’s the clean picture to hold on to.
The row space is orthogonal to the null space
Here is the neat fact this machinery was built for.
Why? All we know about the null space is the equation — and the proof is just sitting there in that equation. Write it out by rows:
Each zero on the right says that a row of , dotted with , gives zero. So is orthogonal to row one, to row two, to every row. But strictly speaking that’s not the whole row space — the row space contains all the combinations of the rows too. No problem: if and , multiply by any , and add — still zero:
“I just added the zeroes and got zero.” So is perpendicular to every vector in the row space, and the two subspaces are orthogonal. The statement for the column space and left null space is the same statement applied to — and ” is just as good a matrix as ” — so no second proof needed. The big picture is now carved up correctly: splits into two perpendicular subspaces, and so does .
Orthogonal complements
There’s a little more that’s true, and it comes from the dimensions. Could two perpendicular lines in be a row space and a null space? No — the dimensions are no good. They must add to : , and .
Try the concrete case: let have rows and . The rank is one, so the row space is a line through — the second row changed nothing, and we could just as well keep the single equation . Its solutions form the null space: a plane, dimension . And now we see the geometry we missed back in September: it is exactly the plane perpendicular to . That “dumb normal vector called N” from calculus — there it is, the row of the matrix.
Coming attraction: solving Ax = b when there is no solution
Now the main problem of the chapter — the last chapter about . Strang wants to “solve” the system when there is no solution: when is not in the column space. Ridiculous? It’s done all the time — it has to be done. A satellite buzzes along and you make a thousand position measurements, but there are only six or so parameters to find: a thousand equations, six unknowns. Or you measure one pulse rate several times and every measurement carries noise. Typically is much bigger than , the rank can’t be , and most right-hand sides are unsolvable. The measurements have junk in them — but they also carry real information about , and the job is to separate the information from the noise.
One bad idea: throw away equations until a nice square invertible system remains. Not satisfactory — there’s no reason to call some measurements perfect and others useless. We want the maximum information from all of them. Elimination won’t rescue us either; it will just certify that there is no solution.
So Strang jumps ahead to the matrix that will play the key role: . If is by , then is by — square. And it’s symmetric: transposing gives . He even admits the central equation of the chapter right away. When has no solution, multiply both sides by and solve
where the hat on signals that this is not the (nonexistent) solution of the original system but the best solution — what “best” means is next lecture’s business. Everything hinges on whether is invertible.
That example is the general pattern. is not always invertible — it could even be the zero matrix. The fact that always holds, to be proved as soon as possible, is that , and so the rank of equals the rank of . From that comes the conclusion the whole chapter needs:
Next lecture — a crucial one — shows how enters everything.
Problems
Work these before revealing the solutions — every one uses only this lecture’s tools.
Verify that and are orthogonal, and confirm Pythagoras: check that .
Show solution
Orthogonality test: . ✓
Lengths: and .
Hypotenuse: , so .
Indeed — Pythagoras holds, exactly because the dot product is zero.
Let
Describe the row space and the null space geometrically, verify that they are orthogonal, and check that their dimensions add to .
Show solution
The second row is twice the first, so the rank is . The row space is the line through .
The null space is the set of solutions of the single equation — a plane through the origin with normal vector , dimension .
Orthogonality: any in the null space satisfies , so it is perpendicular to the row and hence to every multiple of it — every vector in the row space.
Dimensions: . The plane is the orthogonal complement of the line.
In , could a line through the origin be the row space of some matrix while a perpendicular line through the origin is its null space? In , could the row space and null space of a matrix both be two-dimensional planes? Explain.
Show solution
In : no. The dimensions of the row space and null space are and , which must add to . Two lines give . Orthogonality alone isn’t enough — the null space must be the orthogonal complement, containing all vectors perpendicular to the row space, and in everything perpendicular to a line is a whole plane.
In : yes. Now , so the dimensions are right. For example
has row space the -plane and null space the -plane — orthogonal complements in .
For
compute , decide whether it is invertible, and explain how you could have predicted invertibility from the columns of alone. Then replace the second column of by and repeat.
Show solution
is 2 by 2; its entries are dot products of the columns of :
The columns and are not multiples of each other, so is invertible. Predicted: the columns and of are independent, and is invertible exactly when the columns of are independent.
With second column , the columns of are dependent (rank one), and
has its second column twice its first — rank one, not invertible. The rank of matched the rank of both times.
Prove the fact Strang promised: exactly when . Hint for the harder direction: if , multiply on the left by and remember what means.
Show solution
Easy direction: if , then . So .
Harder direction: suppose . Multiply by :
But is the length squared of — a sum of squares, zero only when is the zero vector. So .
The two null spaces contain each other, so . Since and have the same null space and the same number of columns , they have the same rank — and in particular is invertible exactly when , i.e. when the columns of are independent.