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

第 09 集:基变换

Change of basis
一句话直觉:坐标只是依赖“基向量”这本词典的语言:$P$ 将外部基的坐标译回标准语言,$P^{-1}$ 负责反向翻译,而 $P^{-1}MP$ 则实现跨坐标系的“数学移情”,从他人视角描述同一个线性变换。

本章揭示“向量本身”与“向量的坐标表示”之间的本质分离。我们将从朋友 Jennifer 的斜交坐标系出发,建立双向坐标翻译矩阵 $P$ 与 $P^{-1}$,并最终推导出变换在不同基之间的相似/共轭转换公式 $P^{-1}MP$,为下一章“特征基对角化”铺平道路。

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

前置依赖

← 第 04 集 · 矩阵乘法与线性变换复合:必须把矩阵乘法理解为线性变换的从右向左连续复合,才能看懂三矩阵乘积 $P^{-1}MP$ 的作用流程。
← 第 06 集 · 逆矩阵、列空间、秩与零空间:逆矩阵对应“将线性变换时间倒放”,是把标准坐标系向量反推为新基坐标的必需工具。

后续延伸

→ 第 10 集 · 特征向量与特征值:下一章的核心大招“特征基对角化”,正是把基变换三明治公式应用到由特征向量构成的最优坐标系中。
→ 第 11 集 · 抽象向量空间:看穿坐标只是一种人为外衣后,最终章将探讨剥离具体坐标后向量空间的纯粹公理结构。
新基坐标译为标准坐标(矩阵列为新基向量)
$$\vec{v}_{\text{std}} = P\,\vec{v}_{\mathcal{B}} = \begin{bmatrix} \vec{b}_1 & \vec{b}_2 \end{bmatrix} \begin{bmatrix} c_1 \\ c_2 \end{bmatrix}$$
标准坐标译为新基坐标(逆基变换)
$$\vec{v}_{\mathcal{B}} = P^{-1}\,\vec{v}_{\text{std}}$$
Jennifer 坐标系的翻译矩阵及其逆矩阵
$$P = \begin{bmatrix} 2 & -1 \\ 1 & 1 \end{bmatrix}, \qquad P^{-1} = \frac{1}{3}\begin{bmatrix} 1 & 1 \\ -1 & 2 \end{bmatrix}$$
同一线性变换在新基下的相似表达
$$M_{\mathcal{B}} = P^{-1} M P \quad \text{(视频记号:}A^{-1}MA\text{)}$$

坐标的隐含假设:基向量即语言词典

⏱ 00:13 – 01:35

考虑二维平面上一个普通向量,我们习惯用坐标 $\begin{bmatrix} 3 \\ 2 \end{bmatrix}$ 来描述它,直觉含义是从起点到终点“向右走 3 格、向上走 2 格”。但在线性代数视角下,这两个数字其实是标量(scalars):第一个坐标 $3$ 缩放指向右侧的单位向量 $\hat{\imath}$,第二个坐标 $2$ 缩放指向正上方的单位向量 $\hat{\jmath}$,二者的首尾相连相加(tip-to-tail sum)才构成坐标所指代的向量。

💡 基向量封装了一切默认约定
为什么第一个数字表示“向右”、第二个数字表示“向上”、单位长度 $1$ 究竟多长?所有这些隐含假设都被完整封装在 $\hat{\imath}$ 与 $\hat{\jmath}$ 的选取中。任何在几何向量与有序数组之间建立对应关系的规则都称为坐标系(coordinate system),而 $\hat{\imath}$、$\hat{\jmath}$ 正是标准坐标系的基向量(basis vectors)。

既然基向量只是一组约定,我们完全可以打破标准网格,探讨当别人选取另一组完全不同的基向量时,同一个空间会呈现怎样的面貌。

