WorksPhysics and Astronomy
Work extraction from a single negative-temperature bath: a temperature gradient-driven heat flow
Abstract
Work dissipation into a thermal bath is standard, whereas the reverse process – sole work extraction from a thermal bath without a net state change – contradicts the Kelvin-Planck formulation of the second law of thermodynamics. However, this prohibition is bypassed for baths at negative absolute temperature, sparking ongoing debate regarding their thermodynamic stability. Here, we reconcile the second law with sole work extraction from a negative-temperature bath by considering a large virtual assembly of weakly coupled working systems rather than an isolated machine. By assigning this assembly a canonical temperature derived from its Shannon/information entropy, the framework naturally extends to molecular-scale machines. We demonstrate paradigmatic examples where the assembly's canonical temperature is cooler than the negative-temperature bath. Consequently, sole work extraction represents standard heat flow from a hot system (the negative-temperature bath) to a cooler system (the working assembly), rendering the process fully consistent with the second law. This informational and statistical-mechanical framework also naturally explains the counter-intuitive phenomenon of "donkey behavior", where increasing the workload in a negative-temperature bath leads to enhanced work extraction.
Introduction
In 1842, Julius Mayer formulated his equivalence principle that work can dissipate into heat [1], suggesting that heat is a form of energy that can originate from work. This principle became the foundation of the first law of thermodynamics, i.e., energy conservation, while also pointing to a preferred direction of energy conversion. The reverse process—converting heat into work as a usable form of energy—is conceptually more subtle and motivated the second law of thermodynamics, which introduces entropy and links work extraction to an entropy increase. Among its various formulations, we take the Kelvin–Planck statement as our starting point [2, 3]: it is impossible to extract work from a system operating in a cycle solely by cooling a single heat reservoir. Its connection to entropy follows because cyclic operation means that every macroscopic state variable of the working machine (WM), and in particular its entropy, returns to its initial value after one cycle. Extracting work 1 from a single reservoir then implies by the first law. For a positive bath temperature , heat loss from the bath lowers its entropy by . Since the entropy of the WM does not change, the total entropy would decrease, which is forbidden. Thus, the Kelvin–Planck statement implies that a single heat bath at positive temperature cannot yield net work without changing the entropy of the WM2.
Motivated by the observation of negative spin temperatures [4], Ramsey reformulated the second law for baths at negative temperature [5]3. In particular, a bath at negative temperature can transfer heat to a WM and thereby enable work production while increasing total entropy; conversely, work cannot simply be dissipated into such a bath without a change of state (entropy) of the WM.
In summary, for a WM in contact with a bath, the two temperature regimes behave oppositely: at positive bath temperatures, work can dissipate into heat in the bath, whereas pure work extraction from the bath is impossible. At negative bath temperatures, work can be extracted from the bath, whereas work cannot simply be converted into heat in the bath (Figure 1).
Figure 1. Schematic of the relation between working machine, symbolized by a pendulum, and temperature of a bath. For positive temperatures () work may dissipate to heat, i.e. the working machine heats up the bath in its vicinity. The reverse process, i.e. pure extraction of work from the bath is impossible. Vice versa a negative temperature bath () allows the latter, but the 2nd law forbids that the dissipation of work into heat.
This reformulation of the 2nd law sounds awkward because it distinguishes between the sign of the bath’s temperature. perature. Instead one would prefer a consistent description of this scenarios in a concise form related to basic thermodynamic quantities. Struchtrup avoided this by denying the “real” existence of negative temperatures [6, 7], and instead he considered them as apparent phenomena and as some kind of non-equilibrium parameter. In contrast, our concept accepts negative temperatures of the bath in the same way as positive ones. The main idea is to consider the interaction of bath and working machine, i.e. work dissipation and work extraction in accordance with Clausius’s formulation of the 2nd law of thermodynamics [8, 9], that direction of heat flow is always from hot to cold. This requires to reformulate dissipation and extraction of work as some heat flow process, i.e. we have to assign a working machine a “temperature”. In this concept negative temperatures are consistently included within the framework of thermodynamics, and it reconciles Ramsey’s attempt to describe work extraction from negative temperature baths with the 2nd law of thermodynamics.
Weakly coupled working machines as a canonical ensemble
In conventional thermodynamics, a heat bath consists of a vast number of particles with many uncontrollable microscopic degrees of freedom, whereas a working machine (WM) is a macroscopic device governed by only a few controllable degrees of freedom. For molecular-scale machines, however, this sharp distinction blurs: their characteristic energies and dynamical timescales approach those of the surrounding bath particles, making it natural to assign a temperature to the machine itself.
We first consider working machines with a single degree of freedom, such as a weight-lifting mechanism or a one-dimensional harmonic oscillator. Because such a machine possesses no internal degeneracy, its intrinsic entropy vanishes, , which simplifies the conceptual setup. Consider a single WM with energy . We mentally replicate this machine times () and allow weak energetic coupling among the copies so that they can exchange energy (Figure 2). By construction, the initial mean energy of this virtual assembly satisfies
Figure 2. Top: Assignment of a canonical temperature to a working machine (WM). A single WM (here a 1D harmonic oscillator) with energy is replicated times, and weak thermal coupling (red wavy lines) allows energy exchange among the copies. The most probable energy distribution defines a canonical inverse temperature assigned to the WM. Bottom: Work extraction from a hot bath () interpreted as heat transfer down a temperature gradient. Heat absorbed from the bath is converted into work , governed by detailed balance and canonical equilibrium fluctuations in the bath.
Any normalized energy distribution across the assembly must conserve this mean energy,
For large , the probability of observing a given energy distribution scales with its Shannon entropy as
where
Maximizing —or equivalently —with respect to under the energy-conservation constraint (2)4 via a Lagrange multiplier yields the stationarity condition
This directly leads to the canonical distribution
with the partition function . By analogy with standard canonical statistical mechanics, we identify the Lagrange multiplier with the inverse temperature of the WM assembly (in units where ),
Since the mean energy of the canonical distribution is , (1) uniquely relates the energy of the single working machine to its assigned inverse temperature via
Within this framework, work dissipation and work extraction in a thermal bath are both governed by the temperature gradient between the bath and the WM. If the bath is cooler than the WM (), energy flows from the WM into the bath and dissipates as heat. Conversely, if the bath is hotter than the WM (), heat flows from the bath to the WM, where it is converted into work (Figure 2).
Work extraction from a bath at negative temperature
The bath with negative temperature
As a bath capable of exhibiting negative temperatures, we consider a paramagnetic spin-1/2 gas in a homogeneous external magnetic field aligned along the axis. With gyromagnetic ratio , the energy of a single spin is
The inverse temperature of such a paramagnetic spin gas is positive when more spins align parallel to the external field () and negative in the opposite case (), so that
Temperature of a working machine with equidistant energy spacing
For the working machine, we assume a bounded energy spectrum consisting of non-degenerate levels with equidistant spacing ,
which can be realized, for example, by a bounded harmonic oscillator or a weight lifted in a constant force field. Using Eq. (8), the assigned inverse temperature of the WM is determined by
with . The sign of is governed by the energy relative to the midpoint of the spectrum,
A bounded energy spectrum allows the WM itself to reach negative temperatures. In terms of heat transfer from a hot bath to a cooler WM, this enables the WM to equilibrate with a negative-temperature bath and reach the same canonical temperature.
Working machine in contact with a bath at negative temperature
Placing this working machine in a bath at negative temperature with weak energetic coupling induces stochastic transitions across its energy levels. We model these transitions as a stationary Markov process restricted to nearest-neighbor hops.
To determine the transition rates, we first consider the long-time limit in which the WM assembly equilibrates with the bath at inverse temperature (Figure 2). Because the energy spectrum is finite and bounded from above, equilibration is guaranteed. In equilibrium, detailed balance (microreversibility) holds, meaning that joint probabilities for forward and reverse transitions over a time interval are equal,
Writing the joint probability as and using the canonical equilibrium distribution at negative , the nearest-neighbor transition rates
satisfy
just as for positive temperatures. We choose the symmetric Glauber-type rates [12]
with a characteristic rate . For , upward transitions in energy are favored over downward ones. In short, the transition dynamics of the WM is fixed by microreversibility and canonical fluctuations in the final equilibrium state (Figure 2).
We analyze this stochastic dynamics both numerically and analytically, measuring time in units of . The
transition rates in Eq. (17) describe a biased random walk (discrete diffusion) on a linear potential , corresponding to a constant driving force proportional to . Numerical simulations follow the standard procedure outlined in Appendix A. Analytically, the rates form the tridiagonal rate matrix (Appendix B), and the master equation yields the propagator (Green’s function)
Spectral decomposition of gives
with the canonical equilibrium distribution
and a multi-exponential relaxation term (Appendix B).
As a concrete example with levels and bath parameter , we consider two initial states: first, the ground state (), which corresponds to () and thus a very “cool” initial state; second, the middle level (), where Eq. (12) in linear approximations gives , i.e., a much higher initial energy yet still (cooler than the bath).
The sample trajectories in Figure 3 illustrate the drift toward higher energies as heat is drawn from the bath and converted into work. Figure 4 shows how the distribution evolves from and toward the common equilibrium distribution [Eq. (20)]. The absorbed heat converted into work,
Figure 3. Four stochastic trajectories of working machines with equidistant energy levels [Eq. (11)] in contact with a negative-temperature bath (). Trajectories start either from the ground state () or from the middle of the spectrum at (; see text). Transition rates follow Eq. (17).

