Confusion related to calculation of gradient I have this confusion about the calculation of gradient
How is the following expression derived
$\nabla_{\Lambda}(tr(\Lambda^{-1}U)) = -\Lambda^{-1}U\Lambda^{-1}$
I could only get $-U\Lambda^{-1}\Lambda^{-1}$
 A: The correct way to do this is something like this. To compute the derivative of $X^{-1}$, you write, for small $\epsilon>0$, 
$$ (X+\epsilon B)^{-1} \approx (X^{-1}+\epsilon Y) \quad\Leftrightarrow\quad (X+\epsilon B)(X^{-1}+\epsilon Y)\approx I\\ \Leftrightarrow XX^{-1}+\epsilon(BX^{-1}+XY)=I\quad\Leftrightarrow\quad Y = -X^{-1}B X^{-1}. $$
So for the trace, what you do is modify $X$ by a small arbitrary matrix:
$$ \mathop{\mathrm{tr}}((X+\epsilon B)^{-1}A) - \mathop{\mathrm{tr}}(X^{-1}A), $$
and write the result in the form
$$ \mathop{\mathrm{tr}}(B\times \mathrm{whatever}), $$
because $\partial_{B_{ij}}\mathop{\mathrm{tr}}(BC)=C_{ji}$, so $\nabla_B\mathop{\mathrm{tr}}(BA) = A^t$ (but $B$ has to be on the left of the product inside the trace for straightforward reasons).
I hope this is enough of a hint. Also, I think your expression might be missing some transposes.
A: Let $f:\Lambda\rightarrow tr(\Lambda^{-1}U)$. Then the derivative is
 $Df_{\Lambda}:H\rightarrow tr(-\Lambda^{-1}H\Lambda^{-1}U)=tr(-\Lambda^{-1}U\Lambda^{-1}H)$.
Now, a gradient is associated to a scalar product $(.,.)$. One takes this one: $(U,W)=tr(U^TW)$; then $\nabla_{\Lambda}(f)$ is the vector $V$ s.t., for every $H$, $(V,H)=Df_{\Lambda}(H)$.
Conclusion: $\nabla_{\Lambda}(f)=-(\Lambda^{-1}U\Lambda^{-1})^T$.