二维网格中的向量 [3, 2]^T:从原点向右 3 个单位、向上 2 个单位 00:22
二维网格中的向量 [3, 2]^T:从原点向右 3 个单位、向上 2 个单位画面重点:坐标数字作为位移的直观表示
将坐标拆解为标量 3 缩放绿色 i-hat、标量 2 缩放红色 j-hat 并首尾相加 00:45
将坐标拆解为标量 3 缩放绿色 i-hat、标量 2 缩放红色 j-hat 并首尾相加画面重点:线性代数视角的坐标本质
提出坐标系与标准基向量 i-hat、j-hat 的映射关系 01:23
提出坐标系与标准基向量 i-hat、j-hat 的映射关系画面重点:基向量封装方向与长度单位约定
[00:13] ↗
如果我在二维空间中有一个向量,我们就有一种用坐标表示它的标准方法
If I have a vector sitting here in 2D space, we have a standard way to describe it with coordinates.
[00:19] ↗
在这种情况下,这个向量的坐标为(3, 2) 也就意味着从它的起点到它的尖端,需要向右移动3个单位,并向上移动2个单位
In this case, the vector has coordinates 3, 2, which means going from its tail to its tip involves moving three units to the right and two units up.
[00:28] ↗
现在以更加线性代数的方法来描述坐标 是将这些数看作拉伸或压缩向量的标量
Now, the more linear algebra-oriented way to describe coordinates is to think of each of these numbers as a scalar, a thing that stretches or squishes vectors.
[00:37] ↗
你将第一个坐标看作缩放i帽的标量 i帽就是指向右方且长度为1的向量 第二个坐标看作缩放j帽的标量 j帽就是指向正上方且长度为1的向量
You think of that first coordinate as scaling i-hat, the vector with length 1 pointing to the right, while the second coordinate scales j-hat, the vector with length 1 pointing straight up.
[00:50] ↗
这两个经过缩放的向量的和就是坐标所要描述的向量
The tip-to-tail sum of those two scaled vectors is what the coordinates are meant to describe.
[00:56] ↗
你可以把这两个特殊的向量 看作封装于我们这个坐标系中的隐含假设
You can think of these two special vectors as encapsulating all of the implicit assumptions of our coordinate system.
[01:03] ↗
第一个数字表示向右的运动 第二个数字表示向上的运动 长度单位的确切大小 上面所有的事实都和i帽与j帽的选取有密切联系 因为这两个向量正是标量缩放的对象
The fact that the first number indicates rightward motion, that the second one indicates upward motion, exactly how far a unit of distance is, all of that is tied up in the choice of i-hat and j-hat as the vectors which are scalar coordinates are meant to actually scale.
[01:18] ↗
发生在向量与一组数之间的任意一种转化,都被称为一个坐标系 而其中两个特殊的向量 - i帽和j帽 被称为我们这个标准坐标系的基向量
Any way to translate between vectors and sets of numbers is called a coordinate system, and the two special vectors i-hat and j-hat are called the basis vectors of our standard coordinate system.
[01:30] ↗
我想在此讨论的是使用另一组基向量的思想
What I'd like to talk about here is the idea of using a different set of basis vectors.

Jennifer 的世界:同一向量的两种坐标语言

⏱ 01:36 – 03:22

假设朋友 Jennifer 使用另一组基向量:指向右上方的 $\vec{b}_1$(在我方坐标系中写为 $\begin{bmatrix} 2 \\ 1 \end{bmatrix}$)与指向左上方的 $\vec{b}_2$(在我方坐标系中写为 $\begin{bmatrix} -1 \\ 1 \end{bmatrix}$)。当我们盯着同一个空间中的目标向量(我方记为 $\begin{bmatrix} 3 \\ 2 \end{bmatrix}$)时,Jennifer 却用坐标 $\begin{bmatrix} 5/3 \\ 1/3 \end{bmatrix}$ 来描述它——因为沿她的基方向凑出该向量,恰需 $\frac{5}{3}$ 倍的 $\vec{b}_1$ 加上 $\frac{1}{3}$ 倍的 $\vec{b}_2$。

