Multivariate calculus: how to differentiate the trace of inverse

74 Views Asked by At

Let $C$ be $m \times n$.

Let $\Sigma$ be $n \times n$ and symmetric. Note that $C \Sigma C^T$ will also be symmetric in this case .

Also let $A$ be $m \times m$.

I am faced the following:

$$\frac{\partial \operatorname{tr}( [C \Sigma C^T]^{-1}A)}{\partial C}$$

and

$$\frac{\partial \operatorname{tr}( [C \Sigma C^T]^{-1}A)}{\partial \Sigma}$$

I read the matrix cookbook but I am still having trouble to solve these 2 quantities. Can someone kindly guide me through this please ?

1

There are 1 best solutions below

2
On BEST ANSWER

Let $$\eqalign{ M &= C\Sigma C^T \cr B &= M^{-1}AM^{-1} \cr }$$ Write the function and its differential in terms of these new variables $$\eqalign{ f &= A:M^{-1} \cr\cr df &= -A:(M^{-1}\,dM\,M^{-1}) \cr &= -B:dM \cr &= -B:(dC\,\Sigma C^T+C\Sigma\,dC^T+C\,d\Sigma\,C^T) \cr &= -(BC\Sigma+B^TC\Sigma):dC - (C^TBC):d\Sigma \cr }$$ The colon denotes the inner/Frobenius product, which is a compact infix notation for the trace $$X:Y={\rm tr}(X^TY)$$


The respective gradients are seen to be $$\eqalign{ \frac{\partial f}{\partial C} &= -(B+B^T)\,C\Sigma \cr\cr \frac{\partial f}{\partial\Sigma} &= -C^TBC \cr\cr }$$