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

第 03 集:矩阵与线性变换

Linear transformations and matrices
一句话直觉:矩阵不是死记硬背的数字表格,而是线性空间变换的“密码本”:它的每一列,都精确记录着标准基向量在变换后的最终落点。

本讲建立全系列最核心的认知转折——将矩阵视为对整个二维平面的线性变换。我们从“保持网格线平行且等距、原点不动”的几何定义出发,证明为何只需追踪基向量 $\hat{\imath}$ 与 $\hat{\jmath}$ 的新坐标,就能推算出任意向量 $\vec{v}$ 的落点,从而自然导出矩阵向量乘法的计算法则。

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

前置依赖

← 第 01 集 · 向量究竟是什么?:理解向量作为“空间箭头/终点坐标”以及向量加法与数乘的几何意义
← 第 02 集 · 线性组合、张成的空间与基:掌握基向量、线性组合、张成空间(Span)与线性相关/无关的概念

后续延伸

→ 第 04 集 · 矩阵乘法与线性变换复合:将连续施加两次线性变换(复合)对应到两个矩阵相乘
→ 第 05 集 · 行列式:用面积缩放倍率(行列式)度量线性变换对空间的拉伸或压缩程度
→ 第 06 集 · 逆矩阵、列空间、秩与零空间:探讨如何把线性变换“倒放”回来(逆矩阵)以及降维压缩时的信息损失
线性变换对任意向量的分解保持性
$$L(x\hat{\imath} + y\hat{\jmath}) = x\,L(\hat{\imath}) + y\,L(\hat{\jmath})$$
一般 2×2 矩阵向量乘法定义
$$\begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = x \begin{bmatrix} a \\ c \end{bmatrix} + y \begin{bmatrix} b \\ d \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix}$$
逆时针旋转 90° 矩阵
$$R_{90^\circ} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}$$
水平剪切矩阵 (Shear)
$$S = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$$
线性相关列导致的二维→一维压缩
$$\begin{bmatrix} 2 & -2 \\ 1 & -1 \end{bmatrix}, \quad \begin{bmatrix} -2 \\ -1 \end{bmatrix} = -1 \begin{bmatrix} 2 \\ 1 \end{bmatrix}$$

变换的运动视角:从函数到整个空间的变形

⏱ 00:12 – 02:25

“线性变换与矩阵的关系”是打通整门线性代数的核心枢纽。所谓变换(Transformation),本质上就是函数(Function):接收一个输入向量 $\vec{v}$,输出一个对应向量 $L(\vec{v})$(例如输入 $\begin{bmatrix}5\\7\end{bmatrix}$ 得到另一个输出向量)。之所以不用“函数”而改称“变换”,是为了引导我们用空间运动(Movement)来可视化输入与输出的对应关系——想象每一个输入向量动态移动到它对应的输出位置。

💡 点代理与背景网格:如何看清二维空间的整体变形
如果同时画出平面上无数根箭头,画面会极其拥挤。因此采用两个可视化技巧:第一,把每个向量简化为它箭头尖端所在的单个点,看全局变化就变成了观察平面上所有点同时流动;第二,把变形施加在一张无限网格上,并在背景中保留一份淡色原始网格作为参照系,直观感受整个空间被挤压、拉伸和扭转(squishing and morphing)的相对位置变化。
  • 函数视角:$\vec{v}_{\text{in}} \mapsto L(\vec{v}_{\text{in}}) = \vec{v}_{\text{out}}$,向量输入、向量输出。
  • 运动视角:将输入向量平移或转动至输出向量;用“终点即向量”避免箭头重叠。
  • 网格参照法:前景亮蓝网格随变换运动,背景暗灰网格固定不动,方便对照坐标前后变化。