📐 同一物理向量的双语言表达
$$3\hat{\imath} + 2\hat{\jmath} \;=\; \frac{5}{3}\vec{b}_1 + \frac{1}{3}\vec{b}_2, \qquad \text{其中 } \vec{b}_1 = \begin{bmatrix} 2 \\ 1 \end{bmatrix},\; \vec{b}_2 = \begin{bmatrix} -1 \\ 1 \end{bmatrix}$$
空间中箭头本身毫无变化,变化的只是不同基组合出的数字坐标。
⚠️ 切勿混淆“她的视角”与“我方记录”
在 Jennifer 自己的坐标系中,她的基向量 $\vec{b}_1$ 和 $\vec{b}_2$ 的坐标恰恰是 $\begin{bmatrix} 1 \\ 0 \end{bmatrix}$ 与 $\begin{bmatrix} 0 \\ 1 \end{bmatrix}$,这正是 $(1,0)$ 与 $(0,1)$ 在她世界里的定义。通常情况下,用相同坐标数字在双方世界中画出来的向量会指向完全不同的方向——我们实际上在说两种不同的“数学语言”。
展示 Jennifer 选取的新基向量 b1(右上方)与 b2(左上方) 01:48
展示 Jennifer 选取的新基向量 b1(右上方)与 b2(左上方)画面重点:引入非正交备用基向量
同一几何向量:我方称作 (3, 2),Jennifer 称作 (5/3, 1/3) 02:05
同一几何向量:我方称作 (3, 2),Jennifer 称作 (5/3, 1/3)画面重点:同一向量的跨基坐标对比
精确设定:我方看 b1=(2,1)、b2=(-1,1),而 Jennifer 脑中它们就是 (1,0) 与 (0,1) 02:50
精确设定:我方看 b1=(2,1)、b2=(-1,1),而 Jennifer 脑中它们就是 (1,0) 与 (0,1)画面重点:双 π 生物气泡展示各自世界中的坐标
[01:36] ↗
比如说你有一个朋友 - 詹妮弗 她使用着一组不同的基向量,我将其称为b1和b2
For example, let's say you have a friend, Jennifer, who uses a different set of basis vectors, which I'll call b1 and b2.
[01:44] ↗
她的第一个基向量b1指向右上方 她的第二个基向量b2指向左上方
Her first basis vector, b1, points up and to the right a little bit, and her second vector, b2, points left and up.
[01:52] ↗
现在再看看之前我所展示的向量 也就是根据i帽和j帽这组基向量,你我会用坐标(3, 2)来描述的那个向量
Now take another look at that vector that I showed earlier, the one that you and I would describe using the coordinates 3,2, using our basis vectors i-hat and j-hat.
[02:01] ↗
詹妮弗其实会用坐标(5/3, 1/3)来描述它
Jennifer would actually describe this vector with the coordinates 5 thirds and 1 third.
[02:07] ↗
这意味着,根据她的两个基向量,获得那个向量的方法是 b1乘以5/3,b2乘以1/3,再将两个结果相加
What this means is that the particular way to get to that vector using her two basis vectors is to scale b1 by 5 thirds, scale b2 by 1 third, then add them both together.
[02:21] ↗
很快我就会向你展示如何计算出这两个数 - 5/3和1/3
In a little bit, I'll show you how you could have figured out those two numbers, 5 thirds and 1 third.
[02:26] ↗
总之,无论何时詹妮弗用坐标来描述一个向量 她将第一个坐标乘以b1,第二个坐标乘以b2 然后将结果相加
In general, whenever Jennifer uses coordinates to describe a vector, she thinks of her first coordinate as scaling b1, the second coordinate as scaling b2, and she adds the results.
[02:38] ↗
她最终得到的向量,会和你我认为的相同坐标的向量完全不同
What she gets will typically be completely different from the vector that you and I would think of as having those coordinates.
[02:45] ↗
更确切地说一说这里的设定 对于她的第一个基向量b1,我们会用坐标(2, 1)来描述 而对于她的第二个基向量b2,我们用(-1, 1)来描述
To be a little more precise about the setup here, her first basis vector, b1, is something that we would describe with the coordinates 2,1, and her second basis vector, b2, is something that we would describe as negative 1,1.
[02:59] ↗
但是更重要的一点是,从她的角度来看 在她的坐标系中,这两个向量的坐标为(1, 0)和(0, 1)
But it's important to realize from her perspective in her system, those vectors have coordinates 1,0 and 0,1.
[03:06] ↗
(因为)它们就是定义坐标(1, 0)和(0, 1)含义的向量
They are what define the meaning of the coordinates 1,0 and 0,1 in her world.
[03:13] ↗
所以,我们实际上说着不同的语言
So in effect, we're speaking different languages.
[03:15] ↗
虽然我们都在关注空间中的同一个向量 但是詹妮弗用不同的语言和数字来描述它
We're all looking at the same vectors in space, but Jennifer uses different words and numbers to describe them.

空间没有内蕴网格:原点是唯一共识

⏱ 03:24 – 04:10

制作二维动画时常用的方形网格,仅仅是将标准坐标系可视化的人为脚手架,高度依赖于我们对基的选择;空间本身并没有内蕴的网格。Jennifer 完全可以绘制属于她自己的平行四边形斜网格作为辅助工具。

💡 唯一绝对不变的坐标:原点 (0, 0)
无论两位观察者把网格画得多么歪斜,他们的原点 $\begin{bmatrix} 0 \\ 0 \end{bmatrix}$ 必然重合——因为所有人都认同“零向量就是把任意向量缩放 $0$ 倍所得到的结果”。除了原点之外,坐标轴的倾角与网格线间距全由各自选择的基向量决定。
去除标准方格背景,替换为 Jennifer 的平行四边形斜交网格 03:35
去除标准方格背景,替换为 Jennifer 的平行四边形斜交网格画面重点:空间无内蕴网格,网格只是可视化构造
两套网格叠加对比:原点严格对齐,但轴向与间距截然不同 04:06
两套网格叠加对比:原点严格对齐,但轴向与间距截然不同画面重点:原点 (0,0) 是唯一跨基不变量
[03:24] ↗
我再快速讲讲我是如何表示这些东西的
Let me say a quick word about how I'm representing things here.
[03:27] ↗
在制作二维空间的动画时,我通常使用这样的方形网格
When I animate 2D space, I typically use this square grid.
[03:30] ↗
但是这个网格只是一个框架,提供了一种将坐标系可视化的途径 因此它依赖于我们对基的选择
But that grid is just a construct, a way to visualize our coordinate system, and so it depends on our choice of basis.
[03:38] ↗
空间本身并没有内蕴的网格
Space itself has no intrinsic grid.
[03:42] ↗
詹妮弗可能会画出她自己的网格 它同样是一个人为的框架 也只不过是有助于理解她的坐标含义的可视化工具
Jennifer might draw her own grid, which would be an equally made up construct meant as nothing more than a visual tool to help follow the meaning of her coordinates.
[03:53] ↗
但是,她的原点会和我们的原点重合 因为大家在坐标(0, 0)的含义上达成了共识
Her origin though would actually line up with ours, since everybody agrees on what the coordinates 0,0 should mean.
[04:00] ↗
它就是任何向量乘以0时你所得到的坐标
It's the thing that you get when you scale any vector by 0.
[04:04] ↗
但是她的坐标轴的方向与网格间距会有所不同 这依赖于她对基的选择
But the direction of her axes and the spacing of her grid lines will be different, depending on her choice of basis vectors.

