Let $X$ be a square invertible $n \times n$ matrix. Calculate the derivative of the following function with respect to X.
$$ g(X)=\operatorname{tr}\left(X^{-1}\right) $$
I'm stumped with this. As when I work through it I use these two identities.
- $$\frac{\partial}{\partial \boldsymbol{X}} \boldsymbol{f}(\boldsymbol{X})^{-1}=-\boldsymbol{f}(\boldsymbol{X})^{-1} \frac{\partial \boldsymbol{f}(\boldsymbol{X})}{\partial \boldsymbol{X}} \boldsymbol{f}(\boldsymbol{X})^{-1}$$
and 2. $$ \frac{\partial}{\partial \boldsymbol{X}} \operatorname{tr}(\boldsymbol{f}(\boldsymbol{X}))=\operatorname{tr}\left(\frac{\partial \boldsymbol{f}(\boldsymbol{X})}{\partial \boldsymbol{X}}\right) $$
I should arrive at the solution. using 1. I get $$d/dX(X^{-1}) = -X^{-1}\otimes X^{-1}$$. So the answer should be the trace of that right? which = $$tr(-X^{-1})tr(X^{-1}).$$
but the solution seems to be $$-X^{-2T}$$? which I can't see