Figure 4. Time evolution of the energy distribution of working machines starting at (a) the ground state and (b) at (gray), 50 (green), 100 (blue), 500 (magenta), and 1000 (red). Histograms are obtained from 10 000 stochastic trajectories as in Figure 3; solid curves show the analytical Green’s function (Appendix B). The red dotted curve indicates the equilibrium distribution [Eq. (20)] reached as .
is plotted in Figure 5. Because in both cases, work extraction corresponds to heat flow from the hotter negative-temperature bath to the cooler WM assembly. Owing to the upper energy bound, the assembly eventually equilibrates with the bath as , approaching the asymptotic work (red dotted line in Figure 5), where follows from Eq. (12) with replaced by .
Figure 5. Mean heat absorbed from the bath and converted into work for WMs starting at or . Blue circles/dots (as plotted) show results from 10 000 stochastic trajectories, overlaid by the analytical Green’s function result [Eq. (19)]. The red dotted line marks the asymptotic work .
Working machine with internal degrees of freedom
Definition of temperature of the working machine
The previous example of a working machine with a bounded, equidistant energy spectrum had no internal degrees of freedom, i.e., its energy levels were non-degenerate. We now lift this restriction and allow multiple microstates to share the same energy. This degeneracy gives rise to a Boltzmann entropy of a WM at energy ,
As in Sects. II and III, we start from a WM with initial energy , replicate it times, and introduce weak thermal coupling among the copies. After equilibration, the assembly settles into a canonical energy distribution, whose inverse temperature is assigned to the WM at energy . Unlike in Sect. II, the most probable distribution is now obtained by maximizing the negative Kullback–Leibler divergence (Appendix C),
with respect to under the mean-energy constraint. This yields the canonical distribution
with inverse temperature and partition function
Because the mean energy of the assembly equals by construction, the assigned inverse temperature of the WM satisfies
The freely jointed chain model
A prototypical working machine with internal degrees of freedom is the freely jointed chain, a standard model for entropic elasticity in polymers. In its simplest one-dimensional version along the axis, the chain consists of segments of equal length , each oriented either parallel (up, ) or antiparallel (down, ) to the axis. One end is fixed at , while the free end experiences a downward force (with ), realized in Figure 6 by a mass in a homogeneous gravitational field. For segments pointing up and pointing down, the chain length is
Figure 6. Schematic of the freely jointed chain in a bath at positive (left) and negative (right) temperature. One end is fixed at , while the free end carries a mass subject to a downward force (). At positive bath temperature the mass settles below ; at negative bath temperature it is lifted above .
where . The corresponding potential energy is
with the single-segment energy increment
The number of microstates with fixed (and hence energy ) is , giving the WM entropy
Using Eq. (28) and the binomial expansion, the partition function in Eq. (25) evaluates to
where is the energy at full extension along the axis. The mean energy is
From Eq. (26), a WM at initial position with energy is assigned the inverse temperature
where the linear approximation holds for . Thus, when the load hangs below the anchor (), and when it lies above ().
The freely jointed chain in contact with a heat bath at negative temperature
As in Sect. III C, contact with the bath induces Markovian transitions between nearest-neighbor states labeled by [Eq. (27)]. Flipping a single segment changes by and the energy by . Detailed balance at inverse bath temperature requires
Substituting the canonical distribution [Eq. (24)] and the entropy [Eq. (30)] gives
where is the WM entropy change and (linked to the free-energy change ) is the change in the Massieu potential. Following [12], we choose the transition rates
with characteristic timescale . These rates define the rate matrix , with diagonal entries enforcing probability conservation (modified appropriately at the boundaries ). Starting from , the conditional probability (Green’s function) to reach after time is
The drift direction of the free end is governed by (or ), which combines the internal entropic pull toward (where is maximal) with the bath-mediated contribution . Movement along the downward force transfers heat into the bath (), whereas upward movement extracts heat (). For , favors downward motion (), pulling the weight below ; for , favors upward motion (), lifting the weight above .
In the continuum limit ( large, small, ), the discrete master equation approaches a Fokker–Planck / Smoluchowski equation for the probability density ,
with diffusion coefficient (reflecting step size in the continuum limit) and equilibrium center
where is approximated quadratically around its maximum. The corresponding Green’s function is Gaussian,
with mean displacement and variance
For even and even , the discrete conditional probability follows by integrating over a cell of width around
provided is sufficiently large (with boundary adjustments near ).
As shown in Figure 7, starting from () in a negative-temperature bath drives the mean position to , shifting further upward as the bath becomes hotter ( more negative). In the long-time limit, the mean lift and extracted work are governed by the inverse-temperature difference ,
Figure 7. Conditional probability [Eq. (38)] of finding the free end of a chain with segments at position for times (gray), 10 (green), and 300 (red), starting from () under a load force and negative bath temperatures (a) and (b). Histograms show the exact discrete Markov Green’s function [Eqs. (37) and (38)]; solid curves show the Gaussian approximation [Eq. (45)]. By , the system nearly reaches equilibrium centered at in (a) and in (b) [Eq. (40)].
and
scaling quadratically with the load force.
The freely jointed chain as a thermodynamic donkey
The freely jointed chain in a negative-temperature bath exhibits a counterintuitive response to an increased load (Figure 8). Suppose the chain has equilibrated at in the bath, so that , and we take this as the new starting position,
Figure 8. Left: A mass attached to the free end is lifted to in a negative-temperature bath, where a second mass is added. Right: Although the downward load doubles, the combined mass is lifted further to .
Increasing the magnitude of the downward force from to (for instance, by adding a mass or increasing ) increases the segment energy scale,
Although the stronger force pulls downward in , the new equilibrium position shifts upward to
giving a positive net lift
This “donkey behavior” follows directly from heat flow along a temperature gradient. Right after the force increase at , the newly assigned inverse temperature of the WM is
which is cooler than the bath (). Consequently, heat flows from the hotter bath into the cooler WM assembly, lifting the heavier load by
and yielding additional work
If an external work is expended to place the added mass at , the net work gain is
proportional to the square of the force increment.
The freely jointed chain working as a cyclic machine in a single bath
We can use this mechanism to construct a four-step cycle in a single negative-temperature bath (Figure 9). In state 1, WMs carrying a baseline mass are at their bath equilibrium position, , with . In state 2, an additional load mass is attached at . Because the total downward force becomes , the WMs become cooler than the bath,
Figure 9. Four-step cyclic process for extracting work from a single negative-temperature bath. State 1: WMs with baseline mass are at their bath equilibrium position . State 2: An additional load mass is attached at . State 3: Absorbing heat from the bath lifts the combined mass (doing work ) to the new equilibrium position . State 4: The load mass is removed, making the WMs hotter than the bath () so they sink back to while dissipating heat into the bath, returning to state 1.
Heat flows from the bath into the WM assembly (), lifting the combined mass to the new equilibrium position (state 3),
and performing work
In state 4, the load mass is removed, making the WMs hotter than the bath,
Heat now flows from the WMs back into the bath as the baseline mass returns to (state 1), dissipating heat with . Over a full cycle, the net work produced is
corresponding to an efficiency with respect to the absorbed heat of
Thus, a cyclic engine operating in a single negative-temperature bath cannot convert all absorbed heat into net cycle work, as part of the lifted energy must be redissipated into the bath when resetting the cycle.
Summary and discussion
How work can be extracted from a bath at negative temperature remains a subject of lively debate. Ramsey proposed extending the Kelvin–Planck formulation of the second law of thermodynamics [5], whereas Struchtrup [6] argued that negative temperatures do not represent genuine equilibrium temperatures but rather non-equilibrium parameters. Here, we offer a resolution that neither modifies the second law nor denies negative temperatures. By assigning a canonical temperature to a working machine and comparing it with that of the bath, the temperature gradient dictates the direction of heat flow from hot to cold, and the heat transferred corresponds directly to the work performed. In our examples, a bounded energy spectrum enables the working machine to equilibrate with the bath and adopt its temperature.
Key ingredients of this approach are twofold: first, we consider an assembly of weakly coupled working machines rather than a single machine, defining a canonical temperature for the assembly by maximizing its Shannon entropy, which is also in the spirit of Jaynes’s maximum-entropy approach to statistical mechanics [13]. Second, we assume that a WM placed in a negative-temperature bath approaches a stationary state described by a canonical distribution , as shown for systems at negative temperatures [10, 11]. Building on earlier work by Baldovin et al. [14], a general microscopic Langevin and Fokker–Planck description was derived via timescale separation for a slow heavy particle coupled to a fast bath at negative temperature. The existence of a steady state and detailed balance was demonstrated [15]. Crucially, this stationary state is stable, meaning that an initial energy distribution relaxes toward it with decreasing Boltzmann -function (increasing Shannon entropy), as shown recently in an elegant way in a kinetic model with a Stosszahlansatz by Lucente et al. [16]. Additionally it was shown in this model for the stationary state, that detailed balance, i.e. microreversibility, holds, i.e. the stationary state is also an equilibrium state. With these foundations, the dynamics of a WM in a negative-temperature bath is naturally treated within stochastic thermodynamics, obtaining transition rates from the principle of detailed balance and canonical fluctuations around the asymptotic equilibrium distribution.
Several aspects warrant further discussion. Usually, a working machine is viewed as a macroscopic device, making the assignment of a temperature seem counterintuitive. For microscopic machines, however, this picture is much more natural—especially when they operate collectively in assemblies (such as motors in muscle contraction), where assigning a temperature becomes physically transparent. One might also object that heat flow between two systems at different temperatures presupposes that both start in equilibrium with well-defined distributions. In our setup, a single WM starts in a definite state of energy , and replicating it times with weak coupling produces an equilibrium assembly with mean energy . Nevertheless, on long timescales the mean heat uptake—and thus the mean work performed—does not depend on the details of the initial distribution , but only on its initial mean . For an arbitrary initial distribution with mean in a bath at inverse temperature , the long-time joint probability factorizes,
so the mean work depends solely on the initial mean energy,
Finally, consider how the temperature of the WM assembly relates to that of the bath in determining heat flow. For the WM assembly, we obtain the canonical temperature by maximizing its Shannon entropy; for the bath, maximizing its Shannon entropy gives the same temperature as the standard Boltzmann entropy [17]. Because thermal coupling between the WM assembly and the bath is weak, the total Shannon entropy of the combined system is given by the weighted sum of the individual Shannon entropies. Since canonical distributions satisfy , heat flow from the hotter system (the bath) to the cooler system (the WM assembly) increases the combined Shannon entropy until both share the same canonical temperature at maximum entropy, i.e. heat flow is related to the canonical temperature difference. In this context it should be noted that the gradient of the canonical temperature as driving force of heat flow holds more generally than that of the Boltzmann temperature [18, 19].
Simulation
Stochastic transitions across the working machine’s energy spectrum were simulated using the nearest-neighbor rates in Eq. (17) and a small time step (measured in units of ). For sufficiently small , the single-step probabilities for a hop up or down () are approximated by , and the probability to remain in state is , with reflecting boundary conditions at and . Averaging over sample trajectories starting from the same initial state yields the time-dependent energy distribution.
Analytical and numerical stochastic dynamics in the bath
Within the bath, the WM undergoes a stationary Markov process governed by the master equation for the state probabilities
with ensuring probability conservation. For nearest-neighbor transitions, Eq. (17) gives upward rate and downward rate . This yields the tridiagonal rate matrix
describing discrete diffusion in a linear potential . Its eigenvalues , right eigenvectors , and left eigenvectors are, for ,
and for ,
with
Spectral decomposition of the propagator gives the Green’s function for a transition in time ,
whose matrix elements take the form
with the equilibrium distribution
and a multi-exponential relaxation term .
Most probable distribution for WMs with internal degrees of freedom
Consider an assembly of working machines with energy occupation numbers . The number of ways to distribute the machines according to is the multinomial coefficient . With microstates per energy level , the total number of compatible microstates is
using Stirling’s approximation, where
is the negative Kullback–Leibler divergence with and (unnormalized, since any normalization factor only shifts by a constant that drops out of the maximization). By equal a priori probabilities of a single microstate (principle of equal weight), the probability of observing distribution satisfies . Maximizing under the mean-energy constraint
with Lagrange multiplier via
gives the canonical distribution
References
- [2]W. Thomson, “XV—on the dynamical theory of heat, with numerical results deduced from Mr Joule’s equivalent of a thermal unit, and M. Regnault’s observations on steam,” Earth and Environmental Science Transactions of The Royal Society of Edinburgh 20, 261–288 (1853).
- [3]M. Planck, Vorlesungen über Thermodynamik (Walter de Gruyter, 2011).
- [4]E. M. Purcell and R. V. Pound, “A nuclear spin system at negative temperature,” Physical Review 81, 279 (1951).
- [5]N. F. Ramsey, “Thermodynamics and statistical mechanics at negative absolute temperatures,” Physical Review 103, 20 (1956).DOI
- [6]H. Struchtrup, “Work storage in states of apparent negative thermodynamic temperature,” Physical Review Letters 120, 250602 (2018).DOI
- [7]H. Struchtrup, “Efficiencies and work losses for cycles interacting with reservoirs of apparent negative temperatures,” Entropy 21, 749 (2019).DOI
- [8]R. Clausius, Ueber die bewegende Kraft der Waerme: und die Gesetze, welche sich daraus für die Waermelehre selbst ableiten lassen, 99 (W. Engelmann, 1898).
- [9]R. Clausius, The mechanical theory of heat (Macmillan, 1879).
- [10]A. Puglisi, A. Sarracino, and A. Vulpiani, “Temperature in and out of equilibrium: A review of concepts, tools and attempts,” Physics Reports 709, 1–60 (2017).DOI
- [11]M. Baldovin, S. Iubini, R. Livi, and A. Vulpiani, “Statistical mechanics of systems with negative temperature,” Physics Reports (2021).
- [12]W. Nadler and K. Schulten, “Generalized moment expansion for observables of stochastic processes in dimensions greater than 1- application to mossbauer spectra of proteins,” J Chem Phys 84, 4015–4025 (1986).DOI
- [13]E. T. Jaynes, “Information theory and statistical mechanics,” Physical Review 106, 620–630 (1957).DOI
- [14]M. Baldovin, A. Puglisi, and A. Vulpiani, “Langevin equation in systems with also negative temperatures,” Journal of Statistical Mechanics: Theory and Experiment 2018, 043207 (2018).DOI
- [15]M. Baldovin, A. Vulpiani, A. Puglisi, and A. Prados, “Derivation of a Langevin equation in a system with multiple scales: the case of negative temperatures,” Physical Review E 99, 060101 (2019).DOI
- [16]D. Lucente, M. Baldovin, A. Puglisi, and A. Vulpiani, “H-theorem at negative temperature: the random exchange model with bounds,” Journal of Statistical Mechanics: Theory and Experiment 2025, 013210 (2025).DOI
- [17]F. Reif, Fundamentals of Statistical and Thermal Physics (McGraw-Hill, New York, 1965).
- [18]W. R. Bauer, “How geometrically frustrated systems challenge our notion of thermodynamics,” Journal of Statistical Mechanics: Theory and Experiment 2022, 033208 (2022).DOI
- [19]W. R. Bauer, “Geometrically frustrated systems which are as singles hotter than in company,” Journal of Physics A: Mathematical and Theoretical 57, 325005 (2024).DOI
Machine contribution statement
No AI-use declaration is available for this version in Valency.
The available record does not establish whether AI systems or models contributed to this work.