主题引入:矩阵即线性变换——理解后续行列式、特征值等概念的总钥匙 00:25
主题引入:矩阵即线性变换——理解后续行列式、特征值等概念的总钥匙画面重点:片头点明 Matrices as Linear transformations 核心主题
概念解析:Transformation 本质上是接收向量输入并产生向量输出的函数 $L(\vec{v})$ 00:56
概念解析:Transformation 本质上是接收向量输入并产生向量输出的函数 $L(\vec{v})$画面重点:Transformation 与 Function 的对应关系及向量输入示例
运动可视化:将输入向量(黄/绿)动态移动到输出向量(紫)所在位置 01:24
运动可视化:将输入向量(黄/绿)动态移动到输出向量(紫)所在位置画面重点:输入向量向输出向量移动的几何动画
点代理技巧:把每个向量抽象为其末端点,防止满屏箭头相互遮挡 01:44
点代理技巧:把每个向量抽象为其末端点,防止满屏箭头相互遮挡画面重点:径向分布的向量箭头转化为彩色点阵
无限网格与背景副本:亮蓝网格发生形变,背景保留原始网格以便追踪落点 02:11
无限网格与背景副本:亮蓝网格发生形变,背景保留原始网格以便追踪落点画面重点:变形网格与静止背景参照网格对比
[00:12] ↗
嘿 大家好!
Hey everyone!
[00:13] ↗
如果要我选出一个主题,它不仅让线性代数的其他内容一目了然 又经常被初次学习线性代数的人忽视
If I had to choose just one topic that makes all of the others in linear algebra start to click, and which too often goes unlearned the first time a student takes linear algebra, it would be this one.
[00:23] ↗
我会选择这个——线性变换的概念以及它和矩阵的关系
The idea of a linear transformation and its relation to matrices.
[00:27] ↗
在这期视频中,我只会集中讨论 这些变换在二维空间中长什么样 以及它们如何与矩阵向量乘法关联
For this video, I'm just going to focus on what these transformations look like in the case of two dimensions, and how they relate to the idea of matrix vector multiplication.
[00:36] ↗
尤其是展示一种不用死记硬背的考虑矩阵向量乘法的方法
In particular, I want to show you a way to think about matrix vector multiplication that doesn't rely on memorization.
[00:43] ↗
首先,我们先来解析“线性变换”这个术语
To start, let's just parse this term, linear transformation.
[00:47] ↗
“变换”本质上是“函数”的一种花哨的说法
Transformation is essentially a fancy word for function.
[00:50] ↗
它接收输入内容,并输出对应结果
It's something that takes in inputs and spits out an output for each one.
[00:54] ↗
特别地,在线性代数的情况下 我们考虑的是接收一个向量并且输出一个向量的变换
Specifically, in the context of linear algebra, we like to think about transformations that take in some vector and spit out another vector.
[01:02] ↗
既然“变换”和“函数”意义相同,为什么还要使用前者而不是后者?
So why use the word transformation instead of function if they mean the same thing?
[01:07] ↗
因为使用“变换”是在暗示以特定方式来可视化这一输入-输出关系
Well, it's to be suggestive of a certain way to visualize this input-output relation.
[01:12] ↗
一种理解“向量的函数”的方法是使用运动
You see, a great way to understand functions of vectors is to use movement.
[01:17] ↗
如果一个变换接收一个向量并输出一个向量 我们想象这个输入向量移动到输出向量的位置
If a transformation takes some input vector to some output vector, we imagine that input vector moving over to the output vector.
[01:26] ↗
接下来,要理解整个变换 我们可以想象每一个输入向量都移动到对应输出向量的位置
Then to understand the transformation as a whole, we might imagine watching every possible input vector move over to its corresponding output vector.
[01:35] ↗
因为将向量看作箭头时,同时考虑所有二维向量会变得非常拥挤
It gets really crowded to think about all of the vectors all at once, each one as an arrow.
[01:40] ↗
所以按照我上期视频所说的,一个好技巧是 将每一个向量看作它的终点,而不是一个箭头
So as I mentioned last video, a nice trick is to conceptualize each vector not as an arrow, but as a single point, the point where its tip sits.
[01:48] ↗
用这种方法考虑所有输入向量都移动到对应输出向量的位置时 我们只用看空间中的所有点移动到其他点的位置
That way, to think about a transformation taking every possible input vector to some output vector, we watch every point in space moving to some other point.
[01:57] ↗
二维空间变换这种情况下 为了更好地体会整个空间形状上的改变 我喜欢对无限网格上的所有点同时做变换
In the case of transformations in two dimensions, to get a better feel for the whole shape of the transformation, I like to do this with all of the points on an infinite grid.
[02:07] ↗
我有时也喜欢在背景中保留原始网格的副本 以便追踪终点与起点的相对关系
I also sometimes like to keep a copy of the grid in the background, just to help keep track of where everything ends up relative to where it starts.
[02:14] ↗
你得承认,各种各样对空间的变换所产生的效果是很美妙的
The effect for various transformations moving around all of the points in space is, you've got to admit, beautiful.
[02:22] ↗
它们能给你一种挤压和变形空间的感觉
It gives the feeling of squishing and morphing space itself.

什么是“线性”?两条几何铁律与三大反例

⏱ 02:26 – 03:31

任意的空间变形可以极度复杂,而线性代数专门研究一类结构清晰、性质良好的特例——线性变换(Linear Transformations)。从视觉上判别,一个变换是线性的,当且仅当同时满足两条铁律:

  • 直线保持为直线(Lines remain lines):变换后所有直线都不能变弯曲。
  • 原点保持固定(Origin remains fixed):坐标原点 $\vec{0}$ 必须留在原地,不能发生整体平移。
  • 等价的网格语言:线性变换即保持网格线平行且等距分布(parallel and evenly spaced)的变换(如绕原点的旋转,或其他难以仅靠文字口述的拉伸剪切)。
