线性代数:矩阵与变换
矩阵基础
一个 矩阵 有 行 列:
矩阵乘法
若 是 矩阵, 是 矩阵,则 是 矩阵:
行列式
矩阵的行列式:
矩阵按第一行展开:
特征值与特征向量
若存在非零向量 使得:
则 为特征值, 为对应的特征向量。
求特征值:解特征方程
矩阵的几何意义
矩阵代表平面线性变换:
| 变换类型 | 矩阵 |
|---|---|
| 旋转角 | |
| x 轴缩放 倍 | |
| 关于 x 轴翻转 |
Manim 示例:矩阵变换可视化
from manim import *
class MatrixTransform(LinearTransformationScene):
def __init__(self, **kwargs):
super().__init__(
show_basis_vectors=True,
**kwargs
)
def construct(self):
matrix = [[0, -1], [1, 0]] # 旋转 90°
label = MathTex(
r"A = \begin{pmatrix}0 & -1\\ 1 & 0\end{pmatrix}"
).to_corner(UL)
self.add(label)
self.apply_matrix(matrix)
self.wait()