# Understanding the density matrix for systems in thermal equilibrium

If the eigenstate $$| i\rangle$$ of the Hamiltonian $$\hat H$$ has energy $$E_i$$ the relative probability of the system being in that state is $$e^{-\beta E_i}$$ where $$\beta = 1/\left(k_BT\right)$$.

The density matrix is then:

$$\hat{\rho} = \frac{1}{Z} \sum_i e^{- \beta E_i} | i \rangle \langle i| = \frac{e^{-\beta \hat H}}{Z} \tag{1}$$

where

$$Z = \sum_i e^{- \beta E_i} = \mathrm{Tr}(e^{- \beta \hat H}) . \tag{2}$$

I can easily prove to myself the validity of (2) however I am unsure about (1), namely why it is that:

$$\sum_i e^{- \beta E_i} | i \rangle \langle i| = e^{-\beta \hat H}$$

• Equation one is the eigendecomposition of the function of operators $e^{\beta \hat{H}}$. It’s important to note that the $H$ on the right hand side of your equation is an operator and not a function of c-numbers. It follows from the spectral theorem essentially en.wikipedia.org/wiki/Spectral_theorem
– gabe
Commented Dec 25, 2020 at 2:25

Perhaps it's easiest to work backwards. Let the right hand side of the equation act on an arbitrary vector $$|A\rangle$$. $$e^{-\beta \hat H}|A\rangle$$ Next, let's label the eigenvectors of the operator $$\hat H$$ with an index $$i$$ so that $$\hat H|i\rangle = E_i|i\rangle .$$ This also implies that $$e^{-\beta\hat H}|i\rangle = e^{-\beta E_i}|i\rangle .$$ These eigenvectors form a complete basis so we can write $$|A\rangle = \sum_i |i\rangle \langle i|A\rangle .$$ Now we have $$e^{-\beta \hat H}|A\rangle = \sum_i e^{-\beta \hat H}|i\rangle \langle i|A\rangle = \sum_i e^{-\beta E_i}|i\rangle \langle i|A\rangle .$$ But $$|A\rangle$$ was arbitrary so we have the result you wanted as a general matrix identity.
The easiest way to justify that is to evaluate the elements of $$\hat{\rho}$$. Then
$$\langle j|\left(\sum_{i} e^{-\beta E_{i}}|i\rangle\langle i|\right)|m\rangle=\langle j|e^{-\beta H}|m\rangle$$ which, by using the fact that $$|i\rangle$$ is an eigenstate of $$\hat{H}$$ (the basis generated by the eigenstates of $$\hat{H}$$ can always be chosen to be an orthonormal basis) implies that $$\sum_{i} e^{-\beta E_{i}}\delta_{ji}\delta_{im}=e^{-\beta E_m}\delta_{jm},$$ where in the left-hand side we used the fact that a function of an operator evaluated at an eigenstate, is the function evaluated at the corresponding eigenvalue times the eigenstate (e.g. https://en.wikipedia.org/wiki/Matrix_function). By summing over $$i$$ (it needs to be at least equal to $$j$$) we obtain $$e^{-\beta E_{j}}\delta_{jm}=e^{-\beta E_j}\delta_{jm},$$ indicating that all elements of both operators are the same, hence they are equal.