线性代数的本质 · 精研复习站

第 06 集:逆矩阵、列空间、秩与零空间

Inverse matrices, column space and null space
一句话直觉:求解线性方程组 $A\vec{x}=\vec{v}$ 本质是在问“哪一个输入向量 $\vec{x}$ 经过空间变换 $A$ 后恰好落在了目标 $\vec{v}$ 上”;逆矩阵是变换未降维时的“时间倒带”,列空间划定解何时存在的疆域,而零空间刻画了被压扁进原点的全体向量。

本章将抽象的代数方程组彻底转化为线性变换的几何求解图景。我们以 $\det(A)$ 是否为零分界,分别探讨可逆情形下的逆矩阵 $A^{-1}$ 与唯一解,以及奇异(降维)情形下通过列空间(column space)、秩(rank)与零空间(null space / kernel)来判定解是否存在以及解集的维数结构。

▶ YouTube 原片 📺 B站官方双语 P8 🎙 B站中文配音 P8

前置依赖

← 第 04 集 · 矩阵乘法与线性变换复合:理解变换复合与矩阵乘法,$A^{-1}A = I$ 本质是相继执行正变换与逆变换等于恒等变换。
← 第 05 集 · 行列式:以 $\det(A)\neq 0$ 与 $\det(A)=0$ 区分空间是否被压缩到更低维度。

后续延伸

→ 第 06·附注 集 · 非方阵:不同维度间的线性变换:将方阵方程 $n\times n$ 中的“列空间”与“满秩”概念推广到不等维度间的 $m\times n$ 非方阵变换。
→ 第 08·拓展 集 · 克莱姆法则的几何解释:从行列式几何角度直接写出 $\det(A)\neq 0$ 时方程组 $A\vec{x}=\vec{v}$ 的显式通解公式。
→ 第 10 集 · 特征向量与特征值:特征向量方程 $(A-\lambda I)\vec{v}=\vec{0}$ 正是寻找使得非平凡零空间($\det=0$)出现的特征值 $\lambda$。
线性方程组的矩阵向量形式
$$A\vec{x} = \vec{v}$$
逆矩阵的定义与求解公式
$$A^{-1}A = I, \quad \vec{x} = A^{-1}\vec{v} \quad (\det(A)\neq 0)$$
列空间与秩
$$\operatorname{Col}(A) = \operatorname{Span}(\text{columns of } A), \quad \operatorname{rank}(A) = \dim(\operatorname{Col}(A))$$
零空间(核)
$$\operatorname{Null}(A) = \ker(A) = \{\vec{x} \mid A\vec{x} = \vec{0}\}$$

线性方程组与矩阵方程 Ax = v 的几何翻译

⏱ 00:10 – 03:48

开篇先明确边界:本章关注逆矩阵、列空间、秩与零空间的几何直觉,而不展开高斯消元法(Gaussian elimination)与行阶梯型(row echelon form)的手工计算步骤(实际工程中通常交由计算机软件完成)。

线性代数在几乎所有理工学科中不可或缺的核心原因,是它能高效求解线性方程组。所谓“线性”,是指方程中每个未知量只能乘上常数系数再相互相加,不允许出现幂次、三角函数或两个未知量相乘(如 $x^2, \sin y, xy$)。标准整理方式是将未知量全部对齐排在等号左侧(缺项补 $0$ 系数),常数留在右侧。

📐 视频中的三元线性方程组打包实例
$$\begin{cases} 2x + 5y + 3z = -3 \\ 4x + 0y + 8z = 0 \\ 1x + 3y + 0z = 2 \end{cases} \quad \Longrightarrow \quad \begin{bmatrix} 2 & 5 & 3 \\ 4 & 0 & 8 \\ 1 & 3 & 0 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} -3 \\ 0 \\ 2 \end{bmatrix}$$
左端为系数矩阵 A 与未知量向量 x 的乘积,右端为常数目标向量 v,统一写作 Ax = v。
💡 方程组即“寻靶”问题
把系数矩阵看作线性变换 $A$,求解 $A\vec{x}=\vec{v}$ 的几何意义便无比清澈:我们在寻找一个输入向量 $\vec{x}$,使得它在空间经历变换 $A$ 的拉伸、旋转或挤压之后,恰好落在目标向量 $\vec{v}$ 的位置上。

从 $2\times 2$ 情形(两个方程、两个未知量)切入,借助上一章的行列式工具,解的存在性与唯一性立即一分为二:究竟是 $\det(A)\neq 0$(空间保持完整二维),还是 $\det(A)=0$(空间被压进一维直线或零维点)?

