矩阵乘法与复合变换
矩阵乘法就是函数复合。乘积 AB 表示先应用 B 再应用 A,因此因子顺序会改变几何结果。
6 分钟难度 2/3交互演示区域不展示广告。
AShear xBRotate 90°det(AB)1.00Order mattersYes
AB = [0.80, -1.00; 1.00, 0.00] · (AB)x = A(Bx)
First apply B (cyan square), then A (amber square). Swapping the factors changes the combined map.
Matrix multiplication is composition. The cyan square is B applied to the original square; the amber square is A applied to that result. Swap the factors to see why AB and BA usually differ.
你看到的是什么
1
从点 x 开始,映射 B 把它送到 Bx,然后 A 把结果送到 A(Bx)。
2
乘积 AB 的定义使得 (AB)x = A(Bx)。它的列就是 A 作用在 B 的列上。
3
矩阵乘法通常不满足交换律:AB 和 BA 可能产生不同的变换。
为什么重要
复合解释了图形管线、机器人、坐标变换,以及为什么矩阵顺序在线性代数和编程中很重要。
复杂度与细节
对 2×2 矩阵,两个矩阵相乘为 O(1),把结果作用到点也是 O(1)。
常见问题
为什么顺序很重要?+
矩阵乘法是函数复合。先旋转再错切,通常不等于先错切再旋转。
AB 在几何上意味着什么?+
它是与“先 B 后 A”效果相同的单个矩阵。中间的方块显示 B,最终方块显示 AB。