# Temperature is always the average of some quantity?

I know that for an ideal gas it can be shown that the average kinetic energy can be written as:

$$\langle K\rangle= \dfrac{1}{2}k_B T.$$

Hence for an ideal gas, temperature can be identified with the average kinetic energy of the particles composing the system.

Now, of course not everything is an ideal gas. There are many other systems we deal in Statistical Mechanics like quantum gases, magnetic materials, and even black holes.

So, in the general case in Statistical Mechanics, is temperature the average of something? If that's true, what is temperature the average of?

EDIT: The point is that temperature is usually defined as

$$T = \dfrac{\partial U}{\partial S},$$

and this doesn't reflect that $T$ is the average of something. So, if $T$ is the average of something, what is this something and how does it connect to this definition?

The main point of the question is that thinking about something as the average of a certain quantity gives us better insight on that something. For instance, in the ideal gas case I presented, it allows us to justify thinking of $T$ as a measure of aggitation of the constituents of the system.

Now, I wanted to understand how we think of $T$ as an average in the general case - both classical and quantum mechanics with arbitrary system.

Temperature has actually a very precise definition in Statistical Mechanics. If our system has energy $U$, entropy $S$ and $N$ degrees of freedom, we define the temperature $T$ such that $$\left(\frac{\partial S}{\partial U}\right)_{N}\equiv\frac{1}{T}.$$ The fact that for the kinetic model of the ideal gas we talk about temperature in terms of average energy comes from a result called the equipartition theorem, which states that for any degrees of freedom $x_n, x_m$ of a system in equilibrium with some reservoir at temperature $T$ (we call the description of this kind of system a canonical ensemble), we can write $$\left\langle x_n\frac{\partial H}{\partial x_m}\right\rangle=\delta_{mn}k_BT,$$ Where $H$ is the Hamiltonian of our system. Applying that to an ideal gas composed of $N$ particles of mass $m$, with momenta $p_i, i=1,2,... ,3N$, i.e. one momentum for each direction any particle can move at, we can write the hamiltonian of our system as (with implied summation): $$H=\frac{p_ip_i}{2m},$$ and therefore $$\left\langle p_i\frac{\partial H}{\partial p_j}\right\rangle=\left\langle p_i\frac{p_j}{m}\right\rangle=\delta_{ij}k_BT.$$ Looking only at $i=j$, we get that $$\left\langle \frac{p_i^2}{m}\right\rangle=k_BT.$$ Summing over the three dimensions of a single particle: $$\sum_{i=1}^{3}\left\langle \frac{p_i^2}{m}\right\rangle=2\langle K\rangle=3k_BT$$ $$\langle K\rangle=\frac{3}{2}k_BT,$$ which is the result we get from kinetic theory.

• Thanks for the answer. That's a quite nice result, but when I read about it I got the impression that it is directly related to classical mechanics. Is there a quantum mechanical version of this?
– Gold
Sep 11 '16 at 2:07
• Not that I know of. In fact, the application of this result to the spectrum of the blackbody radiation was what caused the well known ultraviolet catastrophe, thereby kickstarting the development of Quantum Theory. Sep 11 '16 at 2:11

This is true of all macroscopic thermodynamic quantities, not just temperature - they're the average of some microscopic properties of the system. This is the fundamental connection between statistical mechanics and thermodynamics. This connection is the basis of the partition function formalism for doing statistical mechanics/thermodynamics.

• Thanks for the answer. But then, temperature is the average of what quantity? Becase the way I see it usually defined as $\partial U/\partial S$ doesn't reflect that.
– Gold
Sep 11 '16 at 1:38
• In that definition $T$, $U$, and $S$ are all averages. The microscopic definition of $S$, for example, is:$$S = -k\sum_i P_i \ln P_i = -k \langle \ln P \rangle,$$ where $P_i$ is the probability of finding the system to be in state labeled $i$. Sep 11 '16 at 1:51

What temperature is fundamentally is a measure of the energy it would take to add to a reservoir at T to increase the number of states it has access to by a factor of e. This fact can be seen from the "Boltzmann factor", e^(E/kT), which measures the ratio of the number of states available to the reservoir with and without extra energy E. Thus, it's useful to realize that a temperature is really a property of a reservoir that a system is in contact with, either in reality or in our imagination-- we say a system is at T if no heat passes from a (possibly hypothetical) reservoir at T that the system could be brought into contact with. All reservoirs at the same T also have no heat passing between them (that's the zeroth law of thermodynamics).

By the way, although it doesn't matter, the average kinetic energy per particle is 3/2 kT, not 1/2 kT.

The expression $\langle K\rangle= \dfrac{3}{2}k_B T$ relates temperature to the average kinetic energy of an ideal gas particle. This generalizes poorly to other systems which are heterogeneous collections of particles, since it's unclear which set the corresponding average would be over. Consider a metal consisting of a vibrating ion lattice with an electron sea. Would your hypothetical generalization link $T$ to some average property of the electrons, or some average property of the ions?

One solution is to recognize that the kinetic energy of an ideal gas particle comes from three degrees of freedom (motion in the x,y,z directions). The three degrees of freedom share kinetic energy equally, so we can write: $\langle \frac{1}{2} m v_x^2 \rangle=\langle \frac{1}{2} m v_y^2 \rangle = \langle \frac{1}{2} m v_z^2 \rangle = \dfrac{1}{2}k_B T$. Now, the concept of degrees of freedom does generalize to other thermodynamic systems (at least classical ones). The generalization is given by the equipartition theorem that states $\left\langle x_n\frac{\partial H}{\partial x_m}\right\rangle=\delta_{mn}k_BT$, where $H$ is the Hamiltonian and the $x_i$ are generalized coordinates of the system. Gabriel Golfetti's answer goes into this in more detail.

If you want to include classical and quantum systems, you need a more radical generalization. The only one I can suggest is the relationship $T = \dfrac{\partial U}{\partial S}$, where $U$ and $S$ are averages over the microstates making up a macrostate.

Extended answer: It depends on what you mean by temperature. If you restrict the concept of temperature to that macroscopic concept used in classical thermodynamics, then the answer is affirmative because the thermodynamic temperature $T$ is always the average of microscopic motions. For instance for ideal gas
$$T \equiv \frac{2}{3 k_\mathrm{B} N} \langle K \rangle$$
$$T^\mathrm{micro} \equiv \frac{2}{3 k_\mathrm{B} N} K$$
$$T = \langle T^\mathrm{micro} \rangle$$