本章主题导览:在线性变换视角下统一四大核心概念 00:26
本章主题导览:在线性变换视角下统一四大核心概念画面重点:Inverse matrices, Column space, Rank, Null space 概念清单
学习定位:高斯消元等数值算法交由其他资源与软件 00:38
学习定位:高斯消元等数值算法交由其他资源与软件画面重点:本集聚焦几何直觉,非算法演算训练
对齐未知量并补齐零系数 01:58
对齐未知量并补齐零系数画面重点:方程 4x+0y+8z=0 与 1x+3y+0z=2 垂直对齐展示
将方程组紧凑改写为矩阵向量方程 Ax = v 02:26
将方程组紧凑改写为矩阵向量方程 Ax = v画面重点:系数矩阵 A、紫色未知向量 (x,y,z) 与右侧常数向量 (-3,0,2)
几何本质:寻找在变换 A 下恰好落到 v 的向量 x 02:53
几何本质:寻找在变换 A 下恰好落到 v 的向量 x画面重点:等式 Ax = v 与坐标平面上黄色目标向量 v
以 det(A) = 0 与否划分方程组解的两大分支 03:44
以 det(A) = 0 与否划分方程组解的两大分支画面重点:空间被压成一条斜线,标注 det(A) = 0
[00:10] ↗
估计你现在也了解到了 这个系列的大部分旨在透过直观的线性变换来理解矩阵与向量运算
As you can probably tell by now, the bulk of this series is on understanding matrix and vector operations through that more visual lens of linear transformations.
[00:20] ↗
这个视频也不例外 我们要透过线性变换来了解逆矩阵、列空间、秩和零空间的概念
This video is no exception, describing the concepts of inverse matrices, column space, rank, and null space through that lens.
[00:28] ↗
预先提醒一下,我并不打算讨论计算的方法 即便你们有人会说这部分很重要
A forewarning though, I'm not going to talk about the methods for actually computing these things, and some would argue that that's pretty important.
[00:35] ↗
这个系列外还有很多优质资源帮助你学习这些方法 例如关键字“高斯消元法”和“行阶梯型”
There are a lot of very good resources for learning those methods outside this series, keywords Gaussian elimination and row echelon form.
[00:43] ↗
我认为我最需要在这里添加的是直觉这一部分
I think most of the value that I actually have to add here is on the intuition half.
[00:47] ↗
再说,实践中我们有软件来计算这些东西
Plus, in practice, we usually get software to compute this stuff for us anyway.
[00:52] ↗
首先说一说线性代数的有用之处
First, a few words on the usefulness of linear algebra.
[00:54] ↗
目前你已经体会到它能用来描述对空间的操纵 这对计算机图形学和机器人学很有用
By now, you already have a hint for how it's used in describing the manipulation of space, which is useful for things like computer graphics and robotics.
[01:02] ↗
但是线性代数在几乎所有技术领域中都有所体现 并被广泛应用的一个主要原因是 它能帮助我们求解特定的方程组
But one of the main reasons that linear algebra is more broadly applicable and required for just about any technical discipline is that it lets us solve certain systems of equations.
[01:11] ↗
当我说“方程组”时 我是在说你有一系列未知量和一系列与之相关的方程
When I say system of equations, I mean you have a list of variables, things you don't know, and a list of equations relating them.
[01:18] ↗
大部分情况下,这些方程会显得非常复杂
In a lot of situations, those equations can get very complicated.
[01:22] ↗
但如果你幸运的话,它们可能具有一个特定的形式
But, if you're lucky, they might take on a certain special form.
[01:26] ↗
在每一个方程中,所有的未知量只具有常系数 这些未知量之间只进行加和
Within each equation, the only thing happening to each variable is that it's scaled by some constant, and the only thing happening to each of those scaled variables is that they're added to each other.
[01:38] ↗
也就是说没有幂次,没有奇怪的函数,没有未知量间的乘积等等
So no exponents or fancy functions or multiplying two variables together, things like that.
[01:43] ↗
要整理这一特定的方程组,一个典型的方法是 将未知量放在等号左边 剩余的常数项放在等号右边
The typical way to organize this sort of special system of equations is to throw all the variables on the left and put any lingering constants on the right.
[01:54] ↗
并且将同一个未知量竖直对齐也是极好的 要做到这一点,你可能需要在某个未知量不出现时添加0这个系数
It's also nice to vertically line up the common variables, and to do that, you might need to throw in some zero coefficients whenever the variable doesn't show up in one of the equations.
[02:05] ↗
这就被称为“线性方程组”
This is called a linear system of equations.
[02:08] ↗
你可能注意到了,这和矩阵向量乘法非常相似
You might notice that this looks a lot like matrix-vector multiplication.
[02:12] ↗
实际上,你可以将所有的方程合并为一个向量方程 这个方程有一个包含所有常数系数的矩阵 一个包含所有未知量的向量 以及它们乘积所得到的一个常数向量
In fact, you can package all of the equations together into a single vector equation where you have the matrix containing all of the constant coefficients and a vector containing all of the variables, and their matrix-vector product equals some different constant vector.
[02:29] ↗
我们称系数矩阵为A 包含未知量的向量为粗体的x 右侧的常数向量为v
Let's name that constant matrix A, denote the vector holding the variables with a bold-faced X, and call the constant vector on the right-hand side V.
[02:39] ↗
这不仅仅是将方程组写进一行的书写技巧
This is more than just a notational trick to get our system of equations written on one line.
[02:43] ↗
它还阐明了这个问题中优美的几何直观部分
It sheds light on a pretty cool geometric interpretation for the problem.
[02:48] ↗
矩阵A代表一种线性变换 所以求解Ax=v意味着我们去寻找一个向量x 使得它在变换后与v重合
The matrix A corresponds with some linear transformation, so solving Ax equals V means we're looking for a vector X, which, after applying the transformation, lands on V.
[03:00] ↗
思考一下这一过程
Think about what's happening here for a moment.
[03:02] ↗
你完全可以只考虑对空间变形,以及变换前后向量的重叠 就将多个未知量相互混合的复杂方程组印入脑中
You can hold in your head this really complicated idea of multiple variables all intermingling with each other just by thinking about squishing and morphing space and trying to figure out which vector lands on another.
[03:13] ↗
很酷,对吧?
Cool, right?
[03:15] ↗
先举一个简单的例子,你有两个方程和两个未知量构成的方程组
To start simple, let's say you have a system with two equations and two unknowns.
[03:19] ↗
意味着A是一个2×2的矩阵,v和x都是二维向量
This means the matrix A is a 2x2 matrix, and V and X are each two-dimensional vectors.
[03:26] ↗
现在,这个方程的解依赖于矩阵A所代表的变换 是将空间挤压到一条线或一个点等低维空间 还是保持像初始状态一样的完整二维空间
Now, how we think about the solutions to this equation depends on whether the transformation associated with A squishes all of space into a lower dimension, like a line or a point, or if it leaves everything spanning the full two dimensions where it started.
[03:40] ↗
用上期视频中的语言来说 我们将它们分为两种情况:A的行列式为零和A的行列式不为零
In the language of the last video, we subdivide into the cases where A has zero determinant and the case where A has non-zero determinant.