⚠️ 易错提醒:三大非线性反例,尤其是“假装线性”的第 3 类!
视频中展示了三个典型反例:反例 1 网格线直接扭曲成波浪线(违反直线保持性);反例 2 所有网格线依然笔直且平行,但整个空间被平移导致原点离开零点(这是“仿射变换”而非线性变换);反例 3 原点固定不动,且水平线与竖直网格线看上去都还是直的,但只要画出一条对角线就会发现它变成了曲线!这说明不能只看坐标轴或横竖网格,必须确保空间中任意方向的直线都不弯曲。
线性判据之一:空间中所有直线在变换后必须依旧保持笔直 02:46
线性判据之一:空间中所有直线在变换后必须依旧保持笔直画面重点:直线在倾斜线性变换下仍保持平直(Lines remain lines)
非线性反例 1:网格线发生明显弯曲,违背直线不变弯的规则 02:54
非线性反例 1:网格线发生明显弯曲,违背直线不变弯的规则画面重点:网格线弯曲的非线性变换(Not linear: some lines get curved)
非线性反例 2:所有直线保持平直平行,但原点位置移动,仍属非线性 03:00
非线性反例 2:所有直线保持平直平行,但原点位置移动,仍属非线性画面重点:原点发生平移的反例(Not linear: Origin moves)
非线性反例 3:原点固定且横竖网格看似直线,但对角线暴露出弯曲形变 03:13
非线性反例 3:原点固定且横竖网格看似直线,但对角线暴露出弯曲形变画面重点:横竖网格看似直而对角线变弯的隐蔽非线性变换
几何等价判据:线性变换就是保持网格线平行且等距分布、原点固定的变换 03:21
几何等价判据:线性变换就是保持网格线平行且等距分布、原点固定的变换画面重点:平行且等距的完整网格线标注
[02:26] ↗
你也能想象到,任意一个变换可以非常复杂
As you can imagine though, arbitrary transformations can look pretty complicated.
[02:30] ↗
但幸运的是,线性代数限制在一种特殊类型的变换上 这种变换更容易理解,称为“线性变换”
But luckily, linear algebra limits itself to a special type of transformation, ones that are easier to understand, called linear transformations.
[02:39] ↗
直观地说,如果一个变换具有以下两条性质,我们就称它是线性的
Visually speaking, a transformation is linear if it has two properties.
[02:44] ↗
一是直线在变换后仍然保持为直线,不能有所弯曲 二是原点必须保持固定
All lines must remain lines without getting curved, and the origin must remain fixed in place.
[02:51] ↗
举几个例子,现在所示的这个变换不是线性变换 因为直线变得弯曲了
For example, this right here would not be a linear transformation, since the lines get all curvy.
[02:56] ↗
而对于这一个变换,即便保持直线平直,它也不是一个线性变换 因为它移动了原点的位置
And this one right here, although it keeps the lines straight, is not a linear transformation, because it moves the origin.
[03:03] ↗
这一个变换保持原点不动,乍一看它好像保持直线平直 但实际并非如此,因为我只给你展示了水平和竖直的网格线
This one here fixes the origin, and it might look like it keeps lines straight, but that's just because I'm only showing the horizontal and vertical grid lines.
[03:10] ↗
当你看看它对一条对角线作用时,很明显它不是一个线性变换 因为这条线变弯曲了
When you see what it does to a diagonal line, it becomes clear that it's not at all linear, since it turns that line all curvy.
[03:17] ↗
总的来说,你应该把线性变换看作是“保持网格线平行且等距分布”的变换
In general, you should think of linear transformations as keeping grid lines parallel and evenly spaced.
[03:23] ↗
部分线性变换很容易思考,比如关于原点的旋转
Some linear transformations are simple to think about, like rotations about the origin.
[03:28] ↗
其他的稍显复杂,难以言表
Others are a little trickier to describe with words.

化繁为简:追踪两个基向量即可锁定全平面

⏱ 03:32 – 06:04

如果我们想写程序精确计算任意输入坐标 $(x, y)$ 变换后的输出坐标,是否需要记录无数个点的去向?答案是不需要!由于线性变换保持网格线平行且等距,你只需要记录两个标准基向量 $\hat{\imath}$ 与 $\hat{\jmath}$ 各自落在哪里,平面上其他一切向量的落点都能直接算出来。

以具体向量 $\vec{v} = \begin{bmatrix}-1 \\ 2\end{bmatrix}$ 为例:变换前它可以写成 $\vec{v} = -1$$\hat{\imath}$ $+ 2$$\hat{\jmath}$。随网格发生线性变形后,平行且等距的网格保证:变换后的 $\vec{v}$ 依然等于 $-1$ 倍变换后的 $\hat{\imath}$ 加上 $2$ 倍变换后的 $\hat{\jmath}$,即线性组合系数完全不变。