从 Jennifer 译为我方:$P\vec{v}$ 的“反直觉”解惑

⏱ 04:11 – 07:13

若 Jennifer 说一个向量的坐标是 $\begin{bmatrix} -1 \\ 2 \end{bmatrix}$,它在我方坐标系中是多少?按定义直接展开她的话:$-1\vec{b}_1 + 2\vec{b}_2$,再把 $\vec{b}_1 = \begin{bmatrix} 2 \\ 1 \end{bmatrix}$ 与 $\vec{b}_2 = \begin{bmatrix} -1 \\ 1 \end{bmatrix}$ 代入我方坐标计算:$-1\begin{bmatrix} 2 \\ 1 \end{bmatrix} + 2\begin{bmatrix} -1 \\ 1 \end{bmatrix} = \begin{bmatrix} -4 \\ 1 \end{bmatrix}$。

📐 基变换矩阵(Jennifer 语言 → 我方语言)
$$\begin{bmatrix} 2 & -1 \\ 1 & 1 \end{bmatrix} \begin{bmatrix} -1 \\ 2 \end{bmatrix} = (-1)\begin{bmatrix} 2 \\ 1 \end{bmatrix} + 2\begin{bmatrix} -1 \\ 1 \end{bmatrix} = \begin{bmatrix} -4 \\ 1 \end{bmatrix}$$
把 Jennifer 的基向量(用我方坐标书写)排成矩阵各列,这个矩阵左乘她的坐标向量即可直接输出我方坐标。
⚠️ 彻底消除“方向似乎搞反了”的经典困惑
初学者常觉得颠倒:几何上,矩阵 $P = \begin{bmatrix} 2 & -1 \\ 1 & 1 \end{bmatrix}$ 把我方网格变成 Jennifer 的网格(把 $\hat{\imath},\hat{\jmath}$ 送到 $\vec{b}_1,\vec{b}_2$);但数值上,它却把 Jennifer 坐标译成我方坐标!其实完全自洽:当你听到 Jennifer 说 $(-1, 2)$ 时,你脑海先“误解”出自己坐标系里的 $-1\hat{\imath}+2\hat{\jmath}$;因为线性变换保持线性组合不变,应用矩阵 $P$ 后,就把你的误解向量 $-1\hat{\imath}+2\hat{\jmath}$ 顺理成章地变成了 $-1\vec{b}_1+2\vec{b}_2$——也就是她真正想表达的那个物理向量!
用我方坐标计算线性组合 -1*b1 + 2*b2,得出实际坐标 (-4, 1) 04:50
用我方坐标计算线性组合 -1*b1 + 2*b2,得出实际坐标 (-4, 1)画面重点:向量从 Jennifer 语言向我方语言的直接翻译
将过程写成矩阵-向量乘法:矩阵列为 b1 与 b2 的我方坐标 05:22
将过程写成矩阵-向量乘法:矩阵列为 b1 与 b2 的我方坐标画面重点:基变换矩阵 P 的构造方式
几何视角:矩阵 P 将标准方格网线性变换为 Jennifer 的斜网格 05:52
几何视角:矩阵 P 将标准方格网线性变换为 Jennifer 的斜网格画面重点:i-hat 落至 b1,j-hat 落至 b2
消解困惑:P 把我方对 (-1, 2) 的“误解向量”送到 Jennifer 真正指向的向量 07:11
消解困惑:P 把我方对 (-1, 2) 的“误解向量”送到 Jennifer 真正指向的向量画面重点:几何网格变换与数值语言翻译的完美统一
[04:11] ↗
在这一切构建完毕之后 一个很自然的问题是:我们如何在不同坐标系之间进行转化?
So after all this is set up, a pretty natural question to ask is how we translate between coordinate systems.
[04:18] ↗
比如说,如果詹妮弗用坐标(-1, 2)描述一个向量 那么这个向量在我们的坐标系中如何描述?
If for example, Jennifer describes a vector with coordinates negative 1,2, what would that be in our coordinate system?
[04:26] ↗
你如何从她的语言转化到我们的语言?
How do you translate from her language to ours?
[04:29] ↗
她的坐标是说,这个向量是-1乘以b1加上2乘以b2
Well, what her coordinates are saying is that this vector is negative 1 times b1 plus 2 times b2.
[04:39] ↗
从我们的角度来看,b1的坐标为(2, 1),b2的坐标为(-1, 1)
And from our perspective, b1 has coordinates 2,1, and b2 has coordinates negative 1,1.
[04:49] ↗
所以实际上,我们可以直接计算-1乘以b1加上2乘以b2 因为它们都是在我们的坐标系中表示的
So we can actually compute negative 1 times b1 plus 2 times b2 as they're represented in our coordinate system.
[04:58] ↗
计算之后你得到了一个坐标为(-4, 1)的向量
And working this out, you get a vector with coordinates negative 4,1.
[05:03] ↗
我们就是这样来描述她所认为的向量(-1, 2)的
So that's how we would describe the vector that she thinks of as negative 1,2.
[05:08] ↗
这里发生的过程,也就是用某个向量的特定坐标与她的基向量数乘 然后将结果相加,看起来有些眼熟
This process here of scaling each of her basis vectors by the corresponding coordinates of some vector, then adding them together, might feel somewhat familiar.
[05:18] ↗
这就是矩阵向量乘法 这个矩阵的列代表的是用我们的语言表达的詹妮弗的基向量
It's matrix-vector multiplication, with a matrix whose columns represent Jennifer's basis vectors in our language.
[05:26] ↗
实际上,一旦你将矩阵向量乘法理解为应用一个特定的线性变换 也就是我曾提到这个系列中最重要的第三章视频的内容 就会有一种非常直观的方法来考虑这里发生的事
In fact, once you understand matrix-vector multiplication as applying a certain linear transformation, say by watching what I view to be the most important video in this series, chapter 3, there's a pretty intuitive way to think about what's going on here.
[05:40] ↗
一个矩阵的列为詹妮弗的基向量,这个矩阵可以看作一个线性变换 它将我们的基向量i帽和j帽,也就是我们眼中的(1, 0)和(0, 1) 变换为詹妮弗的基向量,也就是她眼中的(1, 0)和(0, 1)
A matrix whose columns represent Jennifer's basis vectors can be thought of as a transformation that moves our basis vectors, i-hat and j-hat, the things we think of when we say 1,0 and 0,1, to Jennifer's basis vectors, the things she thinks of when she says 1,0 and 0,1.
[05:59] ↗
为了演示操作方法 我们来看看对我们所想的向量(-1, 2)应用变换是什么意思
To show how this works, let's walk through what it would mean to take the vector that we think of as having coordinates negative 1,2 and applying that transformation.
[06:08] ↗
在线性变换之前 我们所想的向量是我们的基向量的一种特定线性组合 -1乘以i帽,加上2乘以j帽
Before the linear transformation, we're thinking of this vector as a certain linear combination of our basis vectors, negative 1 times i-hat plus 2 times j-hat.
[06:17] ↗
而线性变换的一个重要特性在于 变换后的向量仍旧是相同的线性组合,不过使用的是新的基向量 -1乘以变换后的i帽,加上2乘以变换后的j帽
And the key feature of a linear transformation is that the resulting vector will be that same linear combination but of the new basis vectors, negative 1 times the place where i-hat lands plus 2 times the place where j-hat lands.
[06:33] ↗
因此这个矩阵所做的 是将我们对詹妮弗的向量的误解,变换为她提到的真正向量
So what this matrix does is transform our misconception of what Jennifer means into the actual vector that she's referring to.
[06:44] ↗
我还记得当初学习这部分内容时,我总是感觉它是颠倒的
I remember that when I was first learning this, it always felt kind of backwards to me.
[06:48] ↗
从几何上说,这个矩阵将我们的网格变换为詹妮弗的网格 但是从数值上说,这是用她的语言来描述转化为用我们的语言来描述
Geometrically, this matrix transforms our grid into Jennifer's grid, but numerically, it's translating a vector described in her language to our language.
[07:01] ↗
最终让我恍然大悟的是 把它看作将我们对詹妮弗的向量的误解 也就是在我们的坐标系中具有相同坐标的向量 变换为她真正想表示的向量
What made it finally click for me was thinking about how it takes our misconception of what Jennifer means, the vector we get using the same coordinates but in our system, then it transforms it into the vector that she really meant.