非零行列式情形:时间倒带与逆矩阵 A⁻¹

⏱ 03:51 – 06:39

最常见的情况是 $\det(A) \neq 0$(随机取一个方阵几乎必然如此)。此时空间没有被压扁成零面积,于是对于任意目标向量 $\vec{v}$,都有且仅有一个向量 $\vec{x}$ 在变换后落在 $\vec{v}$ 上。

几何上找到 $\vec{x}$ 的方式就是将变换动画“倒带重放”:逆向播放变换 $A$,追踪 $\vec{v}$ 倒退回哪里。这个倒放过程本身也是一个线性变换,称为 $A$ 的逆矩阵,记为 $A^{-1}$。

  • 旋转示例:若 $A = \begin{bmatrix}0 & -1 \\ 1 & 0\end{bmatrix}$ 是逆时针旋转 $90^\circ$,则 $A^{-1} = \begin{bmatrix}0 & 1 \\ -1 & 0\end{bmatrix}$ 是顺时针旋转 $90^\circ$。
  • 剪切示例:若 $A = \begin{bmatrix}1 & 1 \\ 0 & 1\end{bmatrix}$ 将 $\hat{\jmath}$ 向右推 $1$ 单位,则 $A^{-1} = \begin{bmatrix}1 & -1 \\ 0 & 1\end{bmatrix}$ 将 $\hat{\jmath}$ 向左推 $1$ 单位。
📐 恒等变换与逆矩阵求解
$$A^{-1}A = I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \qquad A\vec{x} = \vec{v} \implies \vec{x} = A^{-1}\vec{v}$$
先应用 A 再应用 A⁻¹ 等价于“什么都不做”的恒等变换 I(保持 i-hat 与 j-hat 原位不动)。

