Why is $\frac{\partial \operatorname{Tr}(\mathbf X^n)}{\partial \mathbf X}=n\left(\mathbf X^{n-1}\right)^T ?$

84 Views Asked by At

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?

1

There are 1 best solutions below

1
On

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 }$$