Can someone please explain to me what the formal definition of temperature is?

Neither my textbook, nor my professor, nor any of the online sources I've checked are able to give me a proper definition of temperature. Even Feynman doesn't define temperature. Honestly the amount of circular definitions and ambiguities I've encountered in trying to understand the precise definitions of thermodynamic concepts is astounding.

The best thing I got was the temperature of a system of particle is a measure of its average kinetic energy.

In deriving the ideal gas law for monoatomic gases, the derivation of the internal energy formula $U=3/2PV$ is clear to me. However then it is used that the average kinetic energy of a system is given in terms of its temperature as $3/2kT$. For a monoatomic gas, the total energy is simply the number of molecules $N$ multiplied by the average kinetic energy (since the molecules are assumed to have no rotational energy), and thus $U=3/2NkT$, which gives $PV=NkT$ which is the ideal gas law.

So am I to take the statement that the average kinetic energy of a system is equal to a constant multiplied by its temperature $T$ as a definition for temperature? I don't think so because this is in fact the equipartition theorem, which means temperature must be defined independently elsewhere.

So what is the proper definition of temperature in thermodynamics and kinetic theory, and furthermore, why is it that when we place a thermometer in a bath of water we can say the reading we get is a measure of the average kinetic energy of the molecules in the bath?

  • 3
    $\begingroup$ The mean kinetic energy is proportional to the temperature for ideal gases, but this is not always true and not the fundamental definition of temperature. See this recent question here. In my answer to it, I give the "modern", statistical mechanical definitions as well as sketching Carnot's original, ingenious definition whereby a reservoir's temperature is defined by the efficiency of an ideal reversible heat engine running between the reservoir in question and a "standard" exhaust reservoir, the latter having unity temperature by definition $\endgroup$ Jun 5, 2017 at 12:18
  • 1
    $\begingroup$ @valerio92 It's certainly pretty close. I guess this question is asking explicitly for the relationship between temperature and mean kinetic energy, which the other question doesn't quite ask. However, Cort Amon's answer to the other question gives a wonderful discussion of relationship between thermometer and thermodynamic temperature. $\endgroup$ Jun 5, 2017 at 13:02
  • 5
    $\begingroup$ Possible duplicate of What's the most fundamental definition of temperature? Your "why is it that when we place a thermometer in a bath of water..." sounds like a separate question to me, which might make this Too Broad as well. $\endgroup$
    – jpmc26
    Jun 5, 2017 at 20:47
  • 1
    $\begingroup$ I would strongly encourage you to read this other post about temperature, which explains temperature from the statistical mechanics point of view. $\endgroup$
    – DanielSank
    Jun 5, 2017 at 21:20
  • 5
    $\begingroup$ $$\frac{1}{T} = \frac{\partial S}{\partial U}.$$ $\endgroup$
    – N. Virgo
    Jun 5, 2017 at 23:14

5 Answers 5


Since Fabian gave you a thermodynamical perspective, I will try to give you the point of view of statistical physics. You actually got very close when you cited the equipartition theorem since the general picture is very much that.

Ultra terse version: temperature is the inverse of the Lagrange multiplier ensuring the conservation of energy in the maximisation of the statistical entropy.

I am going to stay in a classical framework so that I don't need to overwhelm you with the quantum mechanical machinery of the density operator. Let's say we have a system of $N$ particles. We give ourselves a phase density $D(x_1, p_1, x_2, p_2, \cdots, x_N, p_N)$: the probability that the i-th particle has a position between $x_i$ and $x_i + \delta x_i$, and a momentum between $p_i$ and $p_i + \delta p_i$ is proportional to $D(x_1, p_1, \cdots, x_N, p_N)\delta x_1 \delta p_1 \cdots \delta x_N \delta p_N$. Then we construct the statistical entropy $S(D)$. This is therefore a functional, i.e. a function of the function $D$:

$$S(D) = -k \int dx_1dp_1\cdots dx_Ndp_N\ D \log D$$

where I did not write the arguments of $D$ for readability.

Now the game is to find $D$ that maximises $S(D)$ under the constraints that some macroscopic quantities are known. The simplest example is that of the canonical ensemble where the macroscopic energy $U$ is known.

$$U = \int dx_1dp_1\cdots dx_Ndp_N\ D\ u$$

where $u(x_1, p_1, \cdots, x_N, p_N)$ is the microscopic energy for the given point in phase space. For example, for the perfect gas, we can take into account only kinetic energy,

$$u(x_1, p_1, \cdots, x_N, p_N) = \sum_{i=1}^N \frac{p_i^2}{2m},$$

