What exactly is temperature?

I've read at many places that temperature is the average kinetic energy of particles present in an object. I just don't intuitively get how kinetic energy is connected with temperature. And how is heat connected with temperature then? Then what exactly is temperature? All of the descriptions given online are very confusing.




**Temperature vs kinetic energy**



> 
> [OP:] I've read at many places that temperature is the average kinetic energy of particles present in an object.
> 
> 
> 


Temperature has to do with the average kinetic energy of particles, but to say the two concepts are the same is incorrect. What is correct is that if the particles in two mono-atomic gas samples have the same average kinetic energy, they will have the same temperature. For samples that are not mono-atomic gases, see [What are the degrees of freedom that define the temperature of an ionic solid (such as sodium azide)?](https://chemistry.stackexchange.com/questions/121313/what-are-the-degrees-of-freedom-that-define-the-temperature-of-an-ionic-solid-s).



> 
> [OP:] I just don't intuitively get how kinetic energy is connected with temperature.
> 
> 
> 


If you have a gas in a container (such as the air in a room), gas molecules will collide with the walls. If the walls are colder than the gas (such as a cold window pane in the winter), these collisions will slow down the gas particles on average, decreasing the temperature of the gas. If the walls are hotter than the gas (such as a window pane in the summer), these collisions will speed up the gas particles on average, increasing the temperature of the gas. Because energy (and momentum for elastic collisions) is conserved, changes in the temperature of the gas will be reflected in opposite changes in the temperature of the walls (the magnitude of change will not be the same, it depends on the heat capacities).


**Heat vs temperature**



> 
> [OP:] And how is heat connected with temperature then?
> 
> 
> 


Heat is the transfer of thermal energy. If nothing else is going on, heat transferred from sample A to sample B will go along with a drop in temperature of A and a raise in temperature of B. See also: <https://chemistry.stackexchange.com/a/112057>


**Definition of temperature**



> 
> [OP:] Then what exactly is temperature? All of the descriptions given online are very confusing.
> 
> 
> 


In the simplest terms, it is what you measure after you put a thermometer in thermal contact with the sample. The sensing part of the thermometer (mercury or alcohol bulb, thermocouple, etc) has to reach the same temperature as the sample. The sample should be much bigger than the sensor so that bringing them into contact does not significantly change the temperature of the sample. The temperature measured by the thermometer is equal to the temperature of the sample because they are at thermal equilibrium (heat exchange is zero), and the thermometer has some property that changes with temperature (such as the volume of alcohol) in order to sense its temperature. See also: [Temperature measurement](https://chemistry.stackexchange.com/questions/121197/temperature-measurement/121228)


The quantitative definition of temperature is given in the official definition of its SI unit Kelvin:



> 
> The kelvin, symbol $K$, is the SI unit of thermodynamic temperature. It is defined by taking the fixed numerical value of the Boltzmann constant k to be $\pu{1.380649e−23}$ when expressed in the unit $\pu{J K−1}$, which is equal to $\pu{kg m2 s−2 K−1}$, where the kilogram, metre and second are defined in terms of $h$, $c$ and $Δν\_{Cs}$.
> 
> 
> 


This definition requires a lot of physical chemistry to understand. However, it is sometimes formulated as:



> 
> One kelvin is equal to a change in the thermodynamic temperature $T$ that results in a change of thermal energy $kT$ by $\pu{1.380 649e−23 J}$.
> 
> 
> 


So if the thermal energy (average per particle, not stated above) goes up, the temperature goes up.


 14

Heat is the transfer of energy to or from the body in forms other than matter flow or work (organized energy transfer, such as pushing).


Temperature is only a well-defined property for a collective body (you wouldn't be able to tell me the temperature of a single atom, for example). Like you said, it's the property of matter describing the amount of kinetic energy of the particles in the body. As to why this is, I'd ask: what happens at absolute 0?



> 
>  At absolute 0, heat has transferred out of the system so much so that you cannot lower the energy of the system any more.
> 
> 
> 


(Note for the knowledgeable reader: there is indeed still a quantum mechanical phenomena -- zero point energy-- that prevents some energy from leaving the molecule, but that's a conversation for another time).


From a thermodynamic definition, temperature is the description of how the internal energy changes with entropy for a closed (no matter flows in or out) system of constant volume:


$T=\left(\frac{\partial{U}}{\partial{S}}\right)\_{N,V}$


By increasing the entropy of the system by a fixed amount, the temperature of the system tells me by how much the internal energy will increase. Now, this is not a very useful form, as you cannot directly increase the entropy of a body (you must add energy and then let the entropy indirectly increase). It's much more useful to consider the inverse temperature:


$\frac{1}{T}=\left(\frac{\partial{S}}{\partial{U}}\right)\_{N,V}$


At absolute zero, everything is in the lowest energy state. Any small transfer of energy to the system will result in a large increase in entropy. But this was only a small change, so the internal energy doesn't increase by much. Compare to a system at room temperature, where I must transfer much more energy to the system to achieve the same magnitude of increase in entropy.


 13

Temperature is related to kinetic energy, but it can't be simply equated to the average kinetic energy of the system. As I wrote in response to another answer, different systems can have different average kinetic energies/particle, but the same temperature. E.g., at the same temperature the avg. kinetic/energy particle of a diatomic gas is greater than that of a monatomic gas, because the monatomic gas particles have only translational kinetic energy, while the diatomic particles will have the same average translational kinetic energy, but rotational and vibrational kinetic energy as well.


What you can say, however, is that temperature is a measure of the average kinetic energy *per available degree of freedom*, $\langle H\_{kin,DOF}\rangle$:


$$\langle H\_{kin,DOF}\rangle = 1/2 N k\_B T/f,$$
where $f$ is the fractional availability of the degree of freedom.


Thus we can write:


$$T = \frac{2\langle H\_{kin,DOF}\rangle}{N k\_B f}$$


Consider again a monatomic vs. diatomic gas. At low temperatures, the vibrational degrees of freedom might not be entirely available, but the translational degrees of freedom will be (hence, for each of the three translational degrees of freedom, $f=1$). At the same temperature, the average KE/particle of the two gases will be different. However, for both gases, *the average KE per particle per translational degree of freedom* will be the same!


 9

In thermodynamics, the basis for a definition of temperature is provided by the [$0^{\text{th}}$ Law](https://en.wikipedia.org/wiki/Zeroth_law_of_thermodynamics): two bodies independently in thermal equilibrium with a third body are in thermal equilibrium with one another. Thermal equilibrium allows the definition of temperature: two bodies in thermal equilibrium are said to be at the same "temperature".


The $0^{\text{th}}$ Law is useful because it provides a means to determine whether two systems that are not in thermal contact would be in thermal equilibrium if placed in contact. This transitive property of thermal equilibrium provides a method of ranking systems, for instance by bringing them separately into thermal contact with a reference body. A thermometer represents such a reference body. A practical measure of temperature (a scale) can be provided by an observable intensive property defines the state of the thermometer. If the thermometer indicates the same "temperature" when in contact with two different bodies then those two bodies are in thermal equilibrium (or would be if placed in thermal contact).


Once a temperature scale is set by using the state of a thermometer as a reference, the next question to answer is, what happens when two bodies at different temperatures are placed in thermal contact? To answer this we invoke the 1st law. The first law defines the additivity of different forms of energy (heat and work). Heat is the change in the internal energy of objects when they equilibrate in thermal contact, absent work. The 1st law also provides a way to measure "heat" by relating it to an equivalent amount of work. For instance, electrical work can be used to change the state of a substance in a rigid adiabatic container. The amount of work is equivalent to the heat that would result in the same temperature change of the substance *if the energy transfer had been performed thermally and in the absence of work*:


$$\begin{align} \Delta U &= w \tag{adiabatic} \\ &= q\tag{diathermal, rigid}\end{align}$$


Note finally that there is a thermodynamic temperature scale which is based on the 2nd law (as a corollary of the properties of entropy), but in practice we rely on scales whose limiting (ideal) behavior approaches that of the thermodynamic scale.


 4

I like to think of Temperature as a measure of the LEVEL of energy, but not the QUANTITY of energy.


An analogy with water tank levels:
A small tank (0.1m dia) with high level (1m)
A large tank (1m dia) with a small level (0.1m)


It's obvious which has a higher level and which direction the flow would be if you connect the tanks together.


However the large tank has a larger quantity (78 litres) compared to the small tank (7.8 litres), so it has a greater capacity.


Similarly with Temperature - compare a boiling kettle and a huge iceberg. One has a higher level of energy, the other has a higher quantity of energy.


 1

Temperature is the average kinetic energy of the particles making up a system. That's it, and it is correct. Any other definition, and there are many of this page, are either equivalent or incorrect. What's the problem?


 -6