Scalar derivative of ${\rm tr}~[A(x)\log A(x)]$ where $A(x)$ is a square matrix

900 Views Asked by At

How do i proceed to calculate

$$\frac{d}{dx}{\rm tr}\left[{A(x) \log A(x)}\right]$$

where $A(x) \in \mathbb{M}(n)$ and $x \in \mathbb{R}$?

The $\log$ function is the one defined by the exponential map for matrices in the following sense: If $A=e^B$ then $B=\log A$, where $e ^X \equiv \sum_{k=0}^\infty X^k / k! $. The multiplication between $A$ and $\log A$ is matrix multiplication.

Further assume that $A(x)$ are diagonalizable and nonsingular.

This problem arises in a statistical physics model where $A(x)$ is a density matrix depending on a scalar quantity and the trace expression is the (von Neumann) entropy. I tried to find it on the net but no luck and i got confused with the literature on matrix derivatives that are usually for derivation with respect to another matrix or with respect to a vector. Thanks anyone!

2

There are 2 best solutions below

8
On BEST ANSWER

You just carry out the chain rule as you would normally. $$ \frac{d}{dx}{\rm tr}\left[{A(x) \log A(x)}\right] = {\rm tr} [A'(x)\log A(x) + A(x)A^{-1}(x)A'(x)]$$ See here.

0
On

We assume that $A(x)$ has no eigenvalues in $(-\infty,0]$ and $\log$ denotes the principal logarithm. Since $g(A)=\log(A)$ is a matrix function, (E): $\log(A)$ is a polynomial in $A$. Let $P$ be a polynomial and $f:x\rightarrow tr(P(A)\log(A))$. According to (E), $f'(x)=tr(P'(A)\log(A)A')+tr(P(A)Dg_A(A'))$.

Now $Dg_A(A')=\int_0^1(t(A-I)+I)^{-1}A'(t(A-I)+I)^{-1}dt$; then $tr(P(A)Dg_A(A'))=\int_0^{1}tr(P(A)(t(A-I)+I)^{-1}A'(t(A-I)+I)^{-1})dt=\int_0^{1}tr(P(A)(t(A-I)+I)^{-2}A')dt=tr(P(A)A'\int_0^1(t(A-I)+I)^{-2}dt)=tr(P(A)A'A^{-1})$.

Finally $f'(x)=tr((P'(A)\log(A)+P(A)A^{-1})A')$.