Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Denote $f(X)=\operatorname{trace}{(AX^TB+C)^{-1}D}$ and A,B,C,D are the constant matrix, X is the $R^{m*n}$ matrix.

How to prove $df(X)/dX=-B(AX^TB+C)^{-1}D(AX^TB+C)^{-1}A$

I don't know the method when X in the block of inverse operator.

share|cite|improve this question
Welcome to math.SE: since you are new, I wanted to let you know a few things about the site. In order to get the best possible answers, it is helpful if you say in what context you encountered the problem, and what your thoughts on it are; this will prevent people from telling you things you already know, and help them give their answers at the right level. If this is homework, please add the homework tag; people will still help, so don't worry. – Julian Kuelshammer Oct 28 '12 at 18:05
up vote 0 down vote accepted

I find it best to resort to indexes, adopting Einstein's notation. First, using $$ ( A X^\top B +C)^{-1} ( A X^\top B +C) = 1 $$ and differentiating with respect to $X_{ij}$:

$$ 0= \left( \frac{\mathrm{d}}{\mathrm{d} X_{i j}} \left( A X^\top B +C\right)^{-1}_{pq} \right) ( A X^\top B +C)_{qr} + \left( A X^\top B +C\right)^{-1}_{pq} \underbrace{\frac{\mathrm{d}}{\mathrm{d} X_{i j}} ( A X^\top B +C)_{qr}}_{A_{qj} B_{ir}} $$ Hence: $$ \left( \frac{\mathrm{d}}{\mathrm{d} X_{i j}} \left( A X^\top B +C\right)^{-1}_{pq} \right) = -\left(\left( A X^\top B +C\right)^{-1} A\right)_{pj} \left(B \left( A X^\top B +C\right)^{-1} \right)_{iq} $$ Therefore: $$\begin{eqnarray} \frac{\mathrm{d} f(X)}{\mathrm{d} X_{ij}} &=& \frac{\mathrm{d} }{\mathrm{d} X_{ij}} \left( A X^\top B +C\right)^{-1}_{pq} D_{qp} \\ &=& -\left(\left( A X^\top B +C\right)^{-1} A\right)_{pj} \left(B \left( A X^\top B +C\right)^{-1} \right)_{iq} D_{qp} \\ &=& -\left(\left( A X^\top B +C\right)^{-1} A\right)_{pj} \left(B \left( A X^\top B +C\right)^{-1} D \right)_{ip} \\ &=& - \left(B \left( A X^\top B +C\right)^{-1} D \left( A X^\top B +C\right)^{-1} A\right)_{ij} \end{eqnarray} $$ In other words: $$ \frac{\mathrm{d} f(X)}{\mathrm{d} X} = -B \left( A X^\top B +C\right)^{-1} D \left( A X^\top B +C\right)^{-1} A $$

share|cite|improve this answer
Thanks very much.Do you have some docs talk about Einstein's notation ? – pl8787 Oct 29 '12 at 6:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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