1

What's the derivative of $$f(X)=\text{Tr}(YX^{-1})$$ with respect to $X$, where $X$ and $Y$ are square matrices of the same dimension?

My first attempt is to apply the chain rule as: Let $h(X)=X^{-1}$. So, $f(X)=\text{Tr}(Yh(X))$. Hence,

$$\frac{df(X)}{dX}=\frac{\partial f(x)}{\partial h(X)}\cdot\frac{\partial h(X)}{\partial X}= Y \cdot - X^{-2}=-YX^{2}$$

I'm not sure of my answer.

Guess601
  • 161
  • 5

1 Answers1

1

An alternative approach is to use a Taylor expansion approach $$ f(X + \varepsilon M) = tr( Y (X + \varepsilon M)^{-1}) = tr( Y X^{-1} (I + \varepsilon M X^{-1})^{-1}) $$ and $$ (I + \varepsilon M X^{-1})^{-1} = I - \varepsilon M X^{-1} + O(\varepsilon^2) $$ which yields $$ f(X + \varepsilon M) = f(X) - \varepsilon tr( Y X^{-1} M X^{-1} ) + O(\varepsilon^2) $$

user7440
  • 832