📐 具体算例:从基向量落点推算 $\vec{v}=(-1,2)$ 的最终坐标
$$\hat{\imath} \mapsto \begin{bmatrix} 1 \\ -2 \end{bmatrix},\quad \hat{\jmath} \mapsto \begin{bmatrix} 3 \\ 0 \end{bmatrix} \implies \text{Transformed }\vec{v} = -1\begin{bmatrix} 1 \\ -2 \end{bmatrix} + 2\begin{bmatrix} 3 \\ 0 \end{bmatrix} = \begin{bmatrix} -1(1)+2(3) \\ -1(-2)+2(0) \end{bmatrix} = \begin{bmatrix} 5 \\ 2 \end{bmatrix}$$
借助背景原始网格直接读出 $\hat{\imath}\to(1,-2)$、$\hat{\jmath}\to(3,0)$,即使不观察整个动画过程,也能仅靠算术锁定 $\vec{v}$ 必落于 $(5, 2)$
📐 推广到一般输入坐标 (x, y)
$$\begin{bmatrix} x \\ y \end{bmatrix} \mapsto x\begin{bmatrix} 1 \\ -2 \end{bmatrix} + y\begin{bmatrix} 3 \\ 0 \end{bmatrix} = \begin{bmatrix} 1x + 3y \\ -2x + 0y \end{bmatrix}$$
这就是该特定线性变换的通用坐标映射公式:给定任意 $(x, y)$,只需将其与对应变换后基向量相乘再求和
💡 为什么四个数字就够了?
二维空间中的任意一个线性变换,完全由四个数字唯一确定:变换后 $\hat{\imath}$ 的两个坐标分量,以及变换后 $\hat{\jmath}$ 的两个坐标分量。知道这四个数,就等于掌握了整个二维平面的变形法则。
变换前分解:输入向量 $\vec{v}=\begin{bmatrix}-1\\2\end{bmatrix}$ 表达为 $-1\hat{\imath}+2\hat{\jmath}$ 04:04
变换前分解:输入向量 $\vec{v}=\begin{bmatrix}-1\\2\end{bmatrix}$ 表达为 $-1\hat{\imath}+2\hat{\jmath}$画面重点:原始网格上的向量 v 与标准基向量 i-hat、j-hat
对照背景网格读出变换后 $\hat{\imath}=(1,-2)$、$\hat{\jmath}=(3,0)$,组合关系保持不变 04:52
对照背景网格读出变换后 $\hat{\imath}=(1,-2)$、$\hat{\jmath}=(3,0)$,组合关系保持不变画面重点:Transformed v = -1(Transformed i) + 2(Transformed j)
算术锁定落点:不用看完整动画,直接算得 $-1\begin{bmatrix}1\\-2\end{bmatrix}+2\begin{bmatrix}3\\0\end{bmatrix}=\begin{bmatrix}5\\2\end{bmatrix}$ 05:10
算术锁定落点:不用看完整动画,直接算得 $-1\begin{bmatrix}1\\-2\end{bmatrix}+2\begin{bmatrix}3\\0\end{bmatrix}=\begin{bmatrix}5\\2\end{bmatrix}$画面重点:左下方逐步展开的具体坐标推算过程
推广至一般向量 $\begin{bmatrix}x\\y\end{bmatrix}$:输出坐标公式为 $\begin{bmatrix}1x+3y\\-2x+0y\end{bmatrix}$ 05:56
推广至一般向量 $\begin{bmatrix}x\\y\end{bmatrix}$:输出坐标公式为 $\begin{bmatrix}1x+3y\\-2x+0y\end{bmatrix}$画面重点:带入 x, y 后的通用映射表达式
[03:32] ↗
你觉得应该如何用数值去描述这些线性变换呢?
So, how do you think you could describe these transformations numerically?
[03:35] ↗
比如说,你在通过编程制作动画和视频来教授这一主题 你应该给计算机什么样的计算公式 使得你给它一个向量的坐标,它能给你变换后向量的坐标呢?
If you were, say, programming some animations to make a video teaching the topic, what formula do you give the computer so that if you give it the coordinates of a vector, it can give you the coordinates of where that vector lands?
[03:48] ↗
实际结果是,你只需要记录两个基向量i帽和j帽变换后的位置 其他向量都会随之而动
It turns out that you only need to record where the two basis vectors, i-hat and j-hat, each land, and everything else will follow from that.
[03:58] ↗
比如说,考虑坐标为(-1, 2)的向量v 这个向量就是-1与i帽之积和2与j帽之积的和
For example, consider the vector v with coordinates negative 1, 2, meaning that it equals negative 1 times i-hat plus 2 times j-hat.
[04:09] ↗
如果我们运用一些变换,并且跟随这三个向量的运动 网格线保持平行且等距分布的性质有一个重要的推论
If we play some transformation and follow where all three of these vectors go, the property that grid lines remain parallel and evenly spaced has a really important consequence.
[04:19] ↗
变换后的向量v的位置,是-1与变换后的i帽之积,加上2与变换后的j帽之积
The place where v lands will be negative 1 times the vector where i-hat landed plus 2 times the vector where j-hat landed.
[04:26] ↗
换句话说,向量v是i帽和j帽的一个特定线性组合 那么变换后的向量v也是变换后i帽和j帽的同样的线性组合
In other words, it started off as a certain linear combination of i-hat and j-hat, and it ends up as that same linear combination of where those two vectors landed.
[04:36] ↗
这意味着,你可以只根据变换后的i帽和j帽,就推断出变换后的v
This means you can deduce where v must go based only on where i-hat and j-hat each land.
[04:42] ↗
这也是为什么我喜欢在背景中保留原始网格的副本
This is why I like keeping a copy of the original grid in the background.
[04:45] ↗
对于现在所示的变换,我们可以看出i帽落在坐标(1, -2)上 j帽落在x轴上,坐标为(3, 0)
For the transformation shown here, we can read off that i-hat lands on the coordinates 1, negative 2, and j-hat lands on the x-axis over at the coordinates 3, 0.
[04:56] ↗
也就是说,-1乘以i帽加上2乘以j帽所代表的向量 会落在-1乘以向量(1, -2)加上2乘以向量(3, 0)的位置上
This means that the vector represented by negative 1 i-hat plus 2 times j-hat ends up at negative 1 times the vector 1, negative 2 plus 2 times the vector 3, 0.
[05:07] ↗
简单运算之后,你就能推断出向量v一定落在向量(5, 2)上
Adding that all together, you can deduce that it has to land on the vector 5, 2.
[05:14] ↗
因为这个过程非常重要,所以值得你停下来体会一番
This is a good point to pause and ponder, because it's pretty important.
[05:19] ↗
实际上,因为我给你展示了整个变换的样子 你完全可以直接读出向量v在变换后落在坐标(5, 2)上
Now, given that I'm actually showing you the full transformation, you could have just looked to see that v has the coordinates 5, 2.
[05:26] ↗
但是更炫酷的是,只要记录了变换后的i帽和j帽 我们就可以推断出任意向量在变换之后的位置 完全不必观察变换本身是什么样
But the cool part here is that this gives us a technique to deduce where any vectors land so long as we have a record of where i-hat and j-hat each land without needing to watch the transformation itself.
[05:39] ↗
将向量写成更一般的坐标 (x, y),变换后的位置就是 x 乘以变换后 i帽的落点 (1, -2),加上 y 乘以变换后 j帽的落点 (3, 0)。
Write the vector with more general coordinates, x and y, and it will land on x times the vector where i-hat lands, 1, negative 2, plus y times the vector where j-hat lands, 3, 0.
[05:52] ↗
完成这个加法运算,你就能得出它落在坐标 (1x+3y, -2x+0y) 上。
Carrying out that sum, you see that it lands at 1x plus 3y, negative 2x plus 0y.
[05:59] ↗
运用这个公式,我给你任意一个向量,你都能告诉我它在变换后的位置
I give you any vector, and you can tell me where that vector lands using this formula.