这一结论可无缝推广至任意 $n$ 个方程、$n$ 个未知量的高维方阵系统:只要变换 $A$ 未将 $n$ 维空间压入更低维度($\det(A)\neq 0$),逆变换 $A^{-1}$ 就唯一存在,方程也必有唯一解 $\vec{x}=A^{-1}\vec{v}$。

det(A) ≠ 0 时,逆向倒带即可唯一追踪源向量 x 04:10
det(A) ≠ 0 时,逆向倒带即可唯一追踪源向量 x画面重点:黄色目标向量 v 经逆向变换回到紫色向量 x
逆变换实例一:逆时针 90° 旋转矩阵 [[0,-1],[1,0]] 04:29
逆变换实例一:逆时针 90° 旋转矩阵 [[0,-1],[1,0]]画面重点:旋转变换及其反向(顺时针 90°)对照
逆变换实例二:向右剪切的逆是向左剪切 [[1,-1],[0,1]] 04:40
逆变换实例二:向右剪切的逆是向左剪切 [[1,-1],[0,1]]画面重点:将 j-hat 向左推回原位以抵消向右剪切
恒等变换 I:A⁻¹A 等于“什么都不做”的单位矩阵 05:18
恒等变换 I:A⁻¹A 等于“什么都不做”的单位矩阵画面重点:公式 A⁻¹A = [[1,0],[0,1]] 与保持不变的坐标网格
代数求解方程组:两边左乘 A⁻¹ 得到解向量 05:27
代数求解方程组:两边左乘 A⁻¹ 得到解向量画面重点:等式 A⁻¹Ax = A⁻¹v 直观呈现
[03:51] ↗
先来看看最可能发生的情况,即A的行列式不为零 此时空间并未被挤压为零面积的区域
Let's start with the most likely case, where the determinant is non-zero, meaning space does not get squished into a zero-area region.
[03:59] ↗
在这种情况下,有且仅有一个向量(在变换后)与v重合 并且你可以通过逆向进行变换来找到这个向量
In this case, there will always be one and only one vector that lands on V, and you can find it by playing the transformation in reverse.
[04:07] ↗
如同倒带一样,通过跟踪v的动向 你就能找到满足Ax=v的向量x
Following where V goes as we rewind the tape like this, you'll find the vector x such that A times x equals V.
[04:15] ↗
当你逆向进行变换时,它实际上对应了另一个线性变换 通常被称为“A的逆”,记为A^(-1)
When you play the transformation in reverse, it actually corresponds to a separate linear transformation, commonly called the inverse of A, denoted A to the negative one.
[04:25] ↗
比如说,如果A是逆时针旋转90度的变换 那么A的逆就是顺时针旋转90度的变换
For example, if A was a counterclockwise rotation by 90 degrees, then the inverse of A would be a clockwise rotation by 90 degrees.
[04:34] ↗
如果A向右剪切的变换,将j帽向右移动一个单位 A的逆就是向左剪切的变换,将j帽向左移动一个单位
If A was a rightward shear that pushes j-hat one unit to the right, the inverse of A would be a leftward shear that pushes j-hat one unit to the left.
[04:44] ↗
总的来说,A逆是满足以下性质的唯一变换 首先应用A代表的变换,再应用A逆代表的变换 你会回到原始状态
In general, A inverse is the unique transformation with the property that if you first apply A, then follow it with the transformation A inverse, you end up back where you started.
[04:55] ↗
两个变换相继作用在代数上体现为矩阵乘法 所以A逆的核心性质在于 A逆乘以A等于一个“什么都不做”的矩阵
Applying one transformation after another is captured algebraically with matrix multiplication, so the core property of this transformation A inverse is that A inverse times A equals the matrix that corresponds to doing nothing.
[05:08] ↗
这个“什么都不做”的变换被称为“恒等变换”
The transformation that does nothing is called the identity transformation.
[05:12] ↗
它保持i帽和j帽不变,所以它的列就是(1, 0)和(0, 1)
It leaves i-hat and j-hat each where they are, unmoved, so its columns are 1,0 and 0,1.
[05:20] ↗
一旦你找到了A的逆 (实践中你可以用计算机完成) 你就能在两边同乘A的逆矩阵来求解向量方程
Once you find this inverse, which in practice you'd do with a computer, you can solve your equation by multiplying this inverse matrix by v.
[05:30] ↗
这个过程在几何上 就对应于逆向进行变换并跟踪v的动向
And again, what this means geometrically is that you're playing the transformation in reverse and following v.
[05:40] ↗
随机选一个矩阵,有很大可能会遇到这一非零行列式的情况 也就是说,对于两个未知量和两个方程构成的方程组 几乎可以确定它存在唯一解
This non-zero determinant case, which for a random choice of matrix is by far the most likely one, corresponds with the idea that if you have two unknowns and two equations, it's almost certainly the case that there's a single unique solution.
[05:54] ↗
当方程数目与未知量数目相同时,这一思想在高维情况下也有意义
This idea also makes sense in higher dimensions, when the number of equations equals the number of unknowns.
[05:59] ↗
同样地可以给方程组赋予几何意义 也就是你有线性变换A 某个向量v 并且你在寻找向量x,在变换后与v重合
Again, the system of equations can be translated to the geometric interpretation where you have some transformation A and some vector v, and you're looking for the vector x that lands on v.
[06:16] ↗
只要变换A不将空间压缩到一个更低的维度上 也就是它的行列式不为零 那它就存在逆变换 - A逆 使得应用A变换再应用A逆变换之后,结果与恒等变换无异
As long as the transformation A doesn't squish all of space into a lower dimension, meaning its determinant is non-zero, there will be an inverse transformation A inverse, with the property that if you first do A, then you do A inverse, it's the same as doing nothing.
[06:34] ↗
要想求解方程,你只需要将A逆与向量v相乘即可
And to solve your equation, you just have to multiply that reverse transformation matrix by the vector v.