where $m$ would be the mass of each molecule in the gas.

That constrained maximisation is then transformed in an unconstrained one by actually maximising

$$S(D) + \beta U + \lambda_0 \int dx_1dp_1\cdots dx_Ndp_N D$$

where $\lambda_0$ is introduced to enforce the constraint, always present, that $D$ has to be normalised to 1 so that the probabilistic definition above make sense. $\beta$ and $\lambda_0$ are called Lagrange multipliers. The result is that

$$D = \frac{1}{Z} e^{-\beta u}$$

where the normalisation $Z$ is called the partition function. This is the Boltzmann-Gibs distribution. Finally, we can define the temperature $T$ as

$$\beta = \frac{1}{kT}$$

  • $\begingroup$ I completely agree. If this is too complicated, check out my answer $\endgroup$
    – user121330
    Jun 7, 2017 at 17:17
  • $\begingroup$ "You actually got very close when you cited the equipartition theorem since the general picture is very much that". Yep. With only quantum effects, some out-of-equilibrium systems and non-ergodic systems as the exceptions I know of to the most intuitive understanding of temperature. So simple, yet such a powerful concept. I was completely blown away by that in my courses of thermodynamics and statistical physics. $\endgroup$
    – Vendetta
    Jun 7, 2017 at 17:17

From a logical and thermodyamic point of view, the definition of temperature must be given by the Zeroth Law of Thermodynamics.

Let us say we do not know what temperature is. However, we know that if we let two bodies interact they can change some thermometric properties (such as volume, pressure, electrical resistance,...) of each other. When there is no change at all in any thermometric property, we say that the bodies have achieved thermal equilibrium. The Zeroth Law consists on the empirical fact that if $A$ is in thermal equilibrium with $B$ and $B$ is in thermal equilibrium with $C$, then $A$ is in thermal equilibrium with $C$. This is an equivalence relation which classify a set of bodies into subsets called equivalence classes. We then label each class with a number $T>0$ which we shall call temperature. The Zeroth Law allows us to establish thermal equilibrium just in terms of a newly defined variable called temperature.

The definition above is not absolute though. The number we associate to each subset of bodies in thermal equilibrium is arbitrary. To remove this arbitrariness (at least partially) we use the Second Law of Thermodynamics to define the so-called absolute or thermodynamic temperature. The second law implies that any reversible thermal engine operating between two sources has efficiency given by $$\eta_R=1-\frac{T_2}{T_1},$$ where $T_1$ and $T_2$ are the temperatures of the sources. Given the universality of this result one can for instance arbitrarily define the temperature of the cold source $T_2$, measure - mechanically - the efficiency of the engine and then the temperature $T_1$ is determined by $$T_1=\frac{T_2}{1-\eta_R}.$$ Note that there is no longer arbitrariness about the concept of temperature, except for the choice the the temperature of the cold source. Therefore it is appropriate to use as reference point which is highly reproducible anywhere. A standard choice is the triple point of water which is defined to be at $273.16\, \mathrm K$.

  • $\begingroup$ Unfortunately I feel like you are leaving out an important detail: by applying the Second Law of Thermodynamics you can only deduce that the efficiency of a reversible heat engine working between the temperatures $T_1$ and $T_2$ is a function of the temperature. After some work you find that it can be written in terms of functions of a single temperature but then you have to assign this function arbitrarily. $\endgroup$ Jan 22, 2023 at 9:40

Here is the definition of temperature in thermodynamics:

  • the first law defines the heat $Q$ as the "missing" energy $$ \delta Q = d U - dW \tag{1}$$ where $U$ is the total (inner) energy and $W$ is the work.

Note however that the heat is not defined for a state of the system but you need to know the process (path) by which you have reached the present state. That is to say only the change $\delta Q$ is defined in (1) and not $Q$ itself.

  • in the second law, the (absolute) temperature $T$ is defined as the integrating factor that renders $\delta Q$ into a total differential $dS$. In more physical terms, it is the factor that makes out of $\delta Q$ a quantity $S$ that only depends on the state of the system $$ dS = \frac{\delta Q}{T}. \tag{2}$$

Via (2) the temperature is defined up to a multiplicative constant. This constant is usually defined (via the Boltzmann constant) in such a way that there are 100 units between the freezing and boiling temperature of water at ambient pressure.


