
Thermodynamics is a field that started out as engineering, as Sadi Carnot thought about how to increase the efficiency of steam engines, but eventually, it turned into one of the fundamental topics in physics. The name "thermodynamics" still retains however the memory of its modest beginnings.
The basic empiric observation at the core of thermodynamics is this: the temperatures of various things in contact with each other all tend toward one single equilibrium temperature and when this equilibrium is reached, nothing changes furthermore. The hot things lose some of their energy and the cold ones gain that energy until their temperatures become equal. And as it happens, a cold body never becomes colder for some other hot body to get even hotter.
What makes temperature so differentWe're so used to this phenomenon that it sounds weird to make much fuss about it. And indeed, until the 19th century, nobody really cared to look at it more carefully. However, as it turns out, this phenomenon is in fact a very unique kind of phenomenon - literally
all the other physical phenomena are different.
For example, if you have an electric motor, the electric energy is used to move something (it is turned into kinetic energy); but the exact same motor can be used in reverse to generate electricity from motion (that's what happens in a hydroelectric power plant). In case of a pendulum, the gravitational energy stored inside the body (called potential energy) is turned

into motion as the body descends, but then, the motion is turned back into gravitational energy as the body ascends - the body doesn't stop in the equilibrium position, but oscillates around it. If one takes two metal spheres and connects them with a metal wire and the two spheres have different electric charges (say, one positive and the other negative), the electric charges will tend towards equilibrium (where both spheres have the same electric charge) but the charges will not stop - they will continue to move all the way until the initial electric state is reversed (the charges will oscillate around equilibrium).
Why is the electric charge different from how the temperature works and why are
all the physical phenomena different from the thermodynamic phenomenon? Moreover, as it turns out, all the irreversibility that we find in nature is derived from this thermodynamic phenomenon involving the equalization of temperatures. In other words, in a world without temperature, everything would be reversible. How would a world where temperature makes no sense be like?
You may wonder why is it so difficult to even imagine that temperature would not exist. A world without electricity, without gravity or even without motion seems easier to imagine. Why is temperature so fundamental? One way of imagining that temperature does not exist is to imagine all the things having the exact same temperature - the concept would then lose its relevance. Maybe the world would eventually reach this state as more and more temperatures get equalized - this hypothetical state is called the "thermal death of the universe". Would such a state of the world be without motion or, on the contrary, full of reversible motions finally free from the constraint imposed by the thermal phenomenon?
Take a rubber string and use it to make a yo-yo. If you let the yo-yo drop, the rubber will pull it back up and the yo-yo will oscillate (it's the same phenomenon as the pendulum: gravitational energy turning into motion and vice-versa). But the oscillations don't last forever as they are smaller and smaller until the yo-yo stops. There's a hint that the yo-yo stops due to a thermal phenomenon. Take the rubber and place it between your lips while stretching it. You will be able to feel that it heats up a little. In other words, the rubber works in such a way that the gravitational energy doesn't all go into the motion of the yo-yo, some of that energy turns into heat and gets wasted. Gradually, after many oscillations, all of it has dispersed as heat. This would happen even if no air was present: the energy would still gradually dissipate into the void because the rubber string emanates infrared light. Moreover, the friction with the air, which also heats up the yo-yo a little bit, doesn't provide any energy back into the yo-yo, on the contrary. And that's the catch:
unlike all other phenomena, heat only goes in one direction. That's why the yo-yo eventually stops - because heat cannot get from the atmosphere (or from the infrared light) back into the rubber band and increase the motion of the yo-yo.
So, if it will
ever come about, the thermal death will be rather motionless because as we tend in that direction, various motions get slowed down and stopped. Another point is that all irreversibility comes from this phenomenon alone. This thermodynamic aspect of nature comes in conjunction with all the other phenomena making all the processes in nature irreversible to a larger or smaller degree. But what is the temperature and why does it work in such an unusual way?
Fantasies about the thermometerOne way of getting some clues is to look at an ordinary thermometer and use your imagination a little. The first who did this was the 17th century inventor Robert Boyle. Boyle was mainly an alchemist but he is best known today for his work entitled
The Sceptical Chymist. He is considered the first chemist. By looking at a thermometer, he concluded that nature must be made of atoms! He wondered
why was it that when temperature increased the liquid in the thermometer also expanded its volume. It's easy to see
that this happens, but
why does it?
To answer the question, he made a model. One can understand this phenomenon by imagining that the liquid is made of many tiny particles that move at random in all directions but, of course, subjected to gravity (which pulls them downward to the bottom of the tube). We can assume that the higher the temperature, the faster they move and, as a consequence, they manage to get a little higher up in the tube defeating gravity just a little bit more than before. Thus, the volume of the liquid gets larger - just because of the increased motion of the particles that make up the liquid.
If this story doesn't seem very convincing, you can try to use it to make a
prediction: Suppose you don't allow the volume to increase, then what? According to the assumption that temperature tells you how fast the particles are moving (on average, that is), it would mean that, if volume is kept constant,
pressure would increase - the particles would hit the walls of the container more often and thus the overall force exerted by the liquid on the container would increase. This prediction turns to be correct.
Another prediction can be made about what happens when a liquid evaporates little by little. Evaporation means that some particles that were part of the liquid escape out in the atmosphere. It's obviously which particles manage to do this escape: the fastest ones. Thus, when evaporation occurs, the liquid is left, on average, with slower moving particles - i.e. the liquid gets a little bit colder. This is also observed. It is the reason why, for instance, you feel cold when you are wet - even if you're on a beach in August and just coming out of the sea.
Brownian motionEven so, in spite of such predictions, physicists weren't very impressed with Boyle's
story of atoms until the late 19th century and early 20th century. However, the story was made more credible by an observation made by the 19th century botanist Robert Brown. He saw through his microscope that tiny suspensions in a liquid move at random jiggling in various directions as if they were pushed around by some smaller unseen entities. This observation flatly contradicted the view that the liquid is a continuous mass of material. Moreover, in the beginning of the 20th century, Albert Einstein managed to describe mathematically exactly how the suspensions should move if they really were pushed around by the particles in the liquid. This kind of motion where each step is made in a random direction is called a
random walk. Jean Perrin then watched very carefully whether the suspensions really followed Einstein's precise prediction. They did. And when you heat up the liquid, the suspension moves faster and it gets pushed further away in the same amount of time.
So, temperature indeed is not at all like the electric charge or like any other physical property. It actually describes the average motion of many particles - it describes
how fast they are moving on the average. But why do temperatures tend toward an equilibrium value where they
stop changing? Why is it usually easier to heat up something than it is to make it colder? (Unless the body already has a very high temperature.)
Getting irreversibility out of the fundamentally reversible phenomenaWhen one starts to view temperature as a consequence of the basic motion of particles, one is faced with a peculiar and apparently insolvable puzzle. At the time, physicists thought that there must be something wrong with the atomic description of matter because all motion was described by
Newton's laws and these laws are
reversible. (The laws of quantum mechanics are reversible as well, so that doesn't solve the puzzle.) How could one just combine the reversible motion of many particles and obtain the irreversibility that characterizes thermodynamics? It just seemed impossible.
The solution was given in the 19th century by Ludwig Boltzmann. Boltzmann thought that the solution to the paradox of irreversibility, called Loschmidt's paradox, is to understand that on top of Newton's laws, one also has
randomness. Prior to Boltzmann, everybody thought that errors are human, while "nature" is perfect - it is a wonderful deterministic masterpiece. Errors were thought to occur only because
we don't know everything that we need to know. In this context, Boltzmann came with a theory claiming that errors are an intrinsic part of nature! For him, randomness was an objective aspect of the universe, and not just an issue of our incomplete knowledge. While some of the greatest revolutions in science took man away from the center of the universe, Boltzmann's revolution was to take something which for millennia was thought to be specifically human and insert it into the very heart of nature.
Loschmidt, and virtually everybody else, was utterly opposed to this solution because randomness itself is reversible - if one particle takes a step at random in one direction, it can very well take the next step back to where it came. So it seemed that one was still combining just reversibility and claimed to get irreversibility. Loschmidt thought this was impossible.
Boltzmann, on the other hand, argued that the irreversibility of thermodynamics was only statistical, not absolute, that
in principle you could witness two bodies going from having the same temperature to a situation when one is colder and the other one hotter. This process is just very unlikely due to the huge number of particles involved, all moving at random. In other words, a particle could, in principle, reverse its motion exactly and return to the same position in space from where it originally came from, but the probability for this reversal was incredibly small. And to have a huge number of particles going back to the initial non-equilibrium state, even if they don't follow the exact same route backward, is even more improbable. This is why such a thing is never actually observed. So, as paradoxical as it might seem, with the help of randomness, itself a reversible phenomenon, one can get overall irreversibility.
The missing piece of the puzzle was Einstein's proof of how the random walk actually goes. For some reason, Boltzmann didn't do the demonstration himself and, in this respect, he had relied just on intuitive arguments. But others had different intuitions. Frustrated that people don't accept his arguments, he eventually committed suicide complaining that he was born ahead of his time. Apparently, he died without reading Einstein's paper - which was published more than a year before and which ended up converting many of the most prominent anti-atomists. The missing piece provided by Einstein was the somewhat non-intuitive result that if something moved at random, it nevertheless drifted away from its original position. Randomness really can thus push things around and has a cumulative effect. Randomness doesn't cancel itself. This explains diffusion and other irreversible phenomena including the reaching of thermodynamic equilibrium.
What is equilibrium?To describe how a system reaches equilibrium, Boltzmann had invented a new piece of mathematics that for some reason outranged the mathematicians of his day adding up to the controversy. He invented the idea that not only things change in time, but that the probability itself that some thing is one way or another can change in time. Frankly, I don't understand why this should be so outrageous but it was. Mathematicians used to think that probabilities could only be static.

The best way to understand equilibrium is to take a slightly more detached view from the individual molecular motions. You can imagine something, such as a gas or the liquid in a thermometer, and fantasize about counting how many particles have that velocity, how many have that slightly higher velocity, and so on for all the possible velocities. This fantasy is called a
probability distribution. It is a function that tells you what the chance is that if you pick some particle at random, it would have one velocity or another. Then, to describe how something moves toward equilibrium accounts to describing how this probability distribution changes in time toward a certain end result.
This function is at the core of statistical physics - the statistical approach to thermodynamics. Once one deduces the shape of this function, one can make innumerable predictions about all the macroscopic properties and about how these properties are connected to each other. So, the type of reasoning Boyle managed to put forward in the 17th century for connecting the temperature, the volume and the pressure has now been generalized to include any macroscopic property whatsoever. All one needs to deduce is the shape of the microscopic probability distribution for the particular macroscopic conditions imposed on the system. Moreover, another of the atomists, Willard Gibbs, managed to show how one can deduce the probability distribution for any conditions given that one knows just the probability distribution for the isolated system. (More recently, physicists have learned how to get any such equilibrium probability distributions, for any external conditions, directly, without involving the idea of the isolated system.)
But what is the end result? What is the shape of the probability distribution? One of the great things James Clerk Maxwell, one of the most outstanding early converts to the atomist perspective, and Boltzmann managed to do was to find how this function looks like at equilibrium. The image above depicts how the distribution looks like for some gases at 25 degrees Celsius.
The idea that leads to this result is that in the equilibrium the system reaches
the most probable of all its possible states. What does this mean? "Most probable". It means that the system may be in many possible ways microscopically for it to look in
one certain way to our macroscopic instruments (such as eyes, thermometers and so on).
The macroscopic instruments detect just
average things. We have already seen this in case of temperature and pressure. But this is true of all measurements. No measurement is instantaneous - the measurement apparatus snoops at a certain property for some time and during this period, the microscopic state of the system is in constant change. But the apparatus just gives you a number, a gross oversimplification of what actually happens microscopically - it gives you an average. (This is true not only of artificial measuring devices but also about our natural organs of perception.) As measuring devices got better and better and their time resolution increased, we saw that this assumption about their averaging action was indeed correct. (But even modern measuring devices are far from delivering "instantaneous" measurements.)
So, it is reasoned that the system goes toward that particular macroscopic state that can be realized in largest number of microscopic ways. This is the equilibrium state. Microscopically, it is still in constant change, but from a macroscopic perspective, it looks like nothing happens. So, things move toward those states of being that hide that they are in constant motion inside (microscopically). And the reason why they're doing such a thing is the randomness associated to the microscopic motion - this pushes them toward the most probable state.
To return to engineering: What happens for instance when an air conditioning is turned on? The air in the room used to be in equilibrium. But now it is placed in contact with a portion of incoming cooler air. The hotter air together with the constant injection of cooler air form a system which at first is out of equilibrium, but this system tends toward a new equilibrium. The incoming cooler air has a certain probability distribution while the hotter air in the room has a different probability distribution. These two functions merge together and eventually produce the final equilibrium distribution. This distribution is as such that the temperature in the room is cooler than before (but hotter than the temperature of the air pumped up by the air conditioner).