0

Given $n \times 1$ vectors $\mathbf{x}$ and $\mathbf{y}$, I need help determining the gradient

$$\nabla_{\mathbf{A}} \left( \mathbf{x}^{T} \left( \mathbf{A} + \mathbf{B} \right)^{-1} \mathbf{y} \right)$$

where $n \times n$ matrices $\mathbf{A}$ and $\mathbf{B}$ are symmetric and positive definite.

I don't believe the matrix cookbook lists this gradient, but it is related to this question. Also, if $\mathbf{A}$ and $\mathbf{B}$ are both symmetric positive definite matrices, then is the following true \begin{align} \frac{\partial \ln (\det(\mathbf{A} + \mathbf{B}))}{\partial \mathbf{A}} = (\mathbf{A} + \mathbf{B})^{-1} ? \end{align} This result is based on the answer to this question.

scj
  • 228

1 Answers1

2

$ \def\L{\lambda} \def\l{\left} \def\r{\right} \def\p{{\partial}} \def\g#1#2{\frac{\p #1}{\p #2}} \def\c#1{\color{red}{#1}} \def\E{{\cal E}} $For typing convenience define the matrix variables $$\eqalign{ M &= M^T = \l(A+B\r) \quad&\implies\quad dM = dA \\ W &= W^T = M^{-1} \quad&\implies\quad dW = -W\,dM\,W \\ }$$ The first function can be analyzed as $$\eqalign{ \phi &= xy^T:W \\ d\phi ​&= xy^T:\l(-W\,dM\,W\r) \\ ​&= -Wxy^TW:dA \\ \g{\phi}{A} &= -Wxy^TW \\ }$$ and the second as $$\eqalign{ ​\L &= \log\det M \\ d\L &= M^{-T}:dM \\ ​&= W:dA \\ \g{\L}{A} &= W \\ }$$ So your proposed formula is correct.


In the steps above a colon denotes the trace/inner product, i.e. $$\eqalign{ A:B &= \sum_{i=1}^m \sum_{j=1}^n A_{ij} B_{ij} \;=\; {\rm Tr}\!\l(AB^T\r) \\ A:A &= \big\|A\big\|_F^2 \\ }$$

greg
  • 40,033