零行列式情形:无法“解压缩”空间与条件性有解

⏱ 06:44 – 07:39

当 $\det(A)=0$ 时,变换将空间压缩进了更低维度——二维平面被压成直线或原点,三维空间被压成平面、直线或原点(体积归零)。此时逆矩阵 $A^{-1}$ 根本不存在。

⚠️ 为什么不能把一条线“解压缩”回平面?
单向的“压扁”是多对一映射(整条直线上的无数个输入向量叠落到同一个输出点上)。如果要定义逆变换,就必须把单个输出点一对多地拆回一整条线的向量——但这违背了函数只能将单个输入映射到单个输出的根本约束。

不过,没有逆矩阵并不代表方程 $A\vec{x}=\vec{v}$ 一定无解。即使空间被压成了一条直线,只要你足够“幸运”,右侧的目标向量 $\vec{v}$ 恰好躺在这条输出直线上,方程依然存在解(而且往往是无穷多解);反之若 $\vec{v}$ 落在直线之外,则绝对无解。

det(A) = 0 导致逆矩阵不存在:空间被压扁至低维 06:50
det(A) = 0 导致逆矩阵不存在:空间被压扁至低维画面重点:二维空间压成斜线后,函数无法逆向“解压缩”为二维平面
三维不可逆情形:三维网格压成平面、直线或原点 07:14
三维不可逆情形:三维网格压成平面、直线或原点画面重点:所有区域体积变为零,对应三维变换不可逆
无逆仍有解的几何条件:v 恰好落在压缩后的直线上 07:35
无逆仍有解的几何条件:v 恰好落在压缩后的直线上画面重点:黄色向量 v 与压扁后的输出直线重合
[06:44] ↗
但是当行列式为零时 与这个方程组相关的变换将空间压缩到更低的维度上 此时没有逆变换
But when the determinant is zero, and the transformation associated with the system of equations squishes space into a smaller dimension, there is no inverse.
[06:52] ↗
你不能将一条线“解压缩”为一个平面
You cannot unsquish a line to turn it into a plane.
[06:56] ↗
至少这不是一个函数能做的
At least that's not something that a function can do.
[06:58] ↗
这样就会要求将一个单独的向量变换为一整条线的向量
That would require transforming each individual vector into a whole line full of vectors.
[07:04] ↗
但是函数只能将一个输入变换为一个输出
But functions can only take a single input to a single output.
[07:08] ↗
类似地,对于三个方程和三个未知量 如果变换将三维空间压缩为一个平面,甚至是一条直线或一个点,那么它也没有逆变换
Similarly, for three equations and three unknowns, there will be no inverse if the corresponding transformation squishes 3D space onto the plane, or even if it squishes it onto a line or a point.
[07:20] ↗
它们都对应行列式为零的情况,因为此时所有区域都被压缩到零体积
Those all correspond to a determinant of zero, since any region is squished into something with zero volume.
[07:27] ↗
即便不存在逆变换,解仍然可能存在
It's still possible that a solution exists even when there is no inverse.
[07:31] ↗
比如说,一个变换将空间压缩为一条直线 你得足够幸运,让向量v恰好处于这条直线上
It's just that when your transformation squishes space onto, say, a line, you have to be lucky enough that the vector v lives somewhere on that line.

精细刻画降维程度:列空间与秩(Rank)

