Lecture 14 · Orthogonal vectors and orthogonal subspaces
Understand orthogonal vectors and orthogonal subspaces, and master the relationship between orthogonal complement and four subspaces.
On this page
Orthogonal vectors and subspaces | Gilbert Strang | MIT 18.06 Linear Algebra
Lecture 14 / Total 35 Lectures |Part 2 · Orthogonality and Determinant
Video of this lecture: Bilibili p14 · Orthogonal vectors and orthogonal subspaces ↗(49:48)| MIT OCW official page ↗
Illustration: MIT OCW 18.06SC official lecture summary (CC BY-NC-SA 4.0) and Bilibili classroom video frames (time stamped), about 10 frames per lecture.
Introduction to this lecture
Starting from this lecture, the course enters the chapter of orthogonality. The theme can be summarized in one sentence: ninety degrees. What kind of vectors are perpendicular to each other, what kind of subspaces are perpendicular to each other, and what kind of basis are perpendicular to each other are all questions to be answered in this chapter. We have already met the four fundamental subspaces before and know their dimension (dimension): row space and nullspace coexist , the dimensions are respectively and ;Column space and left nullspace are the same , the dimensions are respectively and . But at that time we only knew what each subspace was and how to find the basis, but we did not know their relative postures to each other. This lecture adds this layer of geometry: these two pairs of subspaces happen to be perpendicular to each other. The previous lectures focused on what vectors are contained in each subspace, but this lecture focuses on which direction they face. The original “four-piece puzzle” therefore became two “right-angle puzzles”. with Each is divided into two subspaces at right angles to each other.
The second half of this lecture turns to the main question of this chapter: What to do when there is no solution. This is the norm in applications - when measuring the position of a satellite, you will get a thousand equations by measuring it a thousand times, but there may be only six parameters describing the position; when measuring the pulse, there is only one unknown number, but it will be measured repeatedly. There are more equations than unknowns, and the right-hand side is noisy, so an exact solution is destined to not exist. Applying all the equations and finding the “best solution” is a reasonable goal; and the key to it is the matrix .
The route of this lecture is: first give the criterion of vector orthogonality, and use the Pythagorean theorem to explain its origin; then generalize this criterion from vectors to subspaces, proving that the row space and the null space, the column space and the left null space are each at right angles; then use dimensions to illustrate that this orthogonality is “complementary”, thus piecing the four basic subspaces into two complete pictures; finally, the optimal solution and matrix of the unsolvable equation are derived reversibility.

MIT OCW Official Lecture Notes Summary Page 1/2 (18.06SC Lecture 14 Summary, CC BY-NC-SA 4.0).
1. Orthogonal vectors and dot product test
orthogonal (orthogonal) is a synonym for “vertical”. in Saying that two vectors are orthogonal in a dimensional space is equivalent to saying that the angle between them is , which is equivalent to saying that they are equal to and vector form a right triangle, where It’s the hypotenuse. Given two vectors, how do you tell whether they are orthogonal? The answer is to calculate their dot product:
This number is written as matrix multiplication by “one row by one column”, and the result is a matrix, which is a scalar. Two vectors are orthogonal if and only if
This is the most basic criterion in this lecture. It translates the geometric “right angle” into an algebraic condition that can be calculated, and all subsequent conclusions grow from it. judge The angle between two vectors in a dimensional space is originally a geometric problem, and the most important thing to look at is the simplest quantity - the dot product; this is really beautiful. This dot product is also called inner product (inner product); on a real vector, it is the multiplication of the corresponding components and then summation.
Verify it in three-dimensional space. take . Following the Pythagorean theorem, the square of the length of a vector is the sum of the squares of its components, and this sum of squares is exactly its dot product with itself:
Take again , then , the two vectors are indeed orthogonal. The relevant numbers are completely consistent:
And : The sum of the squares of the lengths of the two right-angled sides is equal to the square of the length of the hypotenuse. Note is always positive, the only exception is the zero vector, whose length squared is zero.