矩阵的本质:把基向量落点打包进 2×2 格子

⏱ 06:05 – 07:58

数学上约定把这 4 个决定线性变换的数字打包成一个 $2\times 2$ 的数字方阵,称为$2\times 2$ 矩阵(Matrix)。最关键的解读规则是:第一列 $\begin{bmatrix}a\\c\end{bmatrix}$ 就是 $\hat{\imath}$ 的新落点,第二列 $\begin{bmatrix}b\\d\end{bmatrix}$ 就是 $\hat{\jmath}$ 的新落点。

📐 矩阵向量乘法的一般公式
$$\begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = x \begin{bmatrix} a \\ c \end{bmatrix} + y \begin{bmatrix} b \\ d \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix}$$
将矩阵写在向量左侧,就像把函数 $f$ 写在自变量左侧一样;乘法结果就是用输入坐标 $x, y$ 分别缩放新基向量再相加
⚠️ 易错提醒:看“列”不看“行”!
初学者常误以为矩阵的第一行 $(a, b)$ 代表第一个基向量,这是致命误区。请始终牢记:矩阵的列(Columns)才是变换后的基向量——第一列是变换后的 $\hat{\imath}$,第二列是变换后的 $\hat{\jmath}$。当你把向量 $\begin{bmatrix}x\\y\end{bmatrix}$ 乘到矩阵右边时,恰恰是在取 $x$ 倍第一列加 $y$ 倍第二列。
💡 拒绝死记硬背口诀
传统教材常直接要求高中生背诵 $\begin{bmatrix}ax+by\\cx+dy\end{bmatrix}$,却隐藏了最直觉的中间步骤 $x\begin{bmatrix}a\\c\end{bmatrix}+y\begin{bmatrix}b\\d\end{bmatrix}$。只要心中保留“列的线性组合”这一画面,你就永远不会算错矩阵向量乘法。
矩阵列含义约定:第一列是 $\hat{\imath}$ 落点,第二列是 $\hat{\jmath}$ 落点(示例矩阵 $\begin{bmatrix}3&2\\-2&1\end{bmatrix}$) 06:29
矩阵列含义约定:第一列是 $\hat{\imath}$ 落点,第二列是 $\hat{\jmath}$ 落点(示例矩阵 $\begin{bmatrix}3&2\\-2&1\end{bmatrix}$)画面重点:绿圈标出 Where i-hat lands,红圈标出 Where j-hat lands
一般符号推导:$\begin{bmatrix}a&b\\c&d\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}=x\begin{bmatrix}a\\c\end{bmatrix}+y\begin{bmatrix}b\\d\end{bmatrix}=\begin{bmatrix}ax+by\\cx+dy\end{bmatrix}$ 07:33
一般符号推导:$\begin{bmatrix}a&b\\c&d\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}=x\begin{bmatrix}a\\c\end{bmatrix}+y\begin{bmatrix}b\\d\end{bmatrix}=\begin{bmatrix}ax+by\\cx+dy\end{bmatrix}$画面重点:字母矩阵与一般向量相乘的完整线性组合展开
[06:05] ↗
以上这些内容是在说 一个二维线性变换仅由四个数字完全确定 变换后i帽的两个坐标与变换后j帽的两个坐标
What all of this is saying is that a two-dimensional linear transformation is completely described by just four numbers, the two coordinates for where i-hat lands and the two coordinates for where j-hat lands.
[06:17] ↗
是不是很酷?
Isn't that cool?
[06:18] ↗
通常我们将这些坐标包装在一个2×2的格子中,称它为2×2矩阵 你可以把它的列理解为两个特殊的向量,即变换后的i帽和j帽
It's common to package these coordinates into a 2x2 grid of numbers called a 2x2 matrix, where you can interpret the columns as the two special vectors where i-hat and j-hat each land.
[06:30] ↗
如果你有一个描述线性变换的2×2矩阵,以及一个给定向量 你想了解线性变换对这个向量的作用 你只需要取出向量的坐标 将它们分别与矩阵的特定列相乘,然后将结果相加即可
If you're given a 2x2 matrix describing a linear transformation and some specific vector, and you want to know where that linear transformation takes that vector, you can take the coordinates of the vector, multiply them by the corresponding columns of the matrix, then add together what you get.
[06:48] ↗
这与“缩放基向量再相加”的思想一致
This corresponds with the idea of adding the scaled versions of our new basis vectors.
[06:55] ↗
在最一般的情况下,假设矩阵的元素为 a, b, c, d,我们来看看会发生什么。
Let's see what this looks like in the most general case, where your matrix has entries A, B, C, D.
[07:01] ↗
记住,矩阵在这里只是一个记号,它含有描述一个线性变换的信息
And remember, this matrix is just a way of packaging the information needed to describe a linear transformation.
[07:06] ↗
把第一列(a, c)看作是变换后的第一个基向量 把第二列(b, d)看作是变换后的第二个基向量
Always remember to interpret that first column, AC, as the place where the first basis vector lands, and that second column, BD, as the place where the second basis vector lands.
[07:18] ↗
我们让这个变换作用于向量(x, y),结果是什么?
When we apply this transformation to some vector xy, what do you get?
[07:22] ↗
那就应该是x乘以(a, c)加上y乘以(b, d)
Well, it'll be x times AC plus y times BD.
[07:28] ↗
合并之后,得到向量(ax+by, cx+dy)
Putting this together, you get a vector Ax plus By, Cx plus Dy.
[07:34] ↗
你甚至可以把它定义为矩阵向量乘法 这里矩阵放在向量左边,类似一个函数
You could even define this as matrix vector multiplication, when you put the matrix on the left of the vector like it's a function.
[07:42] ↗
即便你不展示其中直观的关键部分,高中生也能记住它
Then, you could make high schoolers memorize this without showing them the crucial part that makes it feel intuitive.
[07:48] ↗
但是我们完全可以把矩阵的列看作变换后的基向量 把矩阵向量乘法看作它们的线性组合,这样想不是更有意思吗?
But, isn't it more fun to think about these columns as the transformed versions of your basis vectors, and to think about the result as the appropriate linear combination of those vectors?