⏱ 07:43 – 09:36

同为 $\det(A)=0$,不同坍缩的苛刻程度差异巨大:对一个 $3\times 3$ 矩阵而言,把三维空间压成一条直线,显然比压成一个二维平面更“极端”,随机给定的 $\vec{v}$ 落入其中的概率也小得多。为了超越“零行列式”的粗粒度描述,我们需要引入秩(rank)与列空间(column space)。

📐 列空间与秩的精确定义
$$\operatorname{Col}(A) = \{A\vec{x} \mid \vec{x}\in\mathbb{R}^n\} = \operatorname{Span}(\text{columns of } A), \qquad \operatorname{rank}(A) = \dim(\operatorname{Col}(A))$$
矩阵各列记录变换后基向量的落点,它们的线性张成就是所有可能输出构成的“列空间”;列空间的维数即为矩阵的“秩”。
  • 若变换输出是一维直线(不管输入在二维还是三维),则 $\operatorname{rank}(A) = 1$。
  • 若变换输出是二维平面,则 $\operatorname{rank}(A) = 2$。对 $2\times 2$ 矩阵,$\operatorname{rank}=2$ 已达最大,意味着 $\det\neq 0$ 且张成整个平面;而对 $3\times 3$ 矩阵,$\operatorname{rank}=2$ 仍属于降维,只是坍缩没有 $\operatorname{rank}=1$ 那么剧烈。
  • 若 $3\times 3$ 矩阵的 $\det\neq 0$ 且输出充满整个三维空间,则 $\operatorname{rank}(A) = 3$。
  • 当秩达到理论最大值——即秩等于矩阵的列数时,我们称该矩阵为满秩(full rank)。
Rank 1:三维空间被剧烈压缩到一维直线上 08:12
Rank 1:三维空间被剧烈压缩到一维直线上画面重点:三维彩线网格全部坍缩进一条斜线,标注 Rank 1
Rank 2:三维空间被压缩到二维平面上 08:18
Rank 2:三维空间被压缩到二维平面上画面重点:输出构成过原点的平面,标注 Rank 2
列空间定义:全部可能输出向量 Ax 的集合 09:02
列空间定义:全部可能输出向量 Ax 的集合画面重点:Set of all possible outputs Av 与 Column space 双向等价
满秩(Full Rank):变换后基向量仍张成完整输入维度 09:36
满秩(Full Rank):变换后基向量仍张成完整输入维度画面重点:三维立方体充满空间,秩等于列数 3
[07:43] ↗
你可能注意到一些零行列式的情况比其他的更加严格
You might notice that some of these zero determinant cases feel a lot more restrictive than others.
[07:49] ↗
比如说一个3×3的矩阵 当它将空间压缩为一条直线时,与平面相比,解存在的难度更高了 即使这两种情况下行列式均为零
Given a 3x3 matrix, for example, it seems a lot harder for a solution to exist when it squishes space onto a line compared to when it squishes things onto a plane, even though both of those are zero determinant.
[08:03] ↗
除了零行列式之外,我们还有特定术语来描述它们
We have some language that's a bit more specific than just saying zero determinant.
[08:07] ↗
当变换的结果为一条直线时,也就是说结果是一维的 我们称这个变换的秩为1
When the output of a transformation is a line, meaning it's one-dimensional, we say the transformation has a rank of one.
[08:15] ↗
如果变换后的向量落在某个二维平面上 我们称这个变换的秩为2
If all the vectors land on some two-dimensional plane, we say the transformation has a rank of two.
[08:23] ↗
所以说“秩”代表着变换后空间的维数
So the word rank means the number of dimensions in the output of a transformation.
[08:28] ↗
比如说对于2×2的矩阵,它的秩最大为2
For instance, in the case of 2x2 matrices, rank two is the best that it can be.
[08:33] ↗
意味着基向量仍旧能张成整个二维空间 并且矩阵的行列式不为零
It means the basis vectors continue to span the full two dimensions of space, and the determinant is not zero.
[08:39] ↗
但是对于3×3的矩阵,秩为2意味着空间被压缩了 但是和秩为1的情况相比,压缩并不是那么严重
But for 3x3 matrices, rank two means that we've collapsed, but not as much as they would have collapsed for a rank one situation.
[08:47] ↗
如果一个三维变换的行列式不为零,变换结果仍旧充满整个三维空间 那么它的秩为3
If a 3D transformation has a non-zero determinant and its output fills all of 3D space, it has a rank of three.
[08:55] ↗
不管是一条直线、一个平面还是三维空间等,所有可能的变换结果的集合 被称为矩阵的“列空间”
This set of all possible outputs for your matrix, whether it's a line, a plane, 3D space, whatever, is called the column space of your matrix.
[09:04] ↗
你大概也能猜到这个名字从哪来了
You can probably guess where that name comes from.
[09:07] ↗
矩阵的列告诉你基向量变换后的位置 这些变换后的基向量张成的空间就是所有可能的变换结果
The columns of your matrix tell you where the basis vectors land, and the span of those transformed basis vectors gives you all possible outputs.
[09:16] ↗
换句话说,列空间就是矩阵的列所张成的空间
In other words, the column space is the span of the columns of your matrix.
[09:23] ↗
所以更精确的秩的定义是列空间的维数
So a more precise definition of rank would be that it's the number of dimensions in the column space.
[09:30] ↗
当秩达到最大值时,意味着秩与列数相等 我们称之为“满秩”
When this rank is as high as it can be, meaning it equals the number of columns, we call the matrix full rank.