Video 00:04:59 | Approximately corresponding to Section 1 “1. Orthogonal Vectors and Dot Product Test”.
2. The dot product criterion and the Pythagorean theorem are the same thing
The equation in the previous section is not a coincidence, the Pythagorean theorem explains exactly where the criterion comes from. The Pythagorean theorem says that if are the two right-angled sides of a right triangle, then
Write the length squared as a dot product and expand the right side according to the distributive law:
This step only uses the distributive law of matrix multiplication without introducing any assumptions. For real vectors, with is the same number, both are equal to , so the middle two items are combined into . Substituting the Pythagorean equation, both ends with Cancel, leaving only
So the two criteria are connected: the dot product being zero and the Pythagorean relationship being established are the same thing.
It must be emphasized that the Pythagorean equation does not hold for any three vectors. When the angle is not a right angle, the Pythagorean relationship generally does not hold; it only holds when the angle is a right angle, that is, the dot product is zero. In turn, as long as the dot product is zero, the Pythagorean equation automatically holds. This is the complete correspondence between the geometric meaning of “orthogonality” and the algebraic criterion.
There is also an edge case that needs to be handled by definition. If is a zero vector, then for any All , so the zero vector is orthogonal to all vectors. There is no need to feel awkward about this in mathematics: the rules are enforced.
3. Orthogonal subspace
Once the orthogonality of vectors is defined, the orthogonality of subspaces can be defined. orthogonal subspace The definition of (orthogonal subspaces) is: subspace and subspace Orthogonal means Every vector in Every vector in is orthogonal. The “each” in the definition cannot be weakened: only finding a pair of vectors that are perpendicular to each other, or two subspaces each having a part of vectors that are perpendicular to each other, is not considered orthogonal.
Test this definition using three dimensions. Consider the infinitely extending blackboard as a two-dimensional subspace, and the floor as another two-dimensional subspace. Both pass through the same origin (equivalent to a plane with a plane). Are they orthogonal? no. You can pick one on the blackboard that matches the seam vector, which is obviously not perpendicular to the vector on the floor. The more fundamental reason is that these two planes intersect on a straight line, which is the joint between the floor and the blackboard; any non-zero vector on the intersection belongs to two subspaces at the same time, and a non-zero vector cannot be orthogonal to itself. From this we get a necessary condition: two orthogonal subspaces can only intersect at the zero vector. But “the intersection only has zero vectors” is not enough to guarantee orthogonality.
By listing all the subspaces in a two-dimensional plane, the components of this definition will become clear. There are only three types of subspaces in the plane: zero vector, straight line passing through the origin, and the entire plane. A straight line through the origin is never orthogonal to the entire plane, because the entire plane contains vectors that make any angle to the straight line, and even the straight line itself. The line is always orthogonal to the zero subspace because the zero vector is orthogonal to all vectors. Two different straight lines passing through the origin are orthogonal if and only if they are . So “orthogonality” is much stricter than “non-coincidence”: the two subspaces must not only be separated from each other, but also be perpendicular to each other in every direction.

Video 00:12:21 | Approximately corresponding to Section 3 “3. Orthogonal Subspace”.

Video 00:14:56 | Approximately corresponding to Section 3 “3. Orthogonal Subspace”.
4. Row space and null space are orthogonal
With the definition of subspace orthogonality, the attitude between the four basic subspaces can be explained clearly. The core facts are: Row space is orthogonal to null space.
The proof only requires obtaining the definition of the null space . put Written line by line, the equation becomes
The equation holds, which means that the vector in the null space with Each row of is orthogonal: , , until .
But the line space is not just this rows, it also contains all linear combinations of these rows. If If it is orthogonal to every row, then it is also orthogonal to any combination:
So Each vector in is related to Every vector in is orthogonal, i.e. . In other words, the equation This expression contains two levels of information at the same time: it picks out the vectors that map to zero, also indicating that the directions of these vectors are the same as The rows are vertical. The same reasoning is used Above: is also a matrix that also satisfies “the row space and the null space are orthogonal”, and The row space is column space, The null space is The left null space of , then
The four basic subspaces are paired in pairs: Divided into two parts by row space and null space, the dimension with Added to ; Divided into two parts by column space and left null space, the dimension with Added to . In fact, these geometric relationships have always been Inside, I just didn’t discuss verticality before, so I didn’t see it; now I picked it up. This is the second part of the fundamental theorem of linear algebra: the first part talks about the dimensions of the four subspaces, the second part talks about their orthogonality, and the third part talks about their orthogonal basis.