经典案例实战:旋转、剪切、逆向读图与降维压缩

⏱ 08:01 – 09:42

掌握了“列即基向量落点”,我们就能轻松在“几何动画”与“数字矩阵”之间双向翻译。先看两个最经典的二维基本变换:

📐 案例 1:整个平面逆时针旋转 90°
$$\hat{\imath} \mapsto \begin{bmatrix} 0 \\ 1 \end{bmatrix},\quad \hat{\jmath} \mapsto \begin{bmatrix} -1 \\ 0 \end{bmatrix} \implies R_{90^\circ} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}$$
想算任意向量旋转 $90^\circ$ 后的坐标,左乘该矩阵即可,例如 $\begin{bmatrix}0&-1\\1&0\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}-y\\x\end{bmatrix}$
📐 案例 2:水平剪切变换(Shear)
$$\hat{\imath} \mapsto \begin{bmatrix} 1 \\ 0 \end{bmatrix},\quad \hat{\jmath} \mapsto \begin{bmatrix} 1 \\ 1 \end{bmatrix} \implies S = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$$
保持 x 轴基向量 $\hat{\imath}$ 固定在 $(1, 0)$ 不动,将 y 轴基向量 $\hat{\jmath}$ 向右倾倒至 $(1, 1)$

反过来,如果先给出一个未知矩阵 $\begin{bmatrix}1&3\\2&1\end{bmatrix}$,只需两步就能在脑海中还原它的几何动作:先把 $\hat{\imath}$ 移到 $(1, 2)$,再把 $\hat{\jmath}$ 移到 $(3, 1)$,同时让整个网格线保持平行且等距地跟随伸展即可。