Thanks to Valter Moretti I have figured out that you have to add the condition to (2) that $S$ has to be extensive.

  • $\begingroup$ I strongly disagree on the fact that $1/T$ is completely determined (up to a factor) by requiring that $\delta Q/T$ is exact! Suppose that the non-exact $1$-form $\delta Q$ is given and that $1/T$ is an integrating factor giving rise to the entropy function $S$. Under these hypotheses, for instance, $nS^{n-1}/T$ is another generally different (because $S$ is not constant) integrating factor. Indeed, $nS^{n-1}/T \delta Q = d (S^n)$. This is valid for every fixed $n$ and one can find much more complicated examples. $\endgroup$ Jun 5, 2017 at 14:36
  • $\begingroup$ The point is that one cannot suppose to simultaneously define $T$ and $S$ just requiring that $1/T$ is an integrating factor of $\delta Q$. If you already know the function $S$ and you require that $\delta Q/T =dS$, this fixes $T$, but if you do not know $S$, the procedure is hopeless... $\endgroup$ Jun 5, 2017 at 14:41
  • $\begingroup$ @ValterMoretti: Where would you know $S$ from? I understand your point, I added the condition that $S$ has to be extensive... $\endgroup$
    – Fabian
    Jun 5, 2017 at 16:31
  • $\begingroup$ The extensivity of S integrated from $dS=\frac{\delta Q}{T}$ will get you that the integrating factor depends only on a single variable being the experimental temperature, that is the one defining equilibrium among the several constituent pieces of a composite system. The proof actually also shows that the dependence on the experimental temperature is universal and thus shows the existence of an absolute temperature identical for all bodies. $\endgroup$
    – hyportnex
    Jun 5, 2017 at 23:49


$$T = \frac{\partial U}{\partial S}_{V,N}$$

Temperature is the change in internal energy with respect to the entropy when holding the volume and number constant.

Plain English: Temperature is a measure of the free energy in an object. Different objects have different capacity to hold energy. For example, at room temperature, ammonia can hold about 10 times the energy as gaseous argon (per gram). Complicating things further, a material's capacity to accommodate free energy changes with the temperature. Rather than merely reporting the free energy in an object, temperature reports the free energy normalized to how much capacity that object has at that temperature. All of this brings us back to that definition that feels very circular and doesn't really explain much out of context:

Heuristic: temperature is the quality of matter that is the same when objects in contact reach thermal equilibrium.

Mechanistic revision: You've heard about the movement of molecules in a gas and the wiggling of atoms in a solid, and that's a way to understand things, but there's also photons and (mathematical) phonons which give things temperature. It turns out that we know the temperature of the sun not because we sent a thermometer, but because it radiates photons just like everything else, and the frequency distribution of the outgoing light is consistent with the surface of the sun being at about 5800K. We even know that most of space has the consistent temperature of about 3K because of the same property.

