3

How to calculate the gradient with respect to $A$ of $\log(\det(AX))$?

Here, $X$ and $A$ are positive definite matrixes, and $\det$ is the determinant.

How to calculate this? Or, what is the result? Thanks!

percep
  • 31
  • 1
  • 2
  • 1
    $\log\det (A X)= \text{tr}(\log (A X))= \text{tr}(\log A+\log X)$ – polfosol Oct 04 '16 at 15:22
  • @polfosol relevant? Prove $\frac{\partial \rm{ln}|X|}{\partial X} = 2X^{-1} - \rm{diag}(X^{-1})$.. Here I say 'We first note that for the case where the elements of X are independent, a constructive proof involving cofactor expansion and adjoint matrices can be made to show that $\frac{\partial ln|X|}{\partial X} = X^{-T}$ (Harville). This is not always equal to $2X^{-1}-diag(X^{-1})$. The fact alone that X is positive definite is sufficient to conclude that X is symmetric and thus its elements are not independent.' – BCLC Apr 16 '21 at 10:04

2 Answers2

5

Using $\frac{\partial}{\partial \pmb{A}} \text{log(det(}\pmb{A}\text{))} = \pmb{A}^{-T} $ and $\text{log(det(}\pmb{A}\pmb{X}\text{))} = \text{log(det(}\pmb{A}\text{)det(}\pmb{X}\text{)))} = \text{log(det(}\pmb{A}\text{))} + \text{log(det(}\pmb{X}\text{))}$, then $\frac{\partial}{\partial \pmb{A}} \text{log(det(}\pmb{A}\pmb{X}\text{))} = \pmb{A}^{-T} $

Ahmad Bazzi
  • 12,076
  • relevant? Prove $\frac{\partial \rm{ln}|X|}{\partial X} = 2X^{-1} - \rm{diag}(X^{-1})$.. Here I say 'We first note that for the case where the elements of X are independent, a constructive proof involving cofactor expansion and adjoint matrices can be made to show that $\frac{\partial ln|X|}{\partial X} = X^{-T}$ (Harville). This is not always equal to $2X^{-1}-diag(X^{-1})$. The fact alone that X is positive definite is sufficient to conclude that X is symmetric and thus its elements are not independent.' – BCLC Apr 16 '21 at 10:04
3

If $(A,X)$ were rectangular matrices, then assuming that $M=AX$ is non-singular, you could proceed this way $$\eqalign{\cr f &= \log\det M \cr\cr df &= d\log\det M \cr &= d\operatorname{tr}log M \cr &= M^{-T}:dM \cr &= M^{-T}:dA\,X \cr &= M^{-T}X^T:dA \cr &= (X^TA^T)^{-1}X^T:dA \cr\cr \frac{\partial f}{\partial A} &= (X^TA^T)^{-1}X^T \cr\cr }$$

frank
  • 316
  • relevant? Prove $\frac{\partial \rm{ln}|X|}{\partial X} = 2X^{-1} - \rm{diag}(X^{-1})$.. Here I say 'We first note that for the case where the elements of X are independent, a constructive proof involving cofactor expansion and adjoint matrices can be made to show that $\frac{\partial ln|X|}{\partial X} = X^{-T}$ (Harville). This is not always equal to $2X^{-1}-diag(X^{-1})$. The fact alone that X is positive definite is sufficient to conclude that X is symmetric and thus its elements are not independent.' – BCLC Apr 16 '21 at 10:04