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?
 A: 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.
If you like, this is also why the rules aren't very expressly laid out anywhere. There exists a sort of analogy where matrix products work like products, traces work like sums, and so forth, which can be made explicit by choosing a basis: once you have understood this analogy there is not much more to teach.
