# What's the relationship between temperature and density matrix?

As we know ,the definition of temperature can be traced back into the First Law and the Second Law in thermodynamics,which also can be explained by the more powerful statistical mechanics.

And in many calculations concerning quantum statistical mechanics,I will meet the following formula

$$\langle A\rangle = \textrm{Tr}[\rho A]$$

to derive the expectation values for any observables A,where the

$$\rho = \dfrac{e^{-(H-\mu N)/k T}}{Z} \quad\quad \left(Z=\textrm{Tr}\left[e^{(H-\mu N)/kT}\right]\right)$$

is the so called density matrix.But in quantum mechanics I learned the definition about density matrix is

$$\rho = \sum_{m n}P_{m n}\left|m\right\rangle\left\langle n\right|.$$

So my questions are:

1. How can I build a relationship between temperature and density matrix naturally?

2. What's the corresponding physics beyond the formula for expectation value?

• For future reference,  works basically the same way as  here. – user36790 Nov 23 '16 at 13:07
• I am so sorry I just have formed the habit to follow Latex. – Jack Nov 23 '16 at 13:16

The reason behind it comes from your statistical mechanics course, the probability of occupation of a state is proportional to the Boltzmann factor

$$p_i \sim e^{-(E_i - \mu N_i)/kT} \tag{1}$$

And that is exactly the meaning of the weight $\rho_{ii}$: occupation probability of state $|i \rangle$, so it makes sense to define a density matrix with occupation numbers that follow a Boltzmann distribution, and that is exactly what your second equation does

$$\rho = \frac{1}{Z}e^{-(H -\mu N)/kT} = \frac{1}{Z}\sum_{mn}|m\rangle\langle m| e^{-(H -\mu N)/kT} |n\rangle\langle n| = \sum_{mn} P_{mn}|m\rangle \langle n| \tag{2}$$

with

$$P_{mn} = \frac{1}{Z}\langle m| e^{-(H -\mu N)/kT} |n\rangle \tag{3}$$

If the $|n\rangle$s are eigenstates of the energy and number then

$$P_{mn} = \frac{1}{Z}e^{-(E_n -\mu N_n)/kT}\delta_{mn} \tag{4}$$

which is basically Eq. (1).