Skip to content
Tutorials Center
My learning

Topics

Lesson 23 of 37 · Thermodynamics

Entropy and the Second Law of Thermodynamics

Understand why heat flows from hot to cold, what entropy measures, how to calculate ΔS = Q/T, and how probability explains the arrow of time.

Drop a hot spoon into cold water and the spoon cools while the water warms. You never see it happen the other way round, even though energy would still be conserved. The first law cannot explain why. The second law of thermodynamics can, and it uses a quantity called entropy.

Two statements of the second law

  • Clausius statement: heat does not flow by itself from a colder body to a hotter body.
  • Kelvin-Planck statement: no cyclic engine can take heat from one reservoir and turn all of it into work.

Both say that nature has a preferred direction for spontaneous processes. A refrigerator does move heat from cold to hot, but only by using work, and the room warms up as a result.

What is entropy?

Entropy (S) is a measure of how many ways the energy of a system can be spread among its particles. It is measured in joules per kelvin (J/K).

For heat Q transferred reversibly at constant temperature T (in kelvin):

Text
ΔS = Q / T

Heat entering a system gives positive ΔS; heat leaving gives negative ΔS.

Worked example 1: melting ice

Melting 0.100 kg of ice at 0 °C (273.15 K) needs Q = mL, with the specific latent heat of fusion L ≈ 3.34 × 10⁵ J/kg.

Text
Q = 0.100 × 334 000 = 33 400 J
ΔS = 33 400 / 273.15 ≈ 122 J/K

The water is more disordered than the ice, so entropy rises.

Worked example 2: heat flowing from hot to cold

Suppose 1000 J flows from a body at 400 K to one at 300 K. Treat the temperatures as constant.

Text
ΔS_hot  = −1000 / 400 = −2.50 J/K
ΔS_cold = +1000 / 300 = +3.33 J/K
ΔS_total ≈ +0.83 J/K

The total is positive. If the flow went the other way, the total would be −0.83 J/K, which the second law forbids.

Python Entropy change when heat flows

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The second law in terms of entropy

For an isolated system (or the universe), total entropy never decreases: ΔS ≥ 0.

Equality holds only for ideal reversible processes. Every real process is irreversible, with friction, mixing or heat flow across a temperature difference, and creates entropy.

A single object's entropy can fall (a freezer turns water into ice) as long as the surroundings gain at least as much.

The statistical picture

In the 1870s Ludwig Boltzmann linked entropy to counting. A microstate is one particular arrangement of every particle; a macrostate is what you observe overall. Entropy is:

Text
S = k_B ln W

where W is the number of microstates that give the same macrostate and k_B = 1.380649 × 10⁻²³ J/K is the Boltzmann constant.

Think of 100 coins. Only one arrangement gives 100 heads, but about 10²⁹ arrangements give 50 heads. A shaken tray of coins ends up near 50/50 not because of a force, but because those states are overwhelmingly more numerous. Heat spreads out for the same reason.

Python Counting microstates of coins

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Entropy, engines and energy quality

The second law explains the Carnot limit from Heat Engines and Efficiency: rejecting some heat to a cold reservoir is the price of lowering entropy elsewhere. A related idea is the third law: the entropy of a perfect crystal approaches zero as temperature approaches absolute zero, and absolute zero cannot be reached in a finite number of steps.

"Disorder" is a handy picture, but entropy is really about the number of ways energy can be shared. A hot cup of tea and a cold room have lower total entropy than the same energy spread evenly, even though neither looks messy.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. 800 J of heat flows from a 400 K object to a 200 K object. What is the total entropy change?

    ΔS = −800/400 + 800/200 = −2 + 4 = +2.0 J/K. It is positive, as the second law requires.
  2. 2. Which statement about the total entropy of an isolated system is correct?

    The second law says ΔS ≥ 0 for an isolated system.
  3. 3. What does S = k_B ln W link entropy to?

    W is the number of microstates for a given macrostate; more microstates means higher entropy.
  4. 4. A freezer turns water into ice, lowering the water's entropy. Why is the second law not broken?

    The freezer uses work and dumps heat into the room, so the total entropy of freezer, water and room still rises.

Summary

  • The second law: heat does not flow spontaneously from cold to hot, and total entropy of an isolated system never decreases.
  • For reversible heat transfer, ΔS = Q/T with T in kelvin.
  • Boltzmann: S = k_B ln W; high-entropy macrostates simply have more microstates.
  • Irreversible processes create entropy, and this sets the direction of time in everyday events.

Next: The Photoelectric Effect