Derivative of Matrix in Determinant If we have A, B, and X are all matrices, can we find the derivative of
$$
\frac{d}{dX} det(AXB).
$$
I notice that
$$
\frac{d}{dX}det(X) = det(X)X^{-T},
$$
but I don't know how to pass into the $AXB$. Can anyone help me with this problem?
I also notice that
$$
\frac{d}{dX} AXB = A \otimes B^T
$$
and if we assume
$$
Y(X) = AXB,
$$
then we can have
$$
\frac{d}{dX}Y(X) = det(Y(X))[Y(X)]^{-T} \frac{d}{dX}Y(X).
$$
Then I find there is a problem that the size of matrices is not matched with $[Y(X)]^{-T}$ and $\frac{d}{dX}Y(X)$. So I am wondering whether the chain rule in here is not correct?
 A: $
\def\o{{\tt1}}\def\p{\partial}
\def\L{\left}\def\R{\right}
\def\LR#1{\L(#1\R)}
\def\BR#1{\Big(#1\Big)}
\def\trace#1{\operatorname{Tr}\LR{#1}}
\def\qiq{\quad\implies\quad}
\def\grad#1#2{\frac{\p #1}{\p #2}}
\def\c#1{\color{red}{#1}}
$The proposed derivative formula is missing a transpose. It should read
$$\eqalign{
\grad{\det(M)}{M} = \det(M)\,M^{-T} \\
}$$
One can turn this into the corresponding formula for the differential of the determinant
$$\eqalign{
d\det(M) = \BR{\det(M)\,M^{-T}}:dM \\
}$$
where $(:)$ denotes the Frobenius product, which is a concise
notation for the trace
$$\eqalign{
A:B &= \sum_{i=1}^m\sum_{j=1}^n A_{ij}B_{ij} \;=\; \trace{A^TB} \\
A:A &= \big\|A\big\|^2_F \\
}$$
Now substitute
$$\eqalign{
M = AXB \qiq \c{dM = A\,dX\,B} \\
}$$
into the differential and recover the gradient
$$\eqalign{
d\det(M) &= \BR{\det(M)\,M^{-T}}:\c{\LR{A\,dX\,B}} \\
  &= \BR{\det(M)\,A^TM^{-T}B^T}:dX \\
\grad{\det(M)}{X}
  &= \det(M)\;A^TM^{-T}B^T \\
}$$
or in terms of the original variables
$$\eqalign{
\grad{\det(AXB)}{X} &= \det(AXB)\;A^T\LR{AXB}^{-T}B^T \\
}$$
Note that this result holds even when $\{A,B\}$ are rectangular.