反向翻译:从我方坐标求 Jennifer 坐标($P^{-1}$)

⏱ 07:15 – 08:49

反过来,开篇时我方坐标为 $\begin{bmatrix} 3 \\ 2 \end{bmatrix}$ 的向量,如何算出它在 Jennifer 坐标系里是 $\begin{bmatrix} 5/3 \\ 1/3 \end{bmatrix}$?答案就是取基变换矩阵 $P$ 的逆矩阵 $P^{-1}$——逆变换在几何上相当于把网格形变动画“倒放”回去。高维空间中通常交由计算机求解逆矩阵。

📐 逆基变换矩阵计算验证
$$P^{-1} = \begin{bmatrix} 2 & -1 \\ 1 & 1 \end{bmatrix}^{-1} = \begin{bmatrix} 1/3 & 1/3 \\ -1/3 & 2/3 \end{bmatrix}, \qquad \begin{bmatrix} 1/3 & 1/3 \\ -1/3 & 2/3 \end{bmatrix} \begin{bmatrix} 3 \\ 2 \end{bmatrix} = \begin{bmatrix} 5/3 \\ 1/3 \end{bmatrix}$$
至此形成完美闭环:$P$ 负责“彼→此”,$P^{-1}$ 负责“此→彼”。
  • $P$(列为新基在我方坐标下的表示):将新基语言向量译为标准语言。
  • $P^{-1}$(基变换矩阵的逆):将标准语言向量译为新基语言。
