Derivative of trace involving inverse and Hadamard product

450 Views Asked by At

Let $A, B$ be symmetric $(n \times n)$ matrices and let $A$ be invertible. I am looking for the derivative $$ \frac{\partial}{\partial A} \operatorname{tr}[A^{-1}(A \odot B)], $$ where $\odot$ is the Hadamard product. I guess the result is something like $$ -A^{-2}(A \odot B) + A^{-1}(I \odot B), $$ where $I$ is the $(n \times n)$ identity matrix, but that's not quite correct. Any hints?

1

There are 1 best solutions below

0
On BEST ANSWER

Let's use a colon (:) to denote the trace/Frobenius product $$A:B = {\rm tr}(A^TB)$$ Write the function in terms of this product. Then find its differential and gradient $$\eqalign{ \phi &= A^{-1}:B\odot A \cr\cr d\phi &= A^{-1}:B\odot dA + B\odot A:dA^{-1} \cr &= B\odot A^{-1}:dA - B\odot A:A^{-1}\,dA\,A^{-1} \cr &= (B\odot A^{-1} - A^{-1}(B\odot A)A^{-1}):dA \cr\cr \frac{\partial\phi}{\partial A} &= B\odot A^{-1} - A^{-1}(B\odot A)A^{-1} \cr }$$ It helps to know a few rules for manipulating Frobenius/Hadamard products $$\eqalign{ A:B &= B:A \cr A\odot B &= B\odot A \cr A:(B\odot C) &= (A\odot B):C\cr }$$