Editorial: Energy goes from object to object and type to type all the time. Energy is an abstract concept that relates every physical science (and describes hundreds of forms of energy), so we can't really expect its derivative with respect to Entropy to be just one phenomenon. Keep exploring.

  • $\begingroup$ "temperature reports the free energy normalized to how much capacity that object has at that temperature" -> I always understood that as "temperature expresses the average energy per degree of freedom of a body". If the degree of freedom requires a lot more energy than the one expressed in your temperature to be excited, it probably won't; this ties in nicely with the ideal gas example and seems to be the simpler way of explaining I've ever read. Unfortunately, I don't remember if I read that in the book by Callen or in another place. The only flaw is not expressing what the distribution is. $\endgroup$
    – Vendetta
    Jun 7, 2017 at 15:00
  • $\begingroup$ It also puts emphasis on the difference between having access to a state and being in such state. Temperature means, inherently, that your state has something of a probability distribution, and classically, does not characterize A microscopic state (and quantum mechanically can't be used to express exciting A eigenstate, unless the temperature is either 0 or not well defined) but can still be used to characterize a macroscopic state - by measuring with a body of known thermometric properties aka a thermometer. $\endgroup$
    – Vendetta
    Jun 7, 2017 at 15:08
  • $\begingroup$ Of course such a way of expressing temperature doesn't take fermionic and bosonic statistics into account, hence not perfect, but will give you the general intuition about the physics if you know the Boltzmann distribution as well in plenty of cases. Taking quantum mechanics into account is still possible by considering those observations. $\endgroup$
    – Vendetta
    Jun 7, 2017 at 15:35
  • $\begingroup$ As a last observation, I should add that this understanding of temperature - basically based on the equipartition theorem - sometimes doesn't work in systems inherently out of equilibrium, or without ergodic character, or with pronounced quantum effects (as mentioned). $\endgroup$
    – Vendetta
    Jun 7, 2017 at 17:05
  • $\begingroup$ @Vendetta I don't disagree with you, but the OP sounds like they are taking Thermodynamics, not Statistical Mechanics. The difference between 'energy per [accessible] degree of freedom' and 'normalized to how much capacity at that temperature' is pretty small, and this explanation should make it clear to both classes of people. $\endgroup$
    – user121330
    Jun 7, 2017 at 17:09

What is temperature? There are very formal mathematical answers to this question. However, the best answer I have encountered in my six years of physics education was in my original thermodynamics course my second year, in Schroeder's Thermal Physics, pages 85-91. However, my understanding has evolved with exposure to probability and information theory.

Temperature is unambiguously defined as "how much a system's entropy changes when that system's energy changes."

Thus whatever understanding of temperature one wishes to obtain is fundamentally limited by their understanding of what entropy is. Entropy is a measure of how much information (in bits, since we're on computers right now) is required to know the state of a system.

A system's state (really, quantum state) is everything that can possibly be simultaneously known about a system. Once you know everything there is to know about a system, you have determined its state.

Entropy is equivalent to the expected number of yes/no questions minimally required to determine the state of a system. Please note the word "expected" (which means average), and the word "minimally"(which means asking the best questions you possibly can).

You probably have never heard this definition of entropy, but this definition is actually completely correct, except in physics we multiply this number by $k_b ln(2)$ (a number) merely for historical reasons. So whenever you read entropy, you should try thinking expected number of yes/no questions. If you don't know if a coin is heads or tails, the entropy is 1 binary question: "Is the coin heads?".

There is a simple law saying the expected number of yes/no questions required to determine the state of a closed system can never decrease. This is known as the 2nd Law of Thermodynamics. It's a cool law. And when entropy is defined as the expected number of questions, it's an exact law that always holds. It even holds for Maxwell's Demon.

The expected number of questions to determine the state of a closed system can certainly increase. And it certainly will, until it hits a limit. A system that has hit this "limit of unknowability" occupies every possible state with equal probability, and I call this system ergodic. This always happens if you wait long enough, thanks IMO to the mathematics of markov chains (every closed system is necessarily an irreducible, ergodic markov chain that approaches a stationary distribution). This is called the ergodic hypothesis in physics.

Consider two ergodic systems, one high temperature and one low temperature.

When a system has high temperature, it means that small changes in the system's energy cause large changes in the system's entropy (in fact, this is the definition of temperature). Thinking about entropy as the expected number of yes/no questions, this means your going to have to ask a lot more questions to determine the state of the system if you add a little energy.

When a system has low temperature, it means that small changes in the energy of the system do not change the entropy of the system very much. You're not going to have to ask significantly more questions to determine the state of the system if it has a little more energy.

Now consider the combined system, closed off from the rest of the universe. The 3rd Law places a restriction on the expected number of yes/no questions to determine the state of the combined system. Consider what happens if the systems can exchange energy (and only energy!).

If energy is not exchanged between the low temperature and high temperature systems, then the expected number of questions required for the whole system $N_{1+2}$ is just the sum of the expected number of questions for each subsystem: $N_{1+2} = N_1 + N_2$.

However, what happens if the two subsystems can and do exchange energy? The 3rd Law says that, whatever happens, the expected number of questions required to determine the state of the combined system cannot decrease.

If you know that more energy flowed from the high temperature system to the low temperature system (which it certainly can, energy flows randomly), you know from the definition of temperature that the number of questions required to determine the state of the combined system has decreased, in apparent violation of the 2nd Law: $N_{1+2} < N_1 + N_2$. However, this knowledge about "backwards flow of energy" cannot be obtained without asking a certain number of questions $N_q$ of the system: the exact number required by the 2nd Law $N_{1+2} \geq N_1+ N_2 + N_q$.

On the other hand, if all you know is energy exchange is occurring in this combined system, from the ergodic hypothesis the expected number of questions you'll have to ask is only increasing, rapidly approaching the ergodic limit. This requires that energy flows on average (randomly) from the hot thing to the cold thing. And the ergodic limit is when the hot thing and the cold thing are the same temperature.

  • 1
    $\begingroup$ It's unclear how much is quoted and how much is synopsis - avoid the appearance of plagarism by either block quoting or finishing the first paragraph with something like 'In brief:' $\endgroup$
    – user121330
    Jun 7, 2017 at 17:08
  • $\begingroup$ None of this is from Schroeder, nor any other source. Reading it seven years later, it is just a viewpoint of seeing temperature from the point of view of information theory. $\endgroup$
    – JoseOrtiz3
    Mar 8 at 18:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.