📐 案例 3:线性相关列引起的空间塌缩(降维)
$$\begin{bmatrix} 2 & -2 \\ 1 & -1 \end{bmatrix}, \quad \text{其中 } \begin{bmatrix} -2 \\ -1 \end{bmatrix} = -1 \begin{bmatrix} 2 \\ 1 \end{bmatrix}$$
当变换后的 $\hat{\imath}$ 与 $\hat{\jmath}$ 线性相关(互为标量倍数、共线)时,整个二维平面会被压扁到这两个列向量所张成的一维直线上
逆时针旋转 90°:$\hat{\imath}$ 落于 $(0, 1)$,$\hat{\jmath}$ 落于 $(-1, 0)$,构成矩阵 $\begin{bmatrix}0&-1\\1&0\end{bmatrix}$ 08:20
逆时针旋转 90°:$\hat{\imath}$ 落于 $(0, 1)$,$\hat{\jmath}$ 落于 $(-1, 0)$,构成矩阵 $\begin{bmatrix}0&-1\\1&0\end{bmatrix}$画面重点:90° rotation counterclockwise 网格旋转与对应矩阵
水平剪切(Shear):$\hat{\imath}$ 留在 $(1, 0)$,$\hat{\jmath}$ 移至 $(1, 1)$,构成矩阵 $\begin{bmatrix}1&1\\0&1\end{bmatrix}$ 08:44
水平剪切(Shear):$\hat{\imath}$ 留在 $(1, 0)$,$\hat{\jmath}$ 移至 $(1, 1)$,构成矩阵 $\begin{bmatrix}1&1\\0&1\end{bmatrix}$画面重点:Shear 变换网格与固定 i-hat、倾斜 j-hat
由矩阵反推变换:$\begin{bmatrix}1&3\\2&1\end{bmatrix}$ 把 $\hat{\imath}$ 送往 $(1,2)$、把 $\hat{\jmath}$ 送往 $(3,1)$ 09:19
由矩阵反推变换:$\begin{bmatrix}1&3\\2&1\end{bmatrix}$ 把 $\hat{\imath}$ 送往 $(1,2)$、把 $\hat{\jmath}$ 送往 $(3,1)$画面重点:矩阵两列与网格上绿色、红色新基向量对应
线性相关列压缩空间:$\begin{bmatrix}2&-2\\1&-1\end{bmatrix}$ 将整个二维空间挤压到一条一维直线上 09:38
线性相关列压缩空间:$\begin{bmatrix}2&-2\\1&-1\end{bmatrix}$ 将整个二维空间挤压到一条一维直线上画面重点:Linearly dependent columns 将平面压扁至一维 Span
[08:01] ↗
接下来我们练习用矩阵描述一些线性变换
Let's practice describing a few linear transformations with matrices.
[08:05] ↗
比如说,我们将整个空间逆时针旋转90度 那么i帽落在坐标(0, 1)上
For example, if we rotate all of space 90 degrees counterclockwise, then i-hat lands on the coordinates 0, 1.
[08:14] ↗
j帽落在坐标(-1, 0)上
And j-hat lands on the coordinates negative 1, 0.
[08:18] ↗
那么这个矩阵的列就分别是(0, 1)和(-1, 0)
So the matrix we end up with has columns 0, 1, negative 1, 0.
[08:23] ↗
如果想算出任意向量在逆时针旋转90度后的位置 你只需要把它与矩阵相乘即可
To figure out what happens to any vector after a 90-degree rotation, you could just multiply its coordinates by this matrix.
[08:32] ↗
这里还有一个有趣的变换,它有个特殊的名称叫“剪切”
Here's a fun transformation with a special name, called a shear.
[08:35] ↗
在这个变换里,i帽保持不变,所以矩阵第一列为(1, 0)
In it, i-hat remains fixed, so the first column of the matrix is 1, 0.
[08:40] ↗
但是j帽移动到了坐标(1, 1),所以矩阵第二列为(1, 1)
But j-hat moves over to the coordinates 1, 1, which become the second column of the matrix.
[08:45] ↗
(可能有些啰嗦,但还是说一下) 为了计算出给定向量在剪切变换后的位置 只需要将矩阵与这个向量相乘即可
And at the risk of being redundant here, figuring out how a shear transforms a given vector comes down to multiplying this matrix by that vector.
[08:56] ↗
再比如说你想反过来看看问题 从一个矩阵出发,比如说一个以(1, 2)和(3, 1)为列的矩阵 你想推测出它代表的线性变换是什么样的
Let's say we want to go the other way around, starting with a matrix, say with columns 1, 2 and 3, 1, and we want to deduce what its transformation looks like.
[09:05] ↗
暂停思考一下,看看你能不能想象到
Pause and take a moment to see if you can imagine it.
[09:08] ↗
这里给出一种办法:首先将i帽移动到(1, 2),然后将j帽移动到(3, 1)
One way to do this is to first move i-hat to 1, 2, then move j-hat to 3, 1.
[09:15] ↗
空间其他剩余部分随二者一起移动,以保持网格线平行且等距分布
Always moving the rest of space in such a way that keeps gridlines parallel and evenly spaced.
[09:22] ↗
如果变换后的i帽和变换后的j帽是线性相关的 回顾上期视频的内容,意味着其中一个向量是另一个的倍数 那么这个线性变换将整个二维空间挤压到它们所在一条直线上 也就是这两个线性相关向量所张成的一维空间
If the vectors that i-hat and j-hat land on are linearly dependent, which, if you recall from last video, means that one is a scaled version of the other, it means that the linear transformation squishes all of 2D space onto the line where those two vectors sit, also known as the one-dimensional span of those two linearly dependent vectors.

核心总结与全书视角跃迁

⏱ 09:44 – 10:46

总结来说,线性变换是以“保持网格线平行等距、且原点固定”的方式操纵空间,它仅用基向量落点的少量坐标即可完全刻画。矩阵为我们提供了书写线性变换的语言,而矩阵向量乘法就是把该变换实际作用到某个输入向量上的计算过程。

