5

From Eq. 51 of the matrix cookbook we know that

$\frac{\partial \log\det (AXB)}{\partial X} = (X^{-1})^\top$,

where $\det(X)$ is the determinant of $X$.

I was wondering what is the derivative of $\frac{\partial \log\det (AXB + C)}{\partial X}$. Is it still $ (X^{-1})^\top$?

Thanks!

1 Answers1

5

Define the matrix variable $$\eqalign{ Y &= AXB+C \cr }$$ Write the function in terms of this new variable, then find its differential and gradient $$\eqalign{ \phi &= \log\det Y \cr d\phi &= Y^{-T}:dY = Y^{-T}:A\,dX\,B = A^TY^{-T}B^T:dX \cr \frac{\partial\phi}{\partial X} &= A^TY^{-T}B^T = \Big(B(AXB+C)^{-1}A\Big)^T \cr }$$ When $(C=0)$ and $(A,B)$ are invertible, this reduces to the result that you found in the cookbook.

In some of the steps above, a colon was used to denote the trace/Frobenius product, i.e. $$A:B = {\rm tr}(A^TB)$$

greg
  • 40,033
  • 1
    thanks @greg, your response is really helpful! I want to learn the basic knowledge of matrix calculus (e.g., the mathematical tools you used above) Do you have any textbook/tutorial/materials recommendation? – user3138073 May 23 '18 at 18:22
  • Related: math.stackexchange.com/questions/1493137 ? – BCLC Apr 17 '21 at 10:55
  • 1
    @BCLC No, this question has no symmetry constraint. I've posted several times on the annoying topic of symmetric/structured gradients. Here is my latest. – greg Apr 17 '21 at 12:02