第 06 章
列空间与零空间:矩阵产生的两个子空间
列空间回答「哪些 b 有解」,零空间回答「哪些 x 被送到零」。前者由列向量张成,后者由齐次方程的解组成;两者都是子空间,而 Ax=b 的解集不是。
Column Space and Nullspace: The Two Subspaces a Matrix Creates
The column space answers which b are solvable; the nullspace answers which x are sent to zero. Both are subspaces; the solution set of Ax=b is not.
篇内目录
- Starting from the two subspace tests
- Union fails, intersection works
- Timeline
- The column space: spanned by the columns
- The connection to
- The nullspace: the sent to zero
- Computing it for this example
- Why the nullspace must be a subspace
- The key contrast: solutions of are not a subspace
- Two ways to describe a subspace
- Takeaways
- Check your understanding
- How it connects
从子空间的两个判据说起
一个集合要成为子空间,只需满足两条:
- 对加法封闭: 在集合里,则 也在;
- 对数乘封闭: 在集合里,则 也在。
合起来就是:对线性组合封闭。另外,这两条自动保证零向量在集合里(取 )。
在 中,子空间只有四类:整个空间、过原点的平面、过原点的直线、只含零向量。
并集不是子空间,交集是
取一个过原点的平面 和一条不在平面内的过原点直线 。
- 不是子空间:从平面上取一个向量,从直线上取一个向量,相加后通常既不在平面上也不在直线上。
- 是子空间:在这个例子里交集只有零向量,而 本身是子空间。
一般地,两个子空间的交集一定是子空间。设 是子空间,:
- (因为 是子空间),(因为 是子空间),所以 ;
- 且 ,所以 。
交集是「同时满足两组要求」的集合,要求越多,集合越小,但仍然保持封闭。
时间轴
| 时间 | 内容 |
|---|---|
| 2:04 | 三维中的平面与直线 |
| 4:50 | 并集:把平面与直线放在一起 |
| 6:14 | 并集是否仍是子空间 |
| 7:21 | 交集是子空间 |
| 9:45 | 交集的封闭性验证 |
| 12:46 | 中的子空间 |
| 16:19 | 是否总有解 |
| 26:22 | 哪些列可以扔掉而列空间不变 |
| 29:12 | 零空间的定义 |
| 31:10 | 求 的零空间 |
| 32:55 | 零空间是向量空间 |
| 37:53 | 两个解相加仍在零空间 |
| 43:53 | 子空间必须过原点 |
列空间:由列向量张成
取
这是 矩阵,三列都是 中的向量:
列空间 是这三列的所有线性组合:
它是 的子空间。为什么不是整个 ?因为三个向量最多张成三维;事实上这里连三维都不到,注意
所以第三列没有带来新方向。列空间实际上是 中的一个二维子空间(一个过原点的平面)。
一句话总结: 列空间就是「所有可能的 」构成的集合;它的维度由真正独立的列的个数决定。
与 的关系
这是本讲最重要的连接:
理由很直接: 按定义就是列的组合,系数是 的分量。所以:
- 若 是列的组合,那组系数就是一个解;
- 若 不是列的组合,就不存在解。
对这个 矩阵,四个方程只有三个未知数,所以大多数 无解。但有解的 恰好构成列空间这个平面。
具体例子:
- ,解是 ;
- ,解是 ;
- 任意 ,解是 。
零空间:被送到零的
同一个矩阵,换一个完全不同的子空间。零空间 是所有满足
的 组成的集合。
注意它装的是 ,不是 。对这个 矩阵, 有三个分量,所以 是 的子空间。
求出这个例子的零空间
观察第三列等于前两列之和:
所以
是一个解。任何倍数也是解:
几何上,这是 中过原点的一条直线。
为什么零空间一定是子空间
设 ,。则
所以 也在零空间。对数乘同理:
这里用到矩阵乘法的分配律与数乘可交换。零空间因此对线性组合封闭,是子空间。
关键对比: 的解集不是子空间
把右端换成 。它有一个解 ,还有另一个解 :
但这个解集不是子空间,因为零向量不是解:。
它的结构是「一个特解 + 零空间」:
几何上,这是 中一条不过原点的直线。所有解构成零空间的一条平移,称为仿射集,而不是子空间。
补充: 这也解释了为什么齐次方程 特别重要:只有它的解集包含原点,因而才可能是子空间;非齐次方程的解集是它的一次平移。
描述子空间的两种方式
这一讲给出了构造子空间的两种基本语言:
| 方式 | 例子 | 特征 |
|---|---|---|
| 给出一组向量,取所有线性组合 | 列空间 | 「由内向外」张成 |
| 给出一组方程,取所有解 | 零空间 | 「由外向内」约束 |
- 列空间:告诉我几列,我取组合,得到一个子空间。
- 零空间:告诉我方程,我取解,得到一个子空间。
两种方式都会在后续课程中反复出现:列空间对应「像」,零空间对应「核」。
本讲结论
- 子空间对线性组合封闭,必含零向量。
- 两个子空间的交集仍是子空间;并集一般不是。
- 列空间 是列的所有组合,位于 ( 为行数)。
- 有解当且仅当 。
- 零空间 是 的所有解,位于 ( 为列数)。
- 零空间是子空间;非齐次方程的解集不是,它是零空间的一次平移。
- 列数多于独立列数时,列空间维度下降;本例中第三列是前两列之和,列空间是二维的。
理解检验
1. 证明两个子空间的交集是子空间,并给出并集不是子空间的反例。
参考答案:设 是子空间,。由 是子空间,;由 是子空间,,所以 。数乘同理: 且 。封闭性成立,交集是子空间(空集情形另论,通常指非空交集)。 并集的反例:在 中取平面 与直线 。,,但
它的第三个分量不为 ,所以不在 ;第一个分量不为 ,所以不在 。加法把向量带出了并集,因此 不是子空间。
2. 为什么本例的列空间不是整个 ?用「三个向量最多张成几维」回答。
参考答案: 是 ,只有三个列向量,三个向量最多张成三维,永远到不了四维的 。本例更弱:第三列等于前两列之和,,所以真正独立的方向只有两个,列空间是一个二维子空间( 中过原点的平面)。因此绝大多数 落在平面外,对应的方程无解。
3. 写出本例的零空间,并验证 。
参考答案:验证列的组合:
所以 满足 ,任何倍数也满足。零空间是
即 中过原点的一条直线。
4. 为什么 ()的解集不是子空间?
参考答案:子空间必须含零向量,而 ,所以零向量不是解,解集不含原点,直接出局。也可以从封闭性看:若 都是解,则
(因为 ),两个解相加不再是解。所以解集对加法也不封闭。它的真实结构是「特解 + 零空间」,即零空间的一次平移。
5. 已知一个特解与零空间,如何写出全部解?
参考答案:设 是一个特解, 是零空间,则全部解为
两个方向都要验证:一方面,,所以每个这样的向量都是解;另一方面,若 也是解,则 ,即 ,所以它一定写成这种形式,没有遗漏。在本例中就是
与前后课的关系
这一讲定义了矩阵的两个核心子空间。下一讲用消元系统地求出零空间:主元列与自由列的分工,会给出零空间的一组「特殊解」,并由此得到维数公式。
Starting from the two subspace tests
A set is a subspace when it satisfies two conditions:
- closed under addition: if are in the set, so is ;
- closed under scalar multiplication: if is in the set, so is .
Together: closed under linear combinations. These two conditions also force the zero vector into the set (take ).
In the subspaces are exactly: the whole space, a plane through the origin, a line through the origin, and the zero vector alone.
Union fails, intersection works
Take a plane through the origin and a line through the origin that is not inside .
- is not a subspace: take a vector from the plane and one from the line; their sum is usually in neither.
- is a subspace: here the intersection is only the zero vector, and is a subspace.
In general, the intersection of two subspaces is a subspace. Let be subspaces and :
- because is a subspace, and because is a subspace, so ;
- and , so .
An intersection imposes both sets of requirements, so it is smaller, but it stays closed.
Timeline
| Time | Topic |
|---|---|
| 2:04 | Planes and lines in three dimensions |
| 4:50 | The union of a plane and a line |
| 6:14 | Is the union still a subspace? |
| 7:21 | The intersection is a subspace |
| 9:45 | Checking closure of the intersection |
| 12:46 | Subspaces inside |
| 16:19 | Does have a solution for every ? |
| 26:22 | Which columns can be thrown away? |
| 29:12 | The definition of the null space |
| 31:10 | Computing the null space |
| 32:55 | The null space is a vector space |
| 37:53 | The sum of two solutions stays in the null space |
| 43:53 | Subspaces must pass through the origin |
The column space: spanned by the columns
Take
This is ; its three columns live in :
The column space is all linear combinations:
It is a subspace of . Why not all of ? Three vectors span at most three dimensions. In fact here they span fewer, because
so the third column adds no new direction. The column space is a two-dimensional subspace of — a plane through the origin.
One-sentence summary: The column space is the set of all possible ; its dimension is the number of genuinely independent columns.
The connection to
This is the lecture's central link:
The reason is immediate: is by definition a combination of the columns, with the entries of as coefficients. So:
- if is a combination of the columns, those coefficients give a solution;
- if not, no solution exists.
For this matrix there are four equations and only three unknowns, so most are unsolvable. The solvable ones form exactly the plane that is the column space.
Examples:
- has solution ;
- has solution ;
- any has solution .
The nullspace: the sent to zero
For the same matrix, a completely different subspace. The nullspace is the set of all satisfying
It contains , not . Since has three components, is a subspace of .
Computing it for this example
Observe that the third column is the sum of the first two:
Therefore
is a solution, and so is every multiple:
Geometrically, this is a line through the origin in .
Why the nullspace must be a subspace
Let and . Then
so is also in the nullspace. For scalars,
The nullspace is closed under linear combinations, hence a subspace.
The key contrast: solutions of are not a subspace
Change the right-hand side to . One solution is ; another is :
But the solution set is not a subspace, because the zero vector is not a solution: .
Its structure is "one particular solution plus the nullspace":
Geometrically, this is a line in that does not pass through the origin. The solution set is a translate of the nullspace — an affine set, not a subspace.
Background: This is why the homogeneous equation matters so much. Only its solution set contains the origin, so only it can be a subspace; the nonhomogeneous solution set is a translate of it.
Two ways to describe a subspace
The lecture names the two basic constructions:
| Way | Example | Character |
|---|---|---|
| Give vectors, take all combinations | Column space | spanning from inside |
| Give equations, take all solutions | Nullspace | constraining from outside |
- Column space: here are some columns; take their combinations.
- Nullspace: here are the equations; take the solutions.
Both recur throughout the course: the column space is the image, and the nullspace is the kernel.
Takeaways
- A subspace is closed under linear combinations and therefore contains zero.
- The intersection of two subspaces is a subspace; the union generally is not.
- The column space is all combinations of the columns, living in .
- is solvable exactly when .
- The nullspace is all solutions of , living in .
- The nullspace is a subspace; the solution set of a nonhomogeneous system is a translate of it.
- More columns than independent columns lowers the dimension of the column space; here the third column is the sum of the first two, so the column space is two-dimensional.
Check your understanding
1. Prove that the intersection of two subspaces is a subspace, and give an example showing the union need not be.
Reference answer: Let be subspaces and . Since is a subspace, ; since is a subspace, ; hence . The same holds for scaling: and . So the intersection is closed and is a subspace. For the union, take in the plane and the line . Then and , but
which is in neither (third coordinate nonzero) nor (first coordinate nonzero). The sum escapes the union, so is not a subspace.
2. Why is this column space not all of ? Answer in terms of how many dimensions three vectors can span.
Reference answer: is , so it has only three columns, and three vectors span at most three dimensions — never all of four-dimensional . Here it is even smaller: , so only two independent directions remain and the column space is a two-dimensional plane through the origin. Most lie off that plane, and those systems have no solution.
3. Write the nullspace of this matrix and verify .
Reference answer: Compute the combination:
So solves , and so does every multiple. The nullspace is
a line through the origin in .
4. Why is the solution set of with not a subspace?
Reference answer: A subspace must contain the zero vector, but , so zero is not a solution and the set misses the origin. Closure also fails: if are solutions,
for , so the sum is not a solution. The set is a translate of the nullspace, not a subspace.
5. Given one particular solution and the nullspace, how do you write all solutions?
Reference answer: With a particular solution and the nullspace,
Both directions hold: , so each such vector is a solution; and if is any solution, , so . Nothing is missing. In this example,
How it connects
This lecture defines the two central subspaces of a matrix. The next uses elimination to compute the nullspace systematically: pivot columns and free columns produce the "special solutions", and from them comes the dimension formula.