Origin of the formula $\partial\log\det X=\operatorname{Tr}\left(X^{-1}\partial X\right) $

116 Views Asked by At

I found that for any first order differential operator $\partial $ acting on a square matrix $X$ we have

$$\partial\log\det X=\operatorname{Tr}\left(X^{-1}\partial X\right) $$

I'm quite sure it origins from $$ \det(\exp (X))=\exp (\operatorname{Tr}(X)) $$ But I get lost with the operator. I don't get how we can insert the differential inside the trace. Can anybody help?

2

There are 2 best solutions below

0
On

I guess I found the answer since it is a known property of the trace that $$ \partial \operatorname{Tr}\left(X \right) =\operatorname{Tr}\left(\partial X \right).$$ Then you have a straightforward computation from $$ \det(\exp ( X))=\exp (\operatorname{Tr}(X)), $$ you have $$ \det(\exp (\log X))=\exp (\operatorname{Tr}(\log X)), $$ applying the logarithm $$ \log \det( X)= \operatorname{Tr}(\log X), $$ and therefore deriving $$\partial \log \det( X)= \operatorname{Tr}( X^{-1} \partial X) $$

0
On

Hint For an arbitrary square matrix $Y$, we have $$\partial_{\epsilon} \log \det (X + \epsilon Y)\vert_0 = \left. \frac{\partial_\epsilon \det(X + \epsilon Y)}{\det (X + \epsilon Y)} \right\vert_0 = \left.\frac{\partial_\epsilon \det(X + \epsilon Y)}{\det X}\right\vert_0 = \partial_{\epsilon} \det (I + \epsilon X^{-1} Y) \vert_0.$$ On the other hand, expanding in a power series about $\epsilon = 0$ gives $$\det (I + \epsilon Z) = I + \epsilon \operatorname{tr} Z + O(\epsilon^2) .$$