[再寄小读者之数学篇](2014-05-27 矩阵的迹与 Jacobian)
(from MathFlow) 设 $A=(a_{ij})$, 且定义 $$\bex \n_A f(A)=\sex{\cfrac{\p f}{\p a_{ij}}}. \eex$$ 试证: (1) $\n_A\tr (AB)=B^t$; (2) $\n_A \tr(ABA^tC)=CAB+C^tAB^t$.
证明: (1) $$\beex \bea \n_A\tr (AB) &=\sex{\cfrac{\p }{\p a_{ij}}\sum_{m,n}a_{mn}b_{nm}}\\ &=\sex{\sum_{m,n} \delta_{mi}\delta_{nj}b_{nm}}\\ &=\sex{b_{ji}}\\ &=B^t. \eea \eeex$$ (2) $$\beex \bea \n_A\tr (ABA^tC) &=\sex{\cfrac{\p }{\p a_{ij}} \sum_{m,n,p,q} a_{mn}b_{np}a_{qp}c_{qm} }\\ &=\sex{ \sum_{m,n,p,q} \delta_{mi}\delta_{nj}b_{np}a_{qp}c_{qm} +\sum_{m,n,p,q} a_{mn}b_{np}\delta_{qi}\delta_{pj}c_{qm} }\\ &=\sex{ \sum_{p,q} b_{jp}a_{qp}c_{qi} +\sum_{m,n} a_{mn}b_{nj}c_{im} }\\ &=\sex{ \sum_{p,q} c_{qi}a_{qp}b_{jp} +\sum_{m,n} c_{im}a_{mn}b_{nj} }\\ &=C^tAB^t+CAB. \eea \eeex$$