2
$\begingroup$

Why is $\frac{\partial \operatorname{Tr}(\mathbf X^n)}{\partial \mathbf X}=n\left(\mathbf X^{n-1}\right)^T ?$ and why is $\frac{\partial (\ln[\det(\mathbf X)])}{\partial \mathbf X}=\mathbf X^{-T} ?$

I have found lots of website and information about them, matrix cook book for example, but they just tell me the result, not the proof. Does anyone know how to prove them?

$\endgroup$
  • $\begingroup$ The first formula comes from computing $tr[(X + \delta X)^n]$ and isolating the first-order term $tr(nX^{n-1} \delta X)$. The second can be computed element wise using standard formula for the determinant, and observing that when you rearrange into a matrix you get $adj(A) / |A|$ where $adj$ denotes the adjugate matrix. $\endgroup$ – guy Oct 11 '18 at 13:37
  • $\begingroup$ Note that the formula for the derivative of the determinant is known as Jacobi's formula. Hence, using the chain rule, $$ \frac{\partial \ln\det X}{\partial X} = \frac{\partial \ln\det X}{\partial \det X}\frac{\partial \det X}{\partial X} = \frac{1}{\det X}( \det X)\, X^{-\top} $$ $\endgroup$ – Harry49 Oct 11 '18 at 16:48
  • $\begingroup$ @guy do you know how to prove it? $\endgroup$ – shineele Oct 12 '18 at 0:20
  • $\begingroup$ @shineele I explained how to prove both claims. If that isn’t enough for you to fill in the details then sorry, but I don’t have the desire to write up a proof with all the details you apparently need. It may be helpful for you to look up how matrix differentials can be used to compute matrix derivatives. $\endgroup$ – guy Oct 12 '18 at 3:24
2
$\begingroup$

The first formula was addressed in @guy's comment; here's a non-rigorous proof of the second.

For any matrix, the trace is just the sum of the eigenvalues, and the determinant is their product, so $${ \exp\big({\rm tr}(X)\big) = \exp\Big(\sum_k\lambda_k\Big) = \prod_k\Big(\exp(\lambda_k)\Big) = \det\big(\exp(X)\big) }$$ If the determinant is not zero, take the logarithm of both sides $$\log(\det(\exp(X))) = {\rm tr}(X)$$ Assume that a matrix $Y$ exists such that $X=\log(Y) \implies Y=\exp(X)$
Then $$\eqalign{ \log(\det(Y)) &= {\rm tr}(\log(Y)) \cr d\log(\det(Y)) &= d{\,\rm tr}(\log(Y)) = {\rm tr}(Y^{-1}\,dY) \cr \frac{\partial\log\det Y}{\partial Y} &= Y^{-T} \cr }$$

$\endgroup$
  • $\begingroup$ Why will $tr(Y^{-1})=Y^{-T}$? $\endgroup$ – shineele Oct 12 '18 at 0:40

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.