Maxwell’s demon and the relationship between information and irreversibility

Thermodynamics is one of the oldest physical theories with its origins going back to the beginnings of the 19th century. The theory was initially developed to tackle practical problems, such as the performance of steam engines. However, within a few decades, thermodynamics was formulated on firm grounds providing one of the most fundamental laws of physics, the second law of thermodynamics.

The second law was initially formulated in terms of “no-go theorems”, i.e. Statements of something that could never happen. One such statement, attributed to Clausius, says that heat could never be transferred from a cold to a hot body without any expenditure of work. Under the mathematical framework of thermodynamics this and other no-go theorems could be formulated in a single physical statement, that the entropy production of a physical process could never be non-negative. This is the precise statement of the second law.

Entropy production, and not entropy, is the core concept behind the notion of irreversibility. A given process is said to be reversible, having zero entropy production, if one can devise a new process, its reverse, that brings the system back to its initial state while exchanging exactly the same amount of work and heat that has been previously exchanged in the direct process. For example, if a hot cup of coffee is let alone in a warm environment, it will spontaneously thermalize to the environment temperature. In order to get the coffee hot again one would need to heat it up expending more energy than was previously released as heat, i.e. performing work in accordance to the Clausius’ statement. With these concepts in hand we can describe the first thought experiment providing a deep connection between information and the second law of thermodynamics.

Maxwell’s demon controlling the door that allows the passage of single molecules from one side to the other. The initial hot gas gets hotter at the end of the process while the cold gas gets colder.

By the end of the 19th century, the atomist James Clerk Maxwell proposed an intriguing possibility at the very end of his book entitled Theory of Heat 1. Maxwell considered two gases brought together but separated by a wall that did not allow the passage of energy (heat) or molecules. The two gases, as a composite system, were completely isolated from the remainder of their environment, see figure. In the middle of the wall, Maxwell imagined a door that, if open, could allow the passage of a single gas molecule from one side to the other. Maxwell envisaged what he called an intelligent being of molecular size and that could open and close the door at will. Later, this being was called a demon by Kelvin, hence Maxwell’s demon 2.

The temperature of a gas is proportionally related to the average of the squared velocities of the gas molecules. This means that the hotter a gas is the hotter the velocity of its molecules are, on average. Maxwell assumed that the demon was able to obtain information about the velocity of an approaching molecule, from whichever side of the door. The demon would allow the molecules faster than a suitable reference velocity to pass from the cold to the hot gas. If the faster molecules came from the hot gas, he would simply not allow them to pass to the cold gas. The completely opposite action would be taken if a molecule with a small velocity would approach the door.

Given a sufficient amount of time, all fast molecules will gather in the hot gas while the slow molecules will gather in the cold gas. Therefore, the cold gas would become colder and the hot gas would become hotter. From the macroscopic point of view, an observer would then see the transfer of heat from a cold to a hot body without any work expenditure, in contradiction to the Clausius’ statement of the second law. The demon proposed by Maxwell seemed to be capable of violating the second law of thermodynamics!

The essence of Maxwell’s demon lies in two features of the described process. First, the demon is assumed to be able to perform a measurement, i.e. extract information, of the velocities of the gas molecules. Second, with that information the demon is capable of taking a pre-defined action, a conditioned evolution, either opening or not opening the door depending on the velocity and on the side from which the molecule approaches. In modern language, a measurement followed by a conditioned evolution is called a feedback control mechanism. Therefore, fundamentally, Maxwell’s demon is nothing but a feedback controller. This realization de-humanizes the personality initially introduced by Maxwell as an intelligent being, since a feedback controller is merely a system pre-arranged to take different actions depending on the information acquired.

After a century of debate the conundrum posed by Maxwell was solved by the acknowledgment that the information acquired by the demon should be explicitly taken into account in the second law of thermodynamics. Therefore, recent thermodynamic descriptions of this and related protocols put on an equal footing the entropy production, quantifying the irreversibility of the process, and the information acquired by the demon. Although the thought experiment proposed by Maxwell is more than a century old it still strongly spurs the investigation of the relationship between information and thermodynamics both in the classical and in the quantum realms. Due to its historic role, Maxwell’s demon has become the paradigmatic protocol linking these two fundamental concepts, information and irreversibility, giving rise to information thermodynamics 3.


  1. J. C. Maxwell, Theory of Heat 4th edition, London: Longmans, Green, and Co. (1875).
  2. Maxwell’s Demon 2: Entropy, Classical and Quantum Information, Computing, edited by H. S. Leff and A. F. Rex (CRC Press, Boca Raton, 2002).
  3. J. M. R. Parrondo, J. M. Horowitz, and T. Sagawa, Thermodynamics of information, Nat. Phys. 11, 131 (2015).

Written by

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *