What exactly is temperature? I'm trying to have a really deep understanding of quantum physics and so I went back to what is blackbody radiation until suddenly I realized that my understanding of temperature is that of... well, hotness or coldness.
Trying to come up with a more fundamental understanding I realized it's kind of density of energy but nobody actually refers to temperature as density of energy.
Can somebody explain me in normal english what temperature is and how is it different from energy density?
 A: There are two simple ways to get a feeling what temperature is:


*

*When we discuss the ideal gas in thermodynamics, we introduce temperature $T$ via the mean kinetic energy of the gas molecules, which is
$$ \langle E_{\mathrm{kin}}\rangle = \frac{3}{2}k_{\mathrm{B}}T.$$
Behind this is the idea that motion in three dimensions has three degrees of freedom, which is the 3 in the numerator on the right hand side above.

*The more general way to introduce temperature is via entropy: If you have a closed system (closed means, it does not exchange energy with its surroundings) with energy $E$ in an equilibrium state, its temperature is given by
$$ \frac{1}{T} = \frac{dS(E)}{dE},$$
where $S(E)$ is the entropy of the system. The stronger the change of entropy with energy, the lower the temperature.


The second way to introduce temperature requires an understanding of entropy, which is given by
$$ S(E) = k_{\mathrm{B}}\ln\Omega(E),$$
where $\Omega(E)$ is the number of microstates of the system that are compatible with energy $E$.
A: Okay, so you may have lived in a house, and you may have noticed that as you live in a house, things tend to get dusty. There is just a dust on everything. Until you clean it off.
You may have also noticed that the dust is in greater density in certain places than others. So there might be more dust on the floor than on a high shelf. There is still dust on the high shelf, but something about gravity doesn't allow it to accumulate quite as much as it would have. Carpets are significantly more full of dust than hardwood floors, when you go to vacuum them.
What is happening is, under random jostling of the dust, there is some sort of probability for it to go from one to another, from the low shelf to the high shelf, from the carpet to the couch, and that is equalizing, so that roughly the same amount of dust on a given day goes from one shelf to another, or from the carpet to the wood floor. The density does have to do with it, but it's not a direct relation. The more dense the dust is in a thing, generally, the more likely it is to give dust to its surroundings that are less dusty than it. But different things -- carpet, hardwood -- hold dust more or less aggressively.
We call this quantity the “chemical potential” of the dust and two surfaces exchange dust until they come to the same chemical potential. It has to do with the amount of energy that is released by dust being in one place instead of another, which is why high places get less dusty than low places. A vertical surface costs more binding energy for the dust to stick there so dust does not settle so much on vertical surfaces. I say “surfaces” but also the air has a chemical potential for dust, and they all come to equilibrium.
One could even define that a carpet has more “dust accumulation spots” for dust to occupy, such that one could eventually discover “at equilibrium, each spot contains the same amount of dust, proportional to the chemical potential.” In that precise sense, the density is independent of any surface characteristics.
So temperature is just a chemical potential for energy itself, and one can similarly identify “degrees of freedom” that an object can move and this store energy: and in this precise sense the temperature is the average energy in those degrees of freedom.  But when you are defining it, and you don't want to reference degrees of freedom, like with the dust, you define it just by the tendency of two systems in thermal contact to donate energy to each other through random jitters and jiggles. so it's literally defined by the fact that energy goes from a surface of hot temperature to a surface of low temperature, but it does have an indirect connection to average thermal energy density inside an object, since if you increase that energy density, the object wants more to give energy to other things. But it depends a lot on the properties of the object too, how many degrees of freedom it has, how much it wants to give that energy away. If it's a “carpet” like liquid water is, it takes a lot of flow of thermal energy to change the temperature. and that's just because it's got lots of degrees of freedom.
A: *

*Temperature is that which is in common between two systems in thermal equilibrium.

*Temperature is a measure of propensity to emit heat, and is quantified by the relationship
$$
\frac{T_1}{T_2} = \frac{Q_1}{Q_2}
$$
where $Q_1$ and $Q_2$ are the heats exchanged by a reversible heat engine working between reservoirs at temperatures $T_1$, $T_2$.

*Temperature can equally well be defined in terms of entropy and internal energy by
$$
\frac{\partial S}{\partial E} = \frac{1}{T}
$$
So what is temperature then? In thermal equilibrium it is a measure of the range of energy over which energy is physically stored in microscopic degrees of freedom of the system (see the Boltzmann factor $\exp(-\epsilon / k T)$). More generally I would say that it is a sort of 'don't want to go there' measure for energy. That is to say, when energy is distributed around a bunch of systems or parts of a system, temperature indicates the degree to which each part is trying to get rid of energy, or the degree to which each part insists on a high price (a high negative-entropy price, that is), if you want to put more energy there. By 'high negative-entropy price' I mean that when you try to put more energy in a high-temperature place, the entropy of that place refuses to grow very much, whereas the entropy of a colder place where the energy came from changes by more, per unit energy.