零空间(核)与线性方程组几何总览

⏱ 09:39 – 12:00

由于任何线性变换都必须固定原点不动,因此零向量 $\vec{0}$ 永远在列空间之中。当矩阵满秩时,唯一能落在原点的输入就是 $\vec{0}$ 本身;但一旦矩阵不满秩(发生降维坍缩),就会有整片非零向量集体坍缩进原点:

  • 二维压成一维直线($\operatorname{rank}=1$):沿着另一条不同方向的整条直线上的所有向量都会被压到 $\vec{0}$。
  • 三维压成二维平面($\operatorname{rank}=2$):存在一整条直线上的向量变换后落于原点。
  • 三维压成一维直线($\operatorname{rank}=1$):存在一整张平面上的向量变换后落于原点。
📐 零空间(Null Space)或核(Kernel)
$$\operatorname{Null}(A) = \ker(A) = \{\vec{x} \mid A\vec{x} = \vec{0}\}$$
所有在变换后变成“空(零向量)”的输入向量集合。当方程右侧取 v = 0 时,零空间就是齐次方程 Ax = 0 的全体解集。
💡 几何总览:一图统领方程组求解
每个线性方程组都对应一个空间变换 $A$:当 $A$ 可逆(满秩方阵)时,用逆变换 $A^{-1}$ 直接求得唯一解;当 $A$ 不可逆时,列空间回答了“方程何时有解”($\vec{v} \in \operatorname{Col}(A)$),而零空间刻画了“若方程有解,全体解集长什么样”(特解加上任意零空间向量后仍满足 $A(\vec{x}_0+\vec{n})=\vec{v}+\vec{0}=\vec{v}$)。

本章将视角限定在方程数等于未知数个数的方阵上;下一集我们将打破这一限制,作为补充探索非方阵的跨维度几何意义,并在此之后用线性变换眼光揭开点积的神秘面纱。