反问如何由我方坐标 (3, 2) 推出 Jennifer 的坐标 (5/3, 1/3) 07:36
反问如何由我方坐标 (3, 2) 推出 Jennifer 的坐标 (5/3, 1/3)画面重点:引入基变换矩阵求逆
求出逆矩阵 P^-1,其两列为 (1/3, -1/3) 与 (1/3, 2/3) 08:05
求出逆矩阵 P^-1,其两列为 (1/3, -1/3) 与 (1/3, 2/3)画面重点:逆矩阵作为逆向翻译词典
左乘向量 [3, 2]^T 精确算出 Jennifer 坐标 [5/3, 1/3]^T 08:20
左乘向量 [3, 2]^T 精确算出 Jennifer 坐标 [5/3, 1/3]^T画面重点:标准语言向新基语言的数值换算
[07:15] ↗
那相反方向又如何呢?
What about going the other way around?
[07:18] ↗
还是这期视频前期我所使用的例子 在我们的坐标系中,有一个坐标为(3, 2)的向量 我如何计算出它在詹妮弗的坐标系中的坐标为(5/3, 1/3)?
In the example I used earlier this video, when I had the vector with coordinates 3, 2 in our system, how did I compute that it would have coordinates 5 thirds and 1 third in Jennifer's system?
[07:32] ↗
之前的基变换矩阵从詹妮弗的语言转化到我们的语言 你就此入手,取这个矩阵的逆
You start with that change of basis matrix that translates Jennifer's language into ours, then you take its inverse.
[07:43] ↗
记住一点,一个变换的逆是一个新的变换 它将所选的变换逆向进行
Remember, the inverse of a transformation is a new transformation that corresponds to playing that first one backwards.
[07:50] ↗
实践当中,尤其是在超过二维的空间中研究时 你可以用计算机来计算矩阵的逆
In practice, especially when you're working in more than two dimensions, you'd use a computer to compute the matrix that actually represents this inverse.
[07:58] ↗
在这里,对于以詹妮弗的基向量作为列的基变换矩阵 通过计算得出,其逆矩阵的两列为(1/3, -1/3)和(1/3, 2/3)
In this case, the inverse of the change of basis matrix that has Jennifer's basis as its columns ends up working out to have columns 1 third, negative 1 third, and 1 third, 2 thirds.
[08:11] ↗
如果想知道向量(3, 2)在詹妮弗的坐标系下如何表示 我们用这个基变换矩阵的逆乘以向量(3, 2) 结果为(5/3, 1/3)
So, for example, to see what the vector 3, 2 looks like in Jennifer's system, we multiply this inverse change of basis matrix by the vector 3, 2, which works out to be 5 thirds, 1 third.
[08:27] ↗
总而言之 以上就是如何在坐标系之间对单个向量的描述进行相互转化
So that, in a nutshell, is how to translate the description of individual vectors back and forth between coordinate systems.
[08:35] ↗
一个矩阵的列代表的是詹妮弗的基向量,却是用我们的坐标来描述 对于一个向量,这个矩阵将她的语言描述转化为我们的语言描述
The matrix whose columns represent Jennifer's basis vectors but written in our coordinates translates vectors from her language into our language.
[08:46] ↗
逆矩阵则与之相反
And the inverse matrix does the opposite.

翻译线性变换:共轭表达式 $P^{-1}MP$ 与“数学移情”

⏱ 08:51 – 12:32

不仅向量需要坐标,线性变换矩阵同样依赖基的选择。以逆时针旋转 $90^\circ$ 为例,我方矩阵 $M = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}$ 记录的是 $\hat{\imath}$ 和 $\hat{\jmath}$ 的去向;但 Jennifer 需要的旋转矩阵,必须跟踪她的基向量 $\vec{b}_1$、$\vec{b}_2$ 落在何处,且必须用她的语言写出落点坐标(所以绝不能直接把 $M$ 的各列翻译过去)。

解决策略是三步复合接力(按矩阵乘法从右向左阅读):① 先拿任意一个 Jennifer 坐标的向量 $\vec{v}_{\mathcal{B}}$,左乘 $P$ 将其译为我方语言 $P\vec{v}_{\mathcal{B}}$;② 左乘我方变换矩阵 $M$,得到我方语言描述的旋转后向量 $MP\vec{v}_{\mathcal{B}}$;③ 最后左乘 $P^{-1}$,把结果译回 Jennifer 语言 $P^{-1}MP\vec{v}_{\mathcal{B}}$。

