Cyan's Blog

Search

Search IconIcon to open search

矩阵迹的性质

Last updated Aug 16, 2021 Edit Source

# 矩阵迹的性质

2021-08-16

Tags: #Trace #Matrix #Math

左边: $$ \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$$