二维压成直线时,另一方向的一整条直线坍缩入原点 10:08
二维压成直线时,另一方向的一整条直线坍缩入原点画面重点:橙黄直线代表非满秩二维变换的零空间
零空间(Null Space / Kernel)定义 10:40
零空间(Null Space / Kernel)定义画面重点:三维坍缩至一维直线时,整张黄色平面上的向量落入原点
[09:39] ↗
注意,零向量一定会被包含在列空间中 因为线性变换必须保持原点位置不变
Notice the zero vector will always be included in the column space, since linear transformations must keep the origin fixed in place.
[09:47] ↗
对一个满秩变换来说,唯一能在变换后落在原点的就是零向量自身
For a full rank transformation, the only vector that lands at the origin is the zero vector itself.
[09:52] ↗
但是对一个非满秩的矩阵来说,它将空间压缩到一个更低的维度上 也就是说会有一系列向量在变换后成为零向量
But for matrices that aren't full rank, which squish to a smaller dimension, you can have a whole bunch of vectors that land on zero.
[10:02] ↗
举个例子,如果一个二维线性变换将空间压缩到一条直线上 那么沿某个不同方向直线上的所有向量就被压缩到原点
If a 2D transformation squishes space onto a line, for example, there is a separate line in a different direction full of vectors that get squished onto the origin.
[10:12] ↗
如果一个三维线性变换将空间压缩到一个平面上 同样也会有一整条线上的向量在变换后落在原点
If a 3D transformation squishes space onto a plane, there's also a full line of vectors that land on the origin.
[10:21] ↗
如果一个三维线性变换将空间压缩到一条直线上 那么就有一整个平面上的向量在变换后落在原点
If a 3D transformation squishes all of space onto a line, then there's a whole plane full of vectors that land on the origin.
[10:33] ↗
变换后落在原点的向量的集合 被称为矩阵的“零空间”或“核”
This set of vectors that lands on the origin is called the null space, or the kernel of your matrix.
[10:39] ↗
变换后一些向量落在零向量上,而“零空间”正是这些向量所构成的空间
It's the space of all vectors that become null, in the sense that they land on the zero vector.
[10:46] ↗
对线性方程组来说,当向量v恰好为零向量时 零空间给出的就是这个向量方程所有可能的解
In terms of the linear system of equations, when v happens to be the zero vector, the null space gives you all of the possible solutions to the equation.
[10:56] ↗
以上就是从几何角度理解线性方程组的一个高水平概述
So that's a very high level overview of how to think about linear systems of equations geometrically.
[11:02] ↗
每个方程组都有一个线性变换与之联系 当逆变换存在时,你就能用这个逆变换求解方程组
Each system has some kind of linear transformation associated with it, and when that transformation has an inverse, you can use that inverse to solve your system.
[11:12] ↗
否则,列空间的概念让我们清楚什么时候存在解 零空间的概念有助于我们理解所有可能的解的集合是什么样的
Otherwise, the idea of column space lets us understand when a solution even exists, and the idea of a null space helps us to understand what the set of all possible solutions can look like.
[11:25] ↗
这里有不少我没有涉及到的内容 尤其是如何进行计算
Again, there's a lot that I haven't covered here, most notably how to compute these things.
[11:30] ↗
我还得把范围限制在方程数目与未知量数目相等的情况内
I also had to limit my scope to examples where the number of equations equals the number of unknowns.
[11:35] ↗
但是我的目标并不是尝试教所有内容 而是让你留下对逆矩阵、列空间和零空间的深刻直观印象 并且让这些直观让你未来学习的收获更加丰硕
But the goal here is not to try to teach everything, it's that you come away with a strong intuition for inverse matrices, column space, and null space, and that those intuitions make any future learning that you do more fruitful.
[11:48] ↗
应观众要求,下期视频是关于非方阵的简短补充内容
Next video, by popular request, will be a brief footnote about non-square matrices.
[11:52] ↗
在此之后,我会开始讲讲我对点积的看法 并且以线性变换的眼光看待点积时,会出现有意思的现象 到时候再见!
Then after that, I'm going to give you my take on dot products, and something pretty cool that happens when you view them under the light of linear transformations. See you then!

📝 几何直觉自测(点击题目展开解答)

Q1. 为什么行列式为 $0$ 的方阵一定不存在逆矩阵 $A^{-1}$?▼
因为 $\det(A)=0$ 意味着线性变换把整个空间压缩到了更低维度,多条不同的向量被叠落到同一个点上。逆过程需要把单个输出点映射回一整条线(或整个平面)的无数个向量,而单值函数无法把一个输入同时映到多个输出,所以逆变换不存在。
Q2. 一个 $3\times 3$ 矩阵将三维空间压缩到了 $xy$ 平面上,它的列空间、秩、以及零空间维数分别是多少?▼
列空间是 $xy$ 平面(维数为 $2$),因此 $\operatorname{rank}(A)=2$(非满秩);被压扁进原点的输入是一条穿过原点的直线(即 $z$ 轴方向),因此零空间是一维直线(维数为 $1$),正好满足 $2 + 1 = 3$。
Q3. 从线性变换角度看,矩阵的“列空间”和“零空间”各自回答了求解 $A\vec{x}=\vec{v}$ 的什么问题?▼
列空间 $\operatorname{Col}(A)$ 决定“解是否存在”——只有当目标向量 $\vec{v}$ 落在列空间中时方程才有解;零空间 $\ker(A)$ 决定“解的自由度与结构”——当 $\vec{v}=\vec{0}$ 时零空间就是全体解,若 $\ker(A)$ 非平凡且 $\vec{v}\in\operatorname{Col}(A)$,任意解加上零空间向量仍是解。
Q4. 向右剪切矩阵 $A = \begin{bmatrix}1 & 1 \\ 0 & 1\end{bmatrix}$ 的逆矩阵是什么?如何一眼写出?▼
把向右推 $1$ 单位的剪切倒带回来,就是保持 $\hat{\imath}=(1,0)$ 不变而把 $\hat{\jmath}$ 向左推 $1$ 单位至 $(-1,1)$,即 $A^{-1}=\begin{bmatrix}1 & -1 \\ 0 & 1\end{bmatrix}$。直接相乘可验证 $A^{-1}A=I$。