# Proof of 2 Matrix identities (Traces, Logs, Determinants)

I am working through a derivation in someone's thesis at the moment to understand an important result, but I am more than a bit rusty on matrices. Could anyone give me some tips on these identities? They are stated without proof and I'm having a hard time finding a derivation online.

Below, X is a matrix and E is a scalar, and X is a function of E.

1) $Tr(X' X^{-1}) = \frac{d}{dE} Tr(ln(X))$

When I first saw this I thought it would be the same as treating X as a scalar, then by the definition of the ln function the above would be true. Is the fact that there is a trace and that X is a matrix important in the derivation?

He does mention that "" $Tr(log X)' = Tr[X' X] = Tr[X X']$ "" but I think this was probably a typo, since an expression of the form $Tr[X' X]$ does not appear in his calculation.

2) $Tr(ln(X)) = ln(det(X))$

This one I am a bit stuck on, I would guess that it has something to do with the definitions of the trace and determinant but not sure where to go from there. I haven't done anything with matrices in about 3 years, and I'm a physicist, so keep it basic :)

EDIT OK here is my working for proof 1 using Robert's guide below:

$$X' = \frac{d}{dE} \sum_{n=0}^{\infty} \frac{L^n}{n!}$$ Using the chain rule, $$X' = \sum_{n=0}^{\infty} \frac{n L' L^{n-1}}{n!} = \sum_{n=0}^{\infty} \frac{L' L^{n-1}}{(n-1)!} = \sum_{n=1}^{\infty} \frac{L' L^{n-1}}{n!}$$ Here is the bit I don't quite follow, regarding the introduction of the dummy j which seems to cancel later on in the calculation without being used. $$\sum_{j=0}^{n-1} \sum_{n=1}^{\infty} \frac{L' L^j L^{n-1 - j}}{n!}$$ Now using this expression for X': $$X' X^{-1} = X' e^{-L} = \sum_{j=0}^{n-1} \sum_{n=1}^{\infty} \frac{L' L^j L^{n-1 - j}}{n!} e^{-L}$$ Here is where I find a problem now, since $$\sum_{j=0}^{n-1} (\sum_{n=1}^{\infty} \frac{L^{n-1}}{n!}) L' e^{-L}$$ Now my part in the brackets in that last expression isn't $e^L$ so doesn't cancel nicely. I am pretty sure I am missing something with commutativity and when you introduced the sum over j!? EDIT 2 Just realised my last step on the chain rule, changing the sum from n=0 to n=1 doesn't make much sense.

-
The first error is that if $L'$ and $L$ don't commute, $\dfrac{d}{dE} L^n$ is not $n L' L^{n-1}$. You have to use Leibniz's rule in the form $(AB)' = A'B + AB'$. Thus $(L^2)' = L'L + LL'$, which is not the same as $2L'L$. – Robert Israel Jun 6 '12 at 20:34
I tried doing $$\frac{d}{dE} L^n = \frac{d}{dE} (L L^{n-1})$$ which gave $$\sum_{n=0}^{\infty} \frac{L' L^{n-1} + (n-1)L L^{n-2}}{n!}$$, I'm not really sure where I would go from that point though – Josh Jun 6 '12 at 20:47
So $(ABC)' = A'BC + A(BC)' = A'BC + AB'C + ABC'$, and $\dfrac{d}{dE} L^n = L' L^{n-1} + L L' L^{n-2} + \ldots + L^{n-1} L' = \sum_{j=0}^{n-1} L^j L' L^{n-1-j}$ – Robert Israel Jun 6 '12 at 23:45

1) is a bit tricky if $X'$ and $X$ don't commute. $\log(X)$ is a matrix $L$ such that $\exp(L) = X$. Now $$\dfrac{d}{dE} X = \dfrac{d}{dE} \sum_{n=0}^\infty \dfrac{L^n}{n!} = \sum_{n=1}^\infty \sum_{j=0}^{n-1} \dfrac{L^j L' L^{n-1-j}}{n!}$$ and so $$X' X^{-1} = X' \exp(-L) = \sum_{n=1}^\infty \sum_{j=0}^{n-1}\frac{L^j L' L^{n-1-j}}{n!} \exp(-L)$$ but since $\text{Tr}(AB) = \text{Tr}(BA)$ and $L$ commutes with $\exp(-L)$, $$\text{Tr}(X' X^{-1}) = \sum_{n=1}^\infty \sum_{j=0}^{n-1} \dfrac{\text{Tr}\left(L^j L' L^{n-1-j} \exp(-L) \right)}{n!} = \sum_{n=1}^\infty \dfrac{\text{Tr}\left( L'L^{n-1} \exp(-L)\right)}{(n-1)!} = \text{Tr}(L' \exp(L) \exp(-L)) = \text{Tr}(L')$$
2) If $X$ has eigenvalues $\lambda_j$ (counted by algebraic multiplicity), $\log(X)$ has eigenvalues $\log(\lambda_j)$. Then $\text{Tr}(\log(X)) = \sum_j \log(\lambda_j) = \log(\prod_j \lambda_j) = \log(\det(X))$. Actually there is a question of which branches of the logarithm to use when there are non-positive eigenvalues, so it is more accurate to say that $\text{Tr}(\log(X))$ is one of the branches of $\log(\det(X))$.
In 1) what is the point of introducing the $L^{j} L^{-j}$ part, the way I have worked it through it seems to cancel later without being used at all? Also I don't quite get how the $n!$ in the denominator near the end changes back to $n-1!$ on the next step. I will edit in my working at the top in a moment. – Josh Jun 6 '12 at 20:01
See my comment on your attempted proof above. $n/(n!) = 1/(n-1)!$. – Robert Israel Jun 6 '12 at 20:36
On the last part of your calculation, do I understand right that due to the cyclical property of the Trace (and the commutation of L with $e^{-L}$) you can cancel out the j entirely, however this would leave me with $$\sum_{n=1}^{\infty} \frac{Tr(L' L^{n-1} e^{-L})}{n!}$$, so I'm not sure where the n in the numerator would come from to do $n/{n!} = 1/(n-1)!$ as you suggest – Josh Jun 6 '12 at 21:01