📐 90° 旋转在 Jennifer 坐标系下的矩阵表达
$$P^{-1} M P = \begin{bmatrix} 1/3 & 1/3 \\ -1/3 & 2/3 \end{bmatrix} \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 2 & -1 \\ 1 & 1 \end{bmatrix} = \begin{bmatrix} 1/3 & -2/3 \\ 5/3 & -1/3 \end{bmatrix}$$
视频中用 $A$ 记作基变换矩阵(写作 $A^{-1}MA$);该结果接收 Jennifer 语言向量,直接吐出她眼中旋转 $90^\circ$ 后的向量。
💡 终极金句:$A^{-1}MA$ 意味着“数学上的移情(Empathy)”
今后每当你见到形如 $A^{-1}MA$(或 $P^{-1}MP$)的三明治结构时,都要想到这是一种数学上的换位思考:中间的 $M$ 代表你眼中正在发生的操作,外侧的一对 $A$ 与 $A^{-1}$ 代表“走进他人视角,再带着结果回到他人视角”的翻译仪式——整个乘积代表同一个客观变换在别人眼中的样子。
90° 逆时针旋转矩阵 [0, -1; 1, 0] 跟踪 i-hat 与 j-hat 的标准语言去向 09:28
90° 逆时针旋转矩阵 [0, -1; 1, 0] 跟踪 i-hat 与 j-hat 的标准语言去向画面重点:线性变换矩阵对所选基的依赖性
三步翻译流程第 1 步:用基变换矩阵把 Jennifer 坐标向量译成我方语言 10:35
三步翻译流程第 1 步:用基变换矩阵把 Jennifer 坐标向量译成我方语言画面重点:从右到左复合的第一环
完整共轭乘积式 P^-1 M P:外侧负责语言切换,中间 M 负责旋转动作 11:05
完整共轭乘积式 P^-1 M P:外侧负责语言切换,中间 M 负责旋转动作画面重点:三矩阵复合构成 Jennifer 眼中的旋转矩阵
矩阵乘积算出结果列为 (1/3, 5/3) 与 (-2/3, -1/3) 11:40
矩阵乘积算出结果列为 (1/3, 5/3) 与 (-2/3, -1/3)画面重点:同一几何旋转的新基数值表示
总结 A^-1 M A:象征数学中的换位思考与视角转换(Mathematical Empathy) 12:08
总结 A^-1 M A:象征数学中的换位思考与视角转换(Mathematical Empathy)画面重点:全章哲学升华核心图景
[08:51] ↗
不过,向量并不是唯一用坐标表示的东西
But vectors aren't the only thing that we describe using coordinates.
[08:56] ↗
重要的是,接下来的内容里,你需要熟悉矩阵代表线性变换 以及矩阵乘积对应于线性变换复合这两点
For this next part, it's important that you're all comfortable representing transformations with matrices and that you know how matrix multiplication corresponds to composing successive transformations.
[09:06] ↗
如果你觉得并不是那么轻松,一定要停下来,去看看第三章和第四章的内容
Definitely pause and take a look at chapters 3 and 4 if any of that feels uneasy.
[09:13] ↗
考虑某个线性变换,譬如逆时针旋转90°
Consider some linear transformation, like a 90 degree counterclockwise rotation.
[09:18] ↗
你我用矩阵代表它的时候,我们是在跟踪i帽和j帽的去向
When you and I represent this with a matrix, we follow where the basis vectors i-hat and j-hat each go.
[09:26] ↗
i帽在变换后处于坐标(0, 1) 而j帽在变换后处于坐标(-1, 0)
i-hat ends up at the spot with coordinates 0, 1, and j-hat ends up at the spot with coordinates negative 1, 0.
[09:32] ↗
这些坐标也就成为了矩阵的列
So those coordinates become the columns of our matrix.
[09:36] ↗
但是这种表示与我们对基向量的选择密切相关 因为我们跟踪的是i帽和j帽 并且是在我们自己的坐标系中记录它们的去向
But this representation is heavily tied up in our choice of basis vectors, from the fact that we're following i-hat and j-hat in the first place to the fact that we're recording their landing spots in our own coordinate system.
[09:50] ↗
詹妮弗如何描述同样的空间90°旋转呢?
How would Jennifer describe this same 90 degree rotation of space?
[10:00] ↗
你可能会尝试只将旋转矩阵的列转化为用詹妮弗的语言描述
You might be tempted to just translate the columns of our rotation matrix into Jennifer's language.
[10:06] ↗
但是并不尽然
But that's not quite right.
[10:08] ↗
这些列代表的是i帽和j帽的去向
Those columns represent where our basis vectors i-hat and j-hat go.
[10:11] ↗
但是詹妮弗想要的矩阵需要代表她的基向量的去向 并且是用她的语言来描述
But the matrix that Jennifer wants should represent where her basis vectors land, and it needs to describe those landing spots in her language.
[10:21] ↗
这个过程的通常想法是这样的
Here's a common way to think of how this is done.
[10:24] ↗
从詹妮弗的语言描述的任一向量出发
Start with any vector written in Jennifer's language.
[10:27] ↗
首先,我们不用她的语言描述这一过程 而是用基变换矩阵转化为用我们的语言描述 这个矩阵的列代表的是用我们的语言描述的她的基向量
Rather than trying to follow what happens to it in terms of her language, first we're going to translate it into our language using the change of basis matrix, the one whose columns represent her basis vectors in our language.
[10:40] ↗
此时给出的是同样一个向量,不过是用我们的语言来描述的
This gives us the same vector but now written in our language.
[10:44] ↗
然后,将所得结果左乘线性变换矩阵
Then apply the transformation matrix to what you get by multiplying it on the left.
[10:49] ↗
此时给出的是变换后的向量,但仍然是用我们的语言来描述的
This tells us where that vector lands, but still in our language.
[10:54] ↗
所以最后一步 像之前一样将所得结果左乘基变换矩阵的逆 从而得到变换后的向量,然而是用詹妮弗的语言来描述的
So as a last step, apply the inverse change of basis matrix, multiplied on the left as usual, to get the transformed vector but now in Jennifer's language.
[11:04] ↗
因为我们能够对詹妮弗语言描述的任一向量做同样的事 首先应用基变换 然后应用线性变换 最后应用基变换的逆 这三个矩阵的复合给出的就是用詹妮弗语言描述的线性变换矩阵
Since we could do this with any vector written in her language, first applying the change of basis, then the transformation, then the inverse change of basis, that composition of three matrices gives us the transformation matrix in Jennifer's language.
[11:20] ↗
它接收用詹妮弗语言描述的向量 并输出用詹妮弗语言描述的变换后的向量
It takes in a vector of her language and spits out the transformed version of that vector in her language.
[11:26] ↗
对于目前这个特定的例子而言 詹妮弗的基向量用我们的语言来描述,是(2, 1)和(-1, 1) 线性变换是90°旋转 如果你去计算的话,这三个矩阵的乘积的列为(1/3, 5/3)和(-2/3, -1/3)
For this specific example, when Jennifer's basis vectors look like 2, 1 and negative 1, 1 in our language, and when the transformation is a 90 degree rotation, the product of these three matrices, if you work through it, has columns 1 third, 5 thirds, and negative 2 thirds, negative 1 third.
[11:44] ↗
所以,如果詹妮弗用这个矩阵与她的坐标系中的一个向量相乘 结果就是在她的坐标系中描述的该向量旋转90°的结果
So if Jennifer multiplies that matrix by the coordinates of a vector in her system, it will return the 90 degree rotated version of that vector expressed in her coordinate system.
[11:59] ↗
总的来说,每当你看到这样一个表达式:A逆乘以M乘以A 这就暗示着一种数学上的转移作用
In general, whenever you see an expression like A inverse times M times A, it suggests a mathematical sort of empathy.
[12:07] ↗
中间的矩阵代表一种你所见的变换 而外侧两个矩阵代表着转移作用,也就是视角上的转化
That middle matrix represents a transformation of some kind as you see it, and the outer two matrices represent the empathy, the shift in perspective.
[12:17] ↗
矩阵乘积仍然代表着同一个变换,只不过是从其他人的角度来看的
And the full matrix product represents that same transformation but as someone else sees it.
[12:23] ↗
对那些想知道为什么关注坐标系变换的人来说 下期关于特征值和特征向量的视频会给出一个非常重要的实例 到时候再见!
For those of you wondering why we care about alternate coordinate systems, the next video on eigenvectors and eigenvalues will give a really important example of this.

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