💡 全书核心世界观:看见矩阵,就看见空间的变换
真正消化“每当你看到一个矩阵,就把它解读为对空间的某种特定变换”这一核心信念后,后续几乎所有高阶主题——从矩阵乘法、行列式、逆矩阵,到基变换、特征值与特征向量——都会瞬间变得直观可感。
  • 几何定义:直线不变弯 + 原点不移动 $\iff$ 网格线平行且等距。
  • 矩阵编码:列向量依次记录变换后的标准基向量 $\hat{\imath}, \hat{\jmath}$。
  • 计算直觉:$A\vec{v}$ 是输入坐标对矩阵各列向量的线性组合。
本质总结:直觉核心在于 $x\begin{bmatrix}a\\c\end{bmatrix}+y\begin{bmatrix}b\\d\end{bmatrix}$,每次看到矩阵都应联想其空间变换 10:12
本质总结:直觉核心在于 $x\begin{bmatrix}a\\c\end{bmatrix}+y\begin{bmatrix}b\\d\end{bmatrix}$,每次看到矩阵都应联想其空间变换画面重点:Where all the intuition is 标注出列向量线性组合核心公式
[09:44] ↗
总之,线性变换是操纵空间的一种手段 它保持网格线平行且等距分布,并且保持原点不动
To sum up, linear transformations are a way to move around space such that gridlines remain parallel and evenly spaced, and such that the origin remains fixed.
[09:55] ↗
令人高兴的是,这种变换只需要几个数字就能描述清楚 这些数字就是变换后基向量的坐标
Delightfully, these transformations can be described using only a handful of numbers, the coordinates of where each basis vector lands.
[10:03] ↗
以这些坐标为列所构成的矩阵为我们提供了一种描述线性变换的语言 而矩阵向量乘法就是计算线性变换作用于给定向量的一种途径
Matrices give us a language to describe these transformations, where the columns represent those coordinates, and matrix-vector multiplication is just a way to compute what that transformation does to a given vector.
[10:15] ↗
这里重要的一点是,每当你看到一个矩阵时 你都可以把它解读为对空间的一种特定变换
The important takeaway here is that every time you see a matrix, you can interpret it as a certain transformation of space.
[10:23] ↗
一旦真正消化了这些内容,你就在深刻理解线性代数上占据了极佳的位置
Once you really digest this idea, you're in a great position to understand linear algebra deeply.
[10:28] ↗
当你将矩阵看作空间的变换之后,此后几乎所有主题 从矩阵乘法,到行列式、基变换、特征值等都会更加容易理解
Almost all of the topics coming up, from matrix multiplication to determinants, change of basis, eigenvalues, all of these will become easier to understand once you start thinking about matrices as transformations of space.
[10:41] ↗
下期视频中,我会立即讲解两个矩阵相乘,到时候见!感谢观看。
Most immediately, in the next video, I'll be talking about multiplying two matrices together. See you then! Thank you for watching!

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

Q1. 为什么说“保持原点固定且所有直线仍保持为直线”,在二维上等价于“保持网格线平行且等距分布”?只检查水平和竖直网格线保持直线够不够?▼
不够。视频中的第 3 个反例表明,可能存在保持原点固定且横、竖坐标网格线依然笔直的非线性变换,但一旦画出对角线就会发生弯曲(例如 $(x, y)\mapsto(x + 0.1xy, y)$ 类变换在坐标轴上为直线,但对角线上含二次项会变弯)。只有保证平面上任意方向的直线都不弯曲且原点固定,才会保持任意平行线组依然平行且等距(线性映射满足 $L(a\vec{u}+b\vec{v})=aL(\vec{u})+bL(\vec{v})$)。
Q2. 已知某二维线性变换将 $\hat{\imath}$ 送到 $\begin{bmatrix}2\\-1\end{bmatrix}$,将 $\hat{\jmath}$ 送到 $\begin{bmatrix}-1\\3\end{bmatrix}$。请写出其矩阵,并计算向量 $\vec{v}=\begin{bmatrix}3\\2\end{bmatrix}$ 变换后的坐标。▼
变换矩阵以新基向量为列:$A = \begin{bmatrix}2 & -1 \\ -1 & 3\end{bmatrix}$。向量 $\vec{v}$ 变换后等于 $3\begin{bmatrix}2\\-1\end{bmatrix} + 2\begin{bmatrix}-1\\3\end{bmatrix} = \begin{bmatrix}6-2\\-3+6\end{bmatrix} = \begin{bmatrix}4\\3\end{bmatrix}$。
Q3. 若矩阵的两列线性相关,比如 $\begin{bmatrix}2 & -2 \\ 1 & -1\end{bmatrix}$,这个线性变换在几何上对二维平面做了什么?▼
因为第二列 $\begin{bmatrix}-2\\-1\end{bmatrix} = -1\begin{bmatrix}2\\1\end{bmatrix}$,变换后的 $\hat{\imath}$ 与 $\hat{\jmath}$ 共线。于是平面上所有向量(作为它们的线性组合)都会落在这条一维直线上,整个二维空间被压扁(降维)到了这两个向量所张成的一维空间(Span)。