How can I find the derivative of the following two functions with respect to X.
$tr((A + XBX' + CX' + XD)^{-1}E)$
log$|(A + XBX' + CX' + XD)|$
where $A$, $B$ and $E$ are positive definite matrices.
How can I find the derivative of the following two functions with respect to X.
$tr((A + XBX' + CX' + XD)^{-1}E)$
log$|(A + XBX' + CX' + XD)|$
where $A$, $B$ and $E$ are positive definite matrices.
Copyright © 2021 JogjaFile Inc.
Define some new matrix variables for convenience $$\eqalign{ Y &= A + XBX^T + CX^T + XD \cr dY &= dX\,BX^T + +XB\,dX^T + C\,dX^T + dX\,D \cr W &= Y^{-1}EY^{-1} \cr }$$ Find the differential and gradient of the first function $$\eqalign{ f &= {\rm tr}(Y^{-1}E) = E^T:Y^{-1} \cr\cr df &= E^T:dY^{-1} \cr &= -E^T:Y^{-1}\,dY\,Y^{-1} \cr &= -W^T:dY \cr &= -W^T:(dX\,BX^T + XB\,dX^T + C\,dX^T + dX\,D) \cr &= -(W^TXB^T + WXB + WC + W^TD^T):dX \cr\cr \frac{\partial f}{\partial X} &= -(W^TXB^T + WXB + WC + W^TD^T) \cr }$$ Do the same for the second function -- the algebra is very similar just replace $(-W)$ with $Y^{-1}$ in the final steps $$\eqalign{ s &= \log\det Y \cr\cr ds &= d\log\det Y \cr &= d{\rm tr}(\log Y) \cr &= Y^{-T}:dY \cr &= Y^{-T}:(dX\,BX^T + XB\,dX^T + C\,dX^T + dX\,D) \cr &= (Y^{-T}XB^T + Y^{-1}XB + Y^{-1}C + Y^{-T}D^T):dX \cr\cr \frac{\partial s}{\partial X} &= Y^{-T}XB^T + Y^{-1}XB + Y^{-1}C + Y^{-T}D^T \cr\cr }$$ In these derivations, a colon was used to represent the inner/Frobenius product, which is merely an alternative notation for the trace, i.e. $$A:BC={\rm tr}(A^TBC)$$ The properties of the trace give rise to lots of rules for rearranging the Frobenius product, such as $$\eqalign{ A:BC &= B^TA:C \cr &= AC^T:B \cr &= BC:A \cr &= A^T:(BC)^T \cr }$$