1
$\begingroup$

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!

$\endgroup$
  • $\begingroup$ What is the log of a rectangular matrix? Is it the entrywise log? $\endgroup$ – Rahul Jun 21 '15 at 15:26
  • $\begingroup$ Same for multiplication $A(x)\log A(x)$, is it entrywise ? I suspect so since you say matrices are rectangular. Anyway, this just sums up to a standard derivative after the trace. $\endgroup$ – Bertrand R Jun 21 '15 at 15:33
  • $\begingroup$ No, the log here is the one defined by the exponential map in this 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. I edited the question to make it clear. Thanks for the replies! $\endgroup$ – planckstars Jun 21 '15 at 15:33
  • $\begingroup$ Your log is not well defined then $\endgroup$ – Bertrand R Jun 21 '15 at 15:34
  • $\begingroup$ why do you say that? $\endgroup$ – planckstars Jun 21 '15 at 15:40
2
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Well this i like a lot since it is simple! So, i can just move the differential operation inside the trace then, $d(trX)=tr(dX) $? How about Bertrand R's previous comment/objection? $\endgroup$ – planckstars Jun 21 '15 at 16:21
  • $\begingroup$ I don't understand why Bertrand R is getting all caught up in the technical details. Any diagonalizable square nonsingular matrix has a well defined principal log. $\endgroup$ – Victor Liu Jun 21 '15 at 16:23
  • $\begingroup$ ok well thanks a lot to everyone; for the moment i am voting this up and unless it turns out not to be correct i am very happy with it! $\endgroup$ – planckstars Jun 21 '15 at 16:28
  • $\begingroup$ Hmm, deriving the trace is indeed quite simple but I don't think deriving the log is that easy. My first guess would be that $\frac{d \;}{dx} \log A(x)=A(x)^{-1}A'(x)$ only if $A(x)$ and $A'(x)$ commute and in general it's not the case. So I don't think that works here. $\endgroup$ – Sylvain L. Jun 21 '15 at 16:29
  • 2
    $\begingroup$ Because of the trace it works. But in general it is wrong to write $\log(A(x))' = A'(x)\log A(x) + A'(x)$. Anyway, my point was precisely to find out that the matrix was something, in this case diagonalizable and nonsingular. And it's not a "technical detail" $\endgroup$ – Bertrand R Jun 21 '15 at 16:42
0
$\begingroup$

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')$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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