# Derivative of the trace of $e^{-\beta \mathbf{A}}$

I'm trying to compute the derivative with respect to an inverse temperature parameters $\beta$ of a density matrix that has the following form:

$$\rho(\beta,\mathbf{A}) = \frac{e^{-\beta \mathbf{A}}}{\mathrm{Tr}[e^{-\beta \mathbf{A}}] }$$

where the Hamiltonian is specified by an Hermitian matrix $\mathbf{A}$. How can I compute the following derivative?

$$\frac{\partial}{\partial \beta} \left( \frac{e^{-\beta \mathbf{A}}}{\mathrm{Tr}[e^{-\beta \mathbf{A}}] } \right)$$

$\mathrm{Tr}$ is the trace operator, and the exponential is here meant as matrix exponential. I think that the derivative of the numerator is simply:

$$\frac{\partial}{\partial \beta}e^{-\beta \mathbf{A}} = -\mathbf{A}e^{-\beta \mathbf{A}}$$

but, I'm not sure this is correct. Is there available at least some book where the basic rules of calculus of matrix functions are available?

• What makes you think that $A$ and $e^A$ don't commute?
– Omry
Mar 6, 2017 at 15:24
• Good observation, in fact they commute. math.stackexchange.com/questions/81386/… Mar 6, 2017 at 15:28
• By functional calculus, $e^{-\beta A}$ is a densely defined operator for any self-adjoint $A$. The derivative can be taken (again on a dense domain), and yields the sought result. If both $e^{-\beta A}$ and $-Ae^{-\beta A}$ are trace class, then you can use the product rule to take the derivative of the product as well. Mar 6, 2017 at 15:40
• Therefore is my computation correct? I'm also interested in computing the trace (the denominator), is correct to say that $\frac{\partial}{\partial \beta} \mathrm{Tr}[e^{-\beta \mathbf{A}}] = \mathrm{Tr}[\frac{\partial}{\partial \beta} e^{-\beta \mathbf{A}}] = \mathrm{Tr}[-\mathbf{A}e^{-\beta \mathbf{A}}]$? Mar 6, 2017 at 16:08
• Yes, provided that you are careful with domains and everything is trace class. The fact that you can put the derivative inside the trace is essentially a consequence of linearity of the trace, and dominated convergence. Mar 6, 2017 at 16:18

A Hermitian matrix is normal and hence diagonalizable, so choose a diagonalizing eigenbasis where simultaneously $\mathbf{I} = \sum_{n=0}^{\infty} |a_n\rangle\langle a_n|$ and $\mathbf{A} |a_n\rangle = a_n|a_n\rangle.$ In this eigenbasis, $$e^{-\beta\mathbf{A}} = \sum_{n=0}^{\infty} e^{-\beta a_n} ~|a_n\rangle\langle a_n|,$$and the trace operator works out, by its linearity and cyclicity properties, to be simply$$\operatorname{Tr}\mathbf{M} = \operatorname{Tr}(\mathbf{I}~\mathbf{M}) = \sum_{n=0}^\infty\operatorname{Tr} \big(|a_n\rangle\langle a_n|~\mathbf{M} \big) = \sum_{n=0}^\infty\operatorname{Tr} \big(\langle a_n|~\mathbf{M}|a_n\rangle \big) = \sum_{n=0}^\infty\langle a_n|~\mathbf{M}|a_n\rangle.$$So your density matrix can be rewritten in terms of non-matrix quantities as, $$\rho = \frac{e^{-\beta\mathbf{A}}}{\operatorname{Tr}e^{-\beta\mathbf{A}}} = \left(\sum_{m=0}^\infty e^{-\beta a_m}\right)^{-1}~\sum_{n=0}^\infty {e^{-\beta a_n}}|a_n\rangle\langle a_n|,$$and by the normal product rule you get $$\begin{array}{rl}\frac{\partial\rho}{\partial \beta} &=~ \left(\sum_m e^{-\beta a_m}\right)^{-2}~~\sum_\ell e^{-\beta a_\ell} a_\ell~~\sum_n {e^{-\beta a_n}}|a_n\rangle\langle a_n| \\ &-~~~ \left(\sum_m e^{-\beta a_m}\right)^{-1}~\sum_n a_n e^{-\beta a_n}|a_n\rangle\langle a_n|.\end{array}$$You can then rewrite this in basis-independent notation as $$\frac{\partial\rho}{\partial \beta} = - \frac{\operatorname{Tr}(e^{-\beta\mathbf{A}}) ~\mathbf{A}~e^{-\beta\mathbf{A}} ~-~ \operatorname{Tr}(\mathbf{A} e^{-\beta\mathbf{A}})~e^{-\beta\mathbf{A}}}{\left(\operatorname{Tr} e^{-\beta\mathbf{A}}\right)^2},$$so that it looks like the quotient rule, if you wish.