Video 00:18:55 | Approximately corresponding to Section 4 “4. Row space and null space are orthogonal”.
5. Orthogonal complement: orthogonal and exactly complementary
“Orthogonal” is not precise enough. orthogonal complement The (orthogonal complement) requirement is stronger: the orthogonal complement of a subspace contains not only some vectors that are orthogonal to it, but also all vectors that are orthogonal to it.
The dimensions must match, which is the key to understanding orthogonal complement. consider matrix in
The second row is twice the first row, so rank : line space is along A straight line in the direction. The null space is given by the equation
decision. An equation, three unknowns, the solution set is a two-dimensional plane passing through the origin, and its normal vector is exactly , that is, the “normal vector” in calculus ”. The row space is a straight line and the null space is a plane. They are orthogonal to each other. The dimensions Just covers the whole . It is impossible to have a situation where “the row space is a straight line and the null space is also a straight line” because , , the zero space dimension must be .
second line It has no substantial impact on the row space and null space, and the conclusion remains unchanged if it is deleted. So Not just “some vector orthogonal to the row space”, but All Vectors orthogonal to the row space: all The vertical vectors form that plane, and It is this plane, no more and no less. On the contrary, the total number of vectors orthogonal to a straight line is not another straight line, but an entire plane - the orthogonal complement is this entire plane. Just write it with symbols
Orthogonality, coupled with the fact that the sum of the dimensions equals the entire space, are two things that add up to a complete decomposition. A single vector cannot be said to be orthogonal complement, complement is the relationship between subspaces.
6. Main question: Find the “best solution” when the equation has no solution
The second half of this lecture turns to the main question of this chapter, which is also the last discussion in the entire course. : When an equation has no solution, find its “best solution”. No solution means Not in column space. If It is a rectangular matrix with more rows than columns. This situation is normal.
There are many practical examples. When a satellite flies in the sky and its position is measured a thousand times, a thousand equations are obtained, and the parameters that determine the position may only be six. Taking your pulse is even simpler: there is only an unknown number of beats per minute, but you measure it repeatedly. The situation is the same for resistance measurement and pulse measurement. There are too many equations, and the measurements are noisy, so Exact solution is doomed to failure - even the right end Neither can be trusted in itself. But the data contains a lot of information about of information, the problem is to separate the information from the noise. This can also be seen from the shape of the matrix: if is and , its rank cannot reach , the column space is just A small part of it, and most of the right-hand vectors are not in it at all.
A tempting but bad approach is to throw away some equations until you are left with a square matrix that is invertible and then solve the square matrix. This is equivalent to arbitrarily announcing that “these measurements are accurate and those are invalid” without any basis; there is no reason to say that some equations are full of information and others are full of noise. We need to use all measurements to get as much information as possible, which is to find the “best solution”.
Elimination can tell us whether the equation has a solution; for this type of problem, elimination usually ends with ” Equal to some non-zero number”, the signal that there is no solution is clear at a glance. The way out is to left-multiply both sides of the equation at the same time :
This is the central equation of this chapter. is the best solution; the precise definition of “best” will be left to later, but the equation itself has specified that the real object to be studied is . From the shape point of view, this equation is also completely reasonable: is , is dimension, so is dimensional vector, and unknowns The number is consistent; is The square matrix of , the central equation is exactly an equation, an unknown number. So the original rectangular system of equations was replaced by a square matrix system. This is the first reason why it is worthy of study.

Video 00:32:22 | Approximately corresponding to section 6 “6. Main problem: finding the “best solution” when the equation has no solution”.

Video 00:33:57 | Approximately corresponding to section 6 “6. Main problem: finding the “best solution” when the equation has no solution”.