Q1. 设新基矩阵 $P = \begin{bmatrix} \vec{b}_1 & \vec{b}_2 \end{bmatrix}$,为什么几何上 $P$ 把标准网格变成新基网格,数值上却是把“新基坐标”变成“标准坐标”?▼
线性变换 $P$ 把 $\hat{\imath}\mapsto\vec{b}_1, \hat{\jmath}\mapsto\vec{b}_2$。当新基观察者说出坐标 $\begin{bmatrix} c_1 \\ c_2 \end{bmatrix}$ 时,我方先误将其当作 $c_1\hat{\imath}+c_2\hat{\jmath}$;左乘 $P$ 利用线性性将其变成 $c_1\vec{b}_1+c_2\vec{b}_2$,恰好还原出该坐标实际代表的向量在我方坐标系中的位置。
Q2. 把我方坐标系下的变换矩阵 $M$ 翻译到新基 $\mathcal{B}$ 下时,为什么直接用 $P^{-1}$ 分别乘以 $M$ 的每一列是错的?▼
矩阵 $M$ 的两列代表的是我方基向量 $\hat{\imath},\hat{\jmath}$ 变换后的去向;而新基下的变换矩阵必须记录新基向量 $\vec{b}_1,\vec{b}_2$ 变换后的去向(且用新基坐标表示)。因此必须经历“新基$\to$标准($P$) $\to$ 变换($M$) $\to$ 新基($P^{-1}$)”三步复合,即 $P^{-1}MP$。
Q3. 如果将某个向量在标准基下记为 $\vec{v}_{\text{std}} = \begin{bmatrix} 3 \\ 2 \end{bmatrix}$,在 Jennifer 基 $P = \begin{bmatrix} 2 & -1 \\ 1 & 1 \end{bmatrix}$ 下记为 $\begin{bmatrix} 5/3 \\ 1/3 \end{bmatrix}$,问两套坐标系在哪个点上坐标数字必然相同?▼
原点 $\begin{bmatrix} 0 \\ 0 \end{bmatrix}$。零向量在任何基下的线性组合系数永远全是 $0$。