大家好,欢迎来到IT知识分享网。
矩阵迹的有关公式
1. 迹的定义
设矩阵 A = [ a i j ] A=[ a_{ij}] A=[aij]为大小为 n × n n\times n n×n的矩阵,矩阵 A A A的迹定义如下:
t r ( A ) = ∑ i = 1 n a i i tr(A)=\sum_{i=1}^{n} a_{ii} tr(A)=i=1∑naii
2. 常用公式
公式1:两个矩阵乘积的迹: t r ( A B ) = t r ( B A ) tr(AB) = tr(BA) tr(AB)=tr(BA)
公式2:三个矩阵乘积的迹:
t r ( A B C ) = t r ( C A B ) = t r ( B C A ) tr(ABC) = tr(CAB) = tr(BCA) tr(ABC)=tr(CAB)=tr(BCA)
公式3: t r ( A ) = t r ( A T ) tr(A) = tr(A^T) tr(A)=tr(AT)
3. 迹的求导
公式4 矩阵乘积的迹的求导:
∂ t r ( A B ) ∂ A = ∂ t r ( B A ) ∂ A = B T \frac{\partial tr(AB)}{\partial A} = \frac{\partial tr(BA)}{\partial A} = B^T ∂A∂tr(AB)=∂A∂tr(BA)=BT
公式5 矩阵转置乘积的求导:
∂ t r ( A T B ) ∂ A = ∂ t r ( B A T ) ∂ A = B \frac{\partial tr(A^TB)}{\partial A} = \frac{\partial tr(BA^T)}{\partial A} = B ∂A∂tr(ATB)=∂A∂tr(BAT)=B
公式6 包含两个变量矩阵的求导(自身及转置):
∂ t r ( A B A T C ) ∂ A = C A B + C T A B T \frac{\partial tr(ABA^TC)}{\partial A} = CAB + C^TAB^T ∂A∂tr(ABATC)=CAB+CTABT
证明:
分布求导,可得:
∂ t r ( A B A T C ) ∂ A = ∂ t r ( A B A T C ) ∂ A + ∂ t r ( A T C A B ) ∂ A \frac{\partial tr(ABA^TC)}{\partial A} =\frac{\partial {tr(ABA^TC)}}{\partial{A}} + \frac{\partial{tr(A^TCAB)}}{\partial{A}} ∂A∂tr(ABATC)=∂A∂tr(ABATC)+∂A∂tr(ATCAB)
又
∂ t r ( A B A T C ) ∂ A = ( B A T C ) T = C T A B T \frac{\partial {tr(ABA^TC)}}{\partial{A}} = (BA^TC)^T=C^TAB^T ∂A∂tr(ABATC)=(BATC)T=CTABT
且
∂ t r ( A T C A B ) ∂ A = C A B \frac{\partial{tr(A^TCAB)}}{\partial{A}} = CAB ∂A∂tr(ATCAB)=CAB
所以,
∂ t r ( A B A T C ) ∂ A = C A B + C T A B T \frac{\partial tr(ABA^TC)}{\partial A} = CAB + C^TAB^T ∂A∂tr(ABATC)=CAB+CTABT
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/151235.html