Video 00:39:50 | Approximately corresponding to Section 6 “6. Main problem: finding the “best solution” when the equation has no solution”.
7. and reversibility
Set is The rectangular matrix of is , so is phalanx. And it is a symmetric matrix:
Only one rule is used above: the transpose of the product of two matrices is equal to the reverse multiplication of each transpose. To be able to solve the central equation, you need to know When is it reversible.
Let’s look at a specific example first. take
it is Matrix, the two columns are with , linearly independent, rank is . to such , are three equations, two unknowns, and usually have no solution: must fall in the plane spanned by these two columns, and Most of the vectors in are not in this plane. but is a beautiful one matrix:
Check item by item: The upper left corner is dot product with yourself ;The off-diagonal element is the dot product of two columns , the symmetry ensures that the upper right and lower left are the same; the lower right corner is dot product with yourself . Its determinant is
So this Reversible.
But it’s not always reversible. If you put Change the two columns of into vectors on the same straight line, The rank will also fall accordingly. For example, let the second column be the first column Times:
The product has only rank , the determinant is zero and irreversible. This is not surprising: The rank is already only , and the rank is When multiplying matrices, the rank of the result will not exceed . More generally, Each column of is combination of columns, so its column space is contained in In the column space of , the ranks will only be smaller or equal, never larger. Generally, there are always
Why are the two null spaces the same? One direction is direct: if , multiply left by both sides Just get . The other direction uses the square of the length of section 1: if , multiply both sides by left , get
A vector whose length squared is zero can only be a zero vector, so . The inclusion relationships in the two directions are combined, and the two null spaces are equal; then the sum of the rank and the null space dimension is the number of columns , the ranks of the two are also equal.
From this we get the most important criterion of this lecture: Reversible if and only if Contains only zero vectors if and only if The columns of are linearly independent of. Not required here It is a square matrix, and it is only required that it be of full rank. This also explains why the second example fails: two columns are related meaning Contains non-zero vectors, They cannot be distinguished from zero. As you will see in the next lecture, It will appear at the core of the problem later.

Video 00:44:49|Approximately corresponding to Section 7 “7. “near reversibility”.

MIT OCW Official Lecture Notes Summary Page 2/2 (18.06SC Lecture 14 Summary, CC BY-NC-SA 4.0).
Summary of this lecture
- orthogonal (orthogonal) i.e. vertical: two vectors are orthogonal if and only if ;The square of the length is ;The zero vector is orthogonal to all vectors.
- The Pythagorean theorem and the dot product criterion are the same thing: put expand, eliminate with , the remaining .
- orthogonal subspace Definition of (orthogonal subspaces): Each vector in Each vector in is orthogonal. The blackboard and the floor both pass through the origin but intersect on a straight line, so they are not orthogonal; the two orthogonal subspaces can only intersect at the zero vector.
- In a two-dimensional plane: a straight line is never orthogonal to the entire plane, a straight line is always orthogonal to the zero subspace, and two different straight lines are orthogonal if and only if .
- Row space is orthogonal to null space: Description with Each row of is orthogonal, and each row is orthogonal means that it is orthogonal to all linear combinations of the row space; for In the same way, the column space is orthogonal to the left null space.
- orthogonal complement(orthogonal complement): contains All A vector orthogonal to the row space, so , the same reason ;The dimensions respectively satisfy with .
- Example in: The rank is , the row space is over the straight line; the null space is given by Given, it is is the plane of the normal vector.
- The best solution when there is no solution satisfies , which is the central equation of this chapter; is Symmetric matrix.
- Example: given , determinant ;When two columns are proportional (such as ), the rank is , irreversible.
- Generally , ; reversible if and only if The columns are linearly independent.
keywords
| English | Chinese | One sentence explanation |
|---|---|---|
| orthogonal | orthogonal | The angle between two vectors is , which is equivalent to the dot product being zero |
| dot product | dot product | The corresponding components are multiplied together and then summed, which is written as |
| orthogonal subspaces | orthogonal subspace | Every vector in one subspace is orthogonal to every vector in the other subspace |
| orthogonal complement | orthogonal complement | Orthogonal to a given subspace All A subspace composed of vectors, such as |
| row space | row space | The subspace formed by each row of is recorded as |
| nullspace | null space | satisfy of all , recorded as |
| column space | column space | The subspace formed by each column of is denoted as |
| left nullspace | left null space | satisfy of all , recorded as |
| four fundamental subspaces | four fundamental subspaces | Row space, null space, column space, left null space, orthogonal pairing |
| symmetric matrix | symmetric matrix | satisfy The matrix of always symmetrical |
| linearly independent | linearly independent | The zero combination of each column has only a trivial solution, which is equivalent to Contains only zero vectors |
| best solution | best solution | Satisfied when there is no solution of |
Machine-assisted translation · Read Chinese original
