矩阵迹的性质
# 矩阵迹的性质
2021-08-16
Tags: #Trace #Matrix #Math
标量可以直接套上迹: $a=\operatorname{tr}(a)$
$\mathrm{tr}AB = \mathrm{tr}BA$ ^tracecommutative
左边: $$ \begin{align} &\sum^n_i a_{1i}b_{i1}+\sum^n_i a_{2i}b_{i2}+\cdots+\sum^n_i a_{mi}b_{im} \\ = &\sum^m_j\sum^n_ia_{ji}b_{ij} \\ = &\sum^m_i\sum^n_j a_{ij}b_{ji} \end{align} $$ 右边: $$ \begin{align} &\sum^m_i b_{1i}a_{i1}+\sum^m_i b_{2i}a_{i2}+\cdots+\sum^m_i b_{ni}a_{in} \\ = &\sum^n_j\sum^m_i b_{ji}a_{ij} \\ = &\sum^m_i\sum^n_j a_{ij}b_{ji} \end{align} $$
左边=右边
上面的式子其实就相当于把A,B其中一个翻过来, 和另一个叠在一起, 对应位置乘起来, 再加起来:
推广: 只要"环形的"顺序不变, 矩阵相乘的迹就不变 $$\mathrm{tr}ABC = \mathrm{tr}CAB = \mathrm{tr}BCA$$ $$\mathrm{tr}ABCD = \mathrm{tr}DABC = \mathrm{tr}CDAB = \mathrm{tr}BCDA$$
- 对于方阵, 还有以下性质:
- $\mathrm{tr}A=\mathrm{tr}A^T \Rightarrow$ 因为旋转轴不变
- flip the matrix around its rotary line, which is the “trace line”, and the “trace line” is the only thing that doesn’t change when flipping the matrix.
- $\mathrm{tr}(A+B)=\mathrm{tr}A+\mathrm{tr}B$
- $\mathrm{tr}(aA)=a\mathrm{tr}A$
- $\mathrm{tr}A=\mathrm{tr}A^T \Rightarrow$ 因为旋转轴不变