---
title: "Entropy, irreversibility and heat transfer | Sandbox Physics"
description: "Compare the entropy changes of a hot body and a cold body. Use their sum to explain the direction of spontaneous heat flow."
canonical_url: "https://sandboxphysics.com/learn/heat-and-statistics/entropy-and-irreversibility/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/learn/heat-and-statistics/entropy-and-irreversibility/"
last_modified: "2026-11-24"
---

[Volume 5 · Heat, Probability and Matter](https://sandboxphysics.com/learn/heat-and-statistics/)

# Why does heat flow spontaneously from hot to cold?

Compare the entropy changes of a hot body and a cold body. Use their sum to explain the direction of spontaneous heat flow.

Before you start: [Chapter 1](https://sandboxphysics.com/learn/heat-and-statistics/temperature-and-thermal-equilibrium/) on temperature, [Chapter 2](https://sandboxphysics.com/learn/heat-and-statistics/molecular-motion-and-pressure/) on probabilities and [Chapter 3](https://sandboxphysics.com/learn/heat-and-statistics/first-law-of-thermodynamics/) on the first law.

After this chapter you can: Choose a system boundary, calculate entropy changes and explain the sign of the total for heat exchange.

The same amount of energy leaving a hot body causes a larger entropy increase when it enters a colder body than the entropy decrease it causes at the hot side. Total entropy rises as heat goes from hot to cold. Energy conservation allows the reverse transfer, but the second law rules it out as the sole spontaneous change of the isolated pair.

## 4.1 Calculate entropy changes for two reservoirs

Let thermal reservoirs at absolute temperatures $T_h>T_c$ exchange energy. Use $Q>0$ for heat leaving the hot reservoir. The temperatures stay essentially fixed because the reservoirs are large. Their entropy changes add to

$$
\Delta S_h=-\frac{Q}{T_h},\qquad
\Delta S_c=\frac{Q}{T_c},\qquad
\Delta S_{\mathrm{total}}=Q\left(\frac{1}{T_c}-\frac{1}{T_h}\right)>0.
$$

For $Q=600\,\mathrm J$ between $T_h=400\,\mathrm K$ and $T_c=300\,\mathrm K$, the hot reservoir loses $1.50\,\mathrm{J/K}$ of entropy and the cold reservoir gains $2.00\,\mathrm{J/K}$. Their total change is $+0.500\,\mathrm{J/K}$. This sign distinguishes the two directions allowed by energy conservation.

## 4.2 Use a reversible path to find a state change

### 4.2.1 Integrate at the changing temperature

Entropy is a state function. To find a change between two equilibrium states, integrate the heat entering the system over its absolute temperature along any reversible path between them.

$$
\Delta S=\int_i^f \frac{\delta Q_{\mathrm{rev}}}{T}.
$$

A finite temperature difference makes direct contact irreversible. The reversible path is a way to compute its endpoints' entropy change. For a body with constant heat capacity $C$, choose a sequence of reservoirs that differ from the body's temperature by arbitrarily small amounts. Along that path $\delta Q_{\mathrm{rev}}=C\,dT$, so

$$
\Delta S=C\ln\!\left(\frac{T_f}{T_i}\right).
$$

Take two bodies with identical heat capacities $C=300\,\mathrm{J/K}$ and initial temperatures $350\,\mathrm K$ and $290\,\mathrm K$. Put them in contact and insulate them from their surroundings. Energy conservation puts their common final temperature at $320\,\mathrm K$. A total of $9.00\,\mathrm{kJ}$ passes from the warmer body to the cooler one.

**Table 4.1** Analytic entropy changes for the isolated pair as it comes to a common temperature.

| Body | Initial temperature | Final temperature | Entropy change |
| --- | --- | --- | --- |
| Hot | $350\,\mathrm K$ | $320\,\mathrm K$ | $-26.88\,\mathrm{J/K}$ |
| Cold | $290\,\mathrm K$ | $320\,\mathrm K$ | $+29.53\,\mathrm{J/K}$ |
| Combined |  |  | $+2.65\,\mathrm{J/K}$ |

- Hot body
- Cold body

**Figure 4.1** Calculated entropy changes as heat accumulates on the cold side of the isolated pair. The warm body loses entropy, the cool body gains more, and the sum rises. At a common temperature the slope of the total curve reaches zero.

### 4.2.2 Compare two paths for expanding a gas

For a reversible isothermal expansion of an ideal gas, the temperature stays fixed and the gas receives heat equal to the work it does. Using the ideal-gas law for the pressure in the work integral gives the gas entropy change

$$
\Delta S_{\mathrm{gas}}=Nk_B\ln\!\left(\frac{V_f}{V_i}\right).
$$

Now let that gas expand freely into a vacuum inside a rigid insulated container. It exchanges no heat and does no work on the surroundings. Its internal energy stays fixed, so its final temperature equals its initial temperature for an ideal gas. The final gas state can match the reversible expansion. Its entropy change is then the same. In free expansion the surroundings receive no entropy, so the positive gas entropy change is also the change for the isolated whole.

## 4.3 Count the microscopic possibilities

A macrostate can describe the number of particles on one side of a box without specifying which particles they are. For four labelled particles, with each independently able to be left or right, there is one assignment with all four on the left. There are six assignments with two on each side. In this simple counting model, each assignment is equally likely at equilibrium.

$$
S=k_B\ln\Omega .
$$

Here $\Omega$ is the number of allowed microstates for the macrostate. The balanced split exceeds the all-left split in entropy by $k_B\ln6$. In a macroscopic system, states with more microscopic possibilities have much larger statistical weight. This helps explain why an initially concentrated gas spreads through the space available to it.

## 4.4 Compare cooling with and without a heat leak

Open [Electrical Calorimeter](https://sandboxphysics.com/labs/calorimeter/). Choose **Ideal insulation** and then **Heat escapes**. Each preset saves a new simulated warming and cooling record with the same sample and heater settings. In **Saved warming and cooling curves**, compare the sample trace at the end of heating and at the end of the cooling window.

**Table 4.2** Calibrated sample probe observations from the two saved simulated records. Heating ends at $240\,\mathrm s$. The room is held at $22.0\,{}^\circ\mathrm C$.

| Preset | Probe at $240\,\mathrm s$ | Probe at $840\,\mathrm s$ |
| --- | --- | --- |
| Ideal insulation | $27.75\,{}^\circ\mathrm C$ | $27.85\,{}^\circ\mathrm C$ |
| Heat escapes | $25.85\,{}^\circ\mathrm C$ | $22.44\,{}^\circ\mathrm C$ |

With ideal insulation, the probe settles toward the slightly warmer bath after the heater turns off. With a heat leak, the bath and probe cool toward room temperature. The model treats the bath, the probe and the room as distinct thermal parts. The temperature traces show the effect of heat flow. An entropy calculation would require these system boundaries, temperatures in kelvin and a model for how the transferred energy changes each part.

## 4.5 Exercises

1. A hot reservoir at $500\,\mathrm K$ transfers $300\,\mathrm J$ to a cold reservoir at $300\,\mathrm K$. Calculate the total entropy change.
2. Can the entropy of a cup of hot water decrease as it cools? Which other entropy change must you include to test the second law?
3. Two bodies have the same constant heat capacity and initial temperatures $360\,\mathrm K$ and $300\,\mathrm K$. They exchange heat inside an insulated enclosure. Find their final temperature.
4. In the isolated two-body model, why does the slope of the total entropy change with respect to transferred heat go to zero at equilibrium?
5. An ideal gas doubles its volume in a reversible isothermal process. Find its entropy change in terms of $N$ and $k_B$.
6. The same initial gas instead expands freely into an insulated vacuum to the same final volume. What are the heat and the gas entropy change?
7. With four labelled particles that can be left or right, compare the number of assignments with exactly one on the left to the number with all four on the left.
8. After the heater turns off in the calorimeter Lab, the insulated probe temperature can rise slightly. What supplies that energy?

Exercise 1

The hot side loses $300/500=0.600\,\mathrm{J/K}$ and the cold side gains $300/300=1.00\,\mathrm{J/K}$. The total change is $+0.400\,\mathrm{J/K}$.

Exercise 2

Yes. The water loses entropy as it gives off heat. Include the entropy gained by the surroundings that receive that heat. The combined isolated system's entropy cannot decrease.

Exercise 3

They meet at $330\,\mathrm K$. The equal capacities make the warmer object's temperature drop equal to the cooler object's rise.

Exercise 4

One increment of heat takes away the hot side's entropy per unit energy and adds the cold side's. At a common temperature both have the same reciprocal temperature, so these two contributions cancel.

Exercise 5

The gas entropy grows by $Nk_B\ln2$. In the reversible expansion the reservoir loses the same amount of entropy.

Exercise 6

The heat is zero. The gas still gains $Nk_B\ln2$ because its initial and final states are the same as in the reversible example. The expansion produces entropy within the isolated system.

Exercise 7

There are four ways to choose which one is on the left, and only one way to put all four there. The first macrostate has four times as many assignments.

Exercise 8

The bath remains a little warmer than the probe. Energy flows from the bath to the probe until their temperatures meet, even with the heater off and no heat leaking to the room.

## Test it in the Lab

Change one setting at a time, then compare what you see with the tables and answers in this chapter.

[Electrical Calorimeter → Heat a sample in a stirred water bath. Record electrical input and thermometer response, compare a separate water-only blank, and recover specific heat with heat-loss and probe-response corrections.](https://sandboxphysics.com/labs/calorimeter/)

## Sources and reading scope

1. [OpenStax, University Physics Volume 2, §4.6 Entropy](https://openstax.org/books/university-physics-volume-2/pages/4-6-entropy)

   The section uses reversible heat transfers to compute entropy changes and shows the sign of total entropy for irreversible heat flow.

2. [OpenStax, University Physics Volume 2, §4.7 Entropy on a Microscopic Scale](https://openstax.org/books/university-physics-volume-2/pages/4-7-entropy-on-a-microscopic-scale)

   The section connects entropy to microscopic multiplicity and uses the number of arrangements to explain equilibrium.

[← Chapter 3 · How do heat and work change internal energy?](https://sandboxphysics.com/learn/heat-and-statistics/first-law-of-thermodynamics/) [Chapter 5 · How much work can a heat engine deliver in one cycle? →](https://sandboxphysics.com/learn/heat-and-statistics/heat-engines-and-cycles/)

Chapters in this volume

- [1. When does a thermometer represent the sample temperature?](https://sandboxphysics.com/learn/heat-and-statistics/temperature-and-thermal-equilibrium/)
- [2. How do molecular collisions create pressure?](https://sandboxphysics.com/learn/heat-and-statistics/molecular-motion-and-pressure/)
- [3. How do heat and work change internal energy?](https://sandboxphysics.com/learn/heat-and-statistics/first-law-of-thermodynamics/)
- [4. Why does heat flow spontaneously from hot to cold?](https://sandboxphysics.com/learn/heat-and-statistics/entropy-and-irreversibility/)
- [5. How much work can a heat engine deliver in one cycle?](https://sandboxphysics.com/learn/heat-and-statistics/heat-engines-and-cycles/)
- [6. How do probabilities determine a system's thermal averages?](https://sandboxphysics.com/learn/heat-and-statistics/boltzmann-weights-and-fluctuations/)

## Keep reading

Interactive Physics Textbook · Reading path

### Heat, Probability and Matter

1. [Article **When does a thermometer represent the sample temperature?**](https://sandboxphysics.com/learn/heat-and-statistics/temperature-and-thermal-equilibrium/)
2. [Article **How do molecular collisions create pressure?**](https://sandboxphysics.com/learn/heat-and-statistics/molecular-motion-and-pressure/)
3. [Article **How do heat and work change internal energy?**](https://sandboxphysics.com/learn/heat-and-statistics/first-law-of-thermodynamics/)
4. [You are here **Why does heat flow spontaneously from hot to cold?**](https://sandboxphysics.com/learn/heat-and-statistics/entropy-and-irreversibility/)
5. [Article **How much work can a heat engine deliver in one cycle?**](https://sandboxphysics.com/learn/heat-and-statistics/heat-engines-and-cycles/)
6. [Article **How do probabilities determine a system's thermal averages?**](https://sandboxphysics.com/learn/heat-and-statistics/boltzmann-weights-and-fluctuations/)

1 more group

### Other articles that use the same experiments

Each experiment from this article that another series also uses, followed by the articles there.

1. [Lab **Electrical Calorimeter**](https://sandboxphysics.com/labs/calorimeter/)
2. [Article **The cup absorbs heat too**](https://sandboxphysics.com/stories/instruments/calorimeter/)
