LECTURE NOTES IN THERMODYNAMICS
Entropy & the Second
Law of Thermodynamics
Physical Foundations · Statistical Mechanics · Intuitions
Low S High S
Covering: Clausius Inequality · Entropy as a State Function · Statistical Definition ·
Boltzmann’s H-Theorem · Free Energy · Arrow of Time
Entropy & the Second Law of Thermodynamics Lecture Notes
Contents
1 Motivation & Big Picture 2
2 Thermodynamic (Classical / Macroscopic) View 2
2.1 The Carnot Cycle and Efficiency . . . . . . . . . . . . . . . . . . . . . 2
2.2 Clausius Inequality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Entropy as a State Function . . . . . . . . . . . . . . . . . . . . . . . . 3
2.4 The Second Law — Classical Statements . . . . . . . . . . . . . . . . . 4
2.5 Entropy Change Calculations . . . . . . . . . . . . . . . . . . . . . . . 4
2.5.1 Heating / Cooling at Constant Pressure . . . . . . . . . . . . . 4
2.5.2 Isothermal Expansion of Ideal Gas . . . . . . . . . . . . . . . . 4
2.5.3 General Ideal Gas . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.5.4 Phase Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.6 Entropy and Irreversibility . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 The Thermodynamic Identity (Fundamental Relation) 5
4 Free Energies: Entropy in Disguise 6
4.1 Helmholtz Free Energy . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.2 Gibbs Free Energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5 Statistical Mechanics View: Entropy as Counting 7
5.1 Microstates and Macrostates . . . . . . . . . . . . . . . . . . . . . . . . 7
5.2 Boltzmann’s Entropy Formula . . . . . . . . . . . . . . . . . . . . . . . 7
5.3 Worked Example: Two-State Systems and Coin Flips . . . . . . . . . . 8
5.4 Connecting Statistical and Thermodynamic Entropy . . . . . . . . . . . 8
5.5 Gibbs Entropy Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6 The Second Law — Statistical Perspective 9
6.1 Why Does Entropy Increase? (The Probabilistic Argument) . . . . . . 9
6.2 The Stirling Formula and Sharpness of the Peak . . . . . . . . . . . . . 10
6.3 Boltzmann’s H-Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.3.1 Loschmidt’s Paradox and its Resolution . . . . . . . . . . . . . 10
6.4 The Boltzmann Distribution . . . . . . . . . . . . . . . . . . . . . . . . 10
7 The Arrow of Time 11
7.1 Maxwell’s Demon and Information . . . . . . . . . . . . . . . . . . . . 11
8 The Third Law and Absolute Entropy 12
9 Entropy in Other Contexts 12
9.1 Entropy of Mixing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
9.2 Entropy in Information Theory (Shannon) . . . . . . . . . . . . . . . . 12
9.3 Entropy and Black Holes (Bekenstein–Hawking) . . . . . . . . . . . . . 12
10 Summary and Unifying Picture 13
1
Entropy & the Second Law of Thermodynamics Lecture Notes
§1. Motivation & Big Picture
⋆ Why do we need a Second Law?
The First Law (∆U = Q − W ) tells us how much energy is conserved. But it
says nothing about direction. It is perfectly consistent with the First Law for:
Heat to flow from cold to hot spontaneously.
A broken glass to spontaneously reassemble.
All gas molecules in a room to rush into one corner.
We never see these happen. There must be another law governing the direc-
tionality of nature. That law is the Second Law of Thermodynamics, and
entropy is its quantitative embodiment.
The central message of this document:
Nature always evolves toward states of greater entropy.
§2. Thermodynamic (Classical / Macroscopic) View
2.1. The Carnot Cycle and Efficiency
The story of entropy begins with Sadi Carnot (1824). He asked: what is the maximum
efficiency of a heat engine?
Carnot Engine
An idealized reversible engine operating between a hot reservoir TH and a cold
reservoir TC :
1. Isothermal expansion at TH : absorbs QH from hot reservoir.
2. Adiabatic expansion: temperature drops TH → TC .
3. Isothermal compression at TC : rejects QC to cold reservoir.
4. Adiabatic compression: temperature rises TC → TH .
Carnot proved that no engine can be more efficient than the reversible (Carnot)
engine:
TC W
ηCarnot = 1 − = (1)
TH QH
A key result from the Carnot cycle:
QH QC QH QC
= =⇒ − =0 (2)
TH TC TH TC
This is the embryonic form of entropy. The quantity Q/T appears to be conserved
in reversible cycles.
2
Entropy & the Second Law of Thermodynamics Lecture Notes
2.2. Clausius Inequality
Theorem 2.1 (Clausius Inequality). For any cyclic process:
I
dQ
¯
≤0 (3)
T
where dQ
¯ is the heat absorbed by the system, and T is the temperature at which it is ex-
changed. Equality holds for reversible processes; strict inequality holds for irreversible
processes.
Derivation sketch: Any arbitrary cyclic process can be decomposed into in-
finitesimal Carnot cycles. For each sub-cycle:
dQ
¯ rev dQ
¯ irr
= 0 (reversible) < 0 (irreversible)
T T
Summing over all sub-cycles gives the inequality.
⋆ Intuition for Clausius Inequality
Irreversibility ”wastes” some capacity to do work. The quantity dQ/T ¯ measures
how efficiently heat is converted — irreversible processes always lose some of
this, so the cyclic integral is negative (or zero for ideal reversible processes).
2.3. Entropy as a State Function
From the Clausius inequality, for any two reversible paths A and B connecting states
1 and 2: I Z 2 Z 2
dQ
¯ dQ
¯ dQ
¯
= 0 =⇒ =
rev T 1 T A 1 T B
R2
This means 1 (¯ dQrev /T ) is path-independent — it depends only on the end-
points. Therefore it defines a state function:
Entropy — Thermodynamic Definition (Clausius, 1865)
dQ
¯ rev
dS = (4)
T
Z 2
dQ
¯ rev
∆S = S2 − S1 = (5)
1 T
SI unit: J/K. Symbol: S. Extensive property (doubles when system
doubles).
⋆ What is entropy, intuitively (classical)?
Think of entropy as ”dispersal of energy” or ”unavailability of energy for
work”. The T in the denominator is crucial: the same heat dQ ¯ added at a low
temperature creates more disorder (higher dS) than at a high temperature —
like adding a drop of ink to still water vs. a churning ocean.
3
Entropy & the Second Law of Thermodynamics Lecture Notes
2.4. The Second Law — Classical Statements
There are several equivalent classical statements:
Clausius Statement
It is impossible to construct a device that, operating in a cycle, produces no effect
other than the transfer of heat from a cooler body to a hotter body.
Kelvin–Planck Statement
It is impossible to construct a device that, operating in a cycle, produces no
effect other than the absorption of heat from a single thermal reservoir and the
performance of an equivalent amount of work.
Entropy Statement (Most Powerful)
The entropy of an isolated system never decreases:
dSuniv ≥ 0 (6)
Equality holds for reversible (quasi-static) processes; strict inequality for irre-
versible (spontaneous) processes.
These three are mathematically equivalent. The entropy statement is the most
general.
2.5. Entropy Change Calculations
Golden Rule
Entropy is a state function. To compute ∆S for any process (even irre-
versible), construct a reversible path between the same endpoints and integrate
dQ
¯ rev /T .
2.5.1. Heating / Cooling at Constant Pressure
Z T2
nCP dT T2
∆S = = nCP ln
T1 T T1
2.5.2. Isothermal Expansion of Ideal Gas
Since ∆U = 0 (ideal gas, isothermal), Qrev = Wrev = nRT ln(V2 /V1 ):
V2
∆S = nR ln (7)
V1
2.5.3. General Ideal Gas
T2 V2 T2 P2
∆S = nCV ln + nR ln = nCP ln − nR ln (8)
T1 V1 T1 P1
4
Entropy & the Second Law of Thermodynamics Lecture Notes
2.5.4. Phase Transitions
At a phase transition (e.g., melting, vaporization) occurring at constant T and P :
∆Htransition
∆S = (9)
Ttransition
Example: Entropy of Ice Melting
1 mol of ice melts at 0◦ C = 273.15 K. ∆Hfus = 6.01 kJ/mol.
6010 J/mol
∆S = = 22.0 J mol−1 K−1
273.15 K
Liquid water has more entropy than ice — molecules are free to move, more
disorder.
2.6. Entropy and Irreversibility
For any irreversible process in an isolated system:
∆Ssys + ∆Ssurr = ∆Suniv > 0 (10)
For the surroundings (treated as a reservoir at Tsurr ):
−qsys
∆Ssurr = (11)
Tsurr
Heat Flow Between Reservoirs
Heat Q flows spontaneously from hot reservoir (TH ) to cold reservoir (TC ), where
TH > TC .
Q
∆Shot = − <0 (loses entropy)
TH
Q
∆Scold =+ >0 (gains entropy)
TC
1 1
∆Suniv =Q − > 0✓
TC TH
The process is irreversible. Entropy of universe increases.
§3. The Thermodynamic Identity (Fundamental Re-
lation)
¯ − dW
Combining the First Law (dU = dQ ¯ ) with dQ
¯ rev = T dS and dW
¯ rev = P dV :
dU = T dS − P dV (12)
This is the Thermodynamic Identity (also called the fundamental relation). It
connects U , S, T , P , V and is valid for all quasi-static processes of a simple PVT
system.
5
Entropy & the Second Law of Thermodynamics Lecture Notes
From this, we can read off:
∂U ∂U
T = P =− (13)
∂S V ∂V S
⋆ Entropy as a ”Generalized Coordinate”
The fundamental relation tells us U = U (S, V ). Entropy is the natural variable
paired with temperature, just as volume is paired with pressure. T is the ”price”
of entropy — how much internal energy you pay per unit increase in entropy.
§4. Free Energies: Entropy in Disguise
In practice, chemists and engineers work at constant T and P (not constant S). We
need transformed potentials:
4.1. Helmholtz Free Energy
Helmholtz Free Energy A
A ≡ U − TS ⇒ dA = −S dT − P dV (14)
At constant T and V : spontaneous processes have dA ≤ 0.
4.2. Gibbs Free Energy
Gibbs Free Energy G
G ≡ H − TS = U + PV − TS ⇒ dG = −S dT + V dP (15)
At constant T and P : spontaneous processes have dG ≤ 0 (most common in
chemistry/biology).
Spontaneity Criterion at constant T, P
∆G = ∆H − T ∆S (16)
∆H ∆S Temperature Spontaneous?
− + Any T Always (∆G < 0)
− − Low T Yes (enthalpy wins)
+ + High T Yes (entropy wins)
+ − Any T Never (∆G > 0)
⋆ Entropy vs. Enthalpy competition
G = H − T S is a tug-of-war between energy minimization (∆H < 0, system
wants to be bound together) and entropy maximization (T ∆S > 0, system
wants to be spread out). Temperature controls which one wins. This is why ice
6
Entropy & the Second Law of Thermodynamics Lecture Notes
melts at 0◦ C — entropy wins above that temperature.
§5. Statistical Mechanics View: Entropy as Count-
ing
5.1. Microstates and Macrostates
Microstate vs. Macrostate
Microstate: A complete specification of the system at the microscopic
level (positions and momenta of all N particles, or quantum states of all
particles).
Macrostate: A specification by macroscopic variables (N, V, U or
T, P, V ). Many microstates correspond to one macrostate.
Ω(E, V, N ): the number of microstates consistent with a given macrostate
— called the multiplicity or statistical weight.
⋆ The Key Assumption: Equal a priori probability
Statistical mechanics rests on one postulate: all accessible microstates of an
isolated system are equally probable. This is the fundamental postulate.
No microstate is ”preferred” — nature is democratic at the microscopic level.
5.2. Boltzmann’s Entropy Formula
Boltzmann’s Entropy (1877)
S = kB ln Ω (17)
where kB = 1.380649 × 10−23 J/K is Boltzmann’s constant, and Ω is the number
of microstates.
This equation is engraved on Boltzmann’s tombstone in Vienna.
Why logarithm?
1. Additivity: For two independent systems, Ωtotal = Ω1 · Ω2 , but entropy should
be additive: Stotal = S1 + S2 . The only function with f (xy) = f (x) + f (y) is the
logarithm.
23
2. Numbers: Ω can be astronomically large (∼ 1010 ). Logarithm brings it to a
human scale.
7
Entropy & the Second Law of Thermodynamics Lecture Notes
5.3. Worked Example: Two-State Systems and Coin Flips
Entropy of N two-state particles
Each particle can be in state ↑ or ↓. With n particles in state ↑ and (N − n) in
state ↓:
N N!
Ω= = (18)
n n! (N − n)!
Using Stirling’s approximation ln N ! ≈ N ln N − N :
N
S = kB ln ≈ −N kB [x ln x + (1 − x) ln(1 − x)] (19)
n
where x = n/N is the fraction in state ↑. Maximum entropy occurs at x = 1/2
(equal distribution) — this is the ”most disordered” state.
Entropy of a Two-State System
1
Smax at x = 2
0.6
S/(N kB )
0.4
0.2
0
0 0.25 0.5 0.75 1
Fraction x = n/N
Figure 1: Entropy is maximized when particles are equally distributed between two
states — maximum disorder.
5.4. Connecting Statistical and Thermodynamic Entropy
The statistical definition S = kB ln Ω must reproduce the classical dS = dQ/T
¯ . We
can show this by deriving temperature:
1 ∂S ∂ ln Ω
≡ = kB (20)
T ∂U V,N ∂U V,N
This is the statistical definition of temperature — temperature measures how
rapidly the number of microstates increases with energy. At equilibrium between two
systems:
∂ ln Ω1 ∂ ln Ω2
= =⇒ T1 = T2
∂U1 ∂U2
8
Entropy & the Second Law of Thermodynamics Lecture Notes
⋆ Temperature as ”tendency to absorb entropy”
Temperature is not directly about speed or energy — it is about how many new
microstates become available as you add energy. A cold body gains many more
microstates per joule than a hot body. This is why heat flows from hot to cold:
it maximizes total Ω (and thus S).
5.5. Gibbs Entropy Formula
For systems not in a single macrostate (i.e., when probabilities pi are assigned to
microstates):
Gibbs / von Neumann Entropy
X
S = −kB pi ln pi (21)
i
When all Ω microstates are equally probable (pi = 1/Ω), this reduces to S =
kB ln Ω.
This formula is also the foundation of Shannon information entropy in infor-
mation theory (with kB replaced by 1 or log2 ):
X
H=− pi log2 pi (bits) (22)
i
⋆ Entropy = Missing Information
Entropy measures how much you don’t know about the microstate. If
you know the exact microstate (Ω = 1), then S = 0 — perfect knowledge,
zero entropy. The more microstates are consistent with what you observe (the
macrostate), the higher the entropy. Entropy is a measure of ignorance.
§6. The Second Law — Statistical Perspective
6.1. Why Does Entropy Increase? (The Probabilistic Argu-
ment)
The Second Law is not a fundamental law like Newton’s laws — it is a statistical
statement:
⋆ The Overwhelming Probability Argument
Consider N = 1023 gas molecules in a box. Initially confined to the left half,
then allowed to expand. The probability that all molecules return to the left
half is: N 1023
1 1 22
P = = ≈ 10−3×10
2 2
This is so small it essentially never happens in the age of the universe. The sys-
tem evolves toward higher-Ω states because there are overwhelmingly more of
9
Entropy & the Second Law of Thermodynamics Lecture Notes
them. Entropy increase is not ”forbidden” in reverse — it is just so improbable
as to be impossible in practice.
6.2. The Stirling Formula and Sharpness of the Peak
The multiplicity Ω(n) for the gas expansion peaks sharply at n = N/2 (equal molecules
on both sides). Using Stirling:
2N
N
Ωmax = ≈p
N/2 πN/2
√
The relative width of the peak ∼ 1/ N . For N ∼ 1023 , the peak is so sharp that the
system is always found within ∼ 10−11 of the maximum. Fluctuations are negligible.
6.3. Boltzmann’s H-Theorem
Boltzmann (1872) derived a microscopic proof using kinetic theory. Define:
Z
H ≡ f (v) ln f (v) d3 v
where f (v) is the velocity distribution function. The Boltzmann equation (from col-
lision dynamics) gives:
dH
≤0 (23)
dt
Since S ∝ −H, this means dS/dt ≥ 0 — entropy increases until f (v) reaches the
Maxwell–Boltzmann distribution, where equality holds.
The H-Theorem — What it Proves
The H-Theorem shows that given molecular chaos (random collisions), the veloc-
ity distribution always evolves toward the Maxwell–Boltzmann equilibrium, and
entropy increases along the way. It provides a microscopic, dynamical derivation
of the Second Law.
6.3.1. Loschmidt’s Paradox and its Resolution
Objection (Loschmidt, 1876): Microscopic equations of motion are time-reversal
symmetric. If a process increases H, then its time-reverse also satisfies the equations
— so H should sometimes decrease.
Resolution: The assumption of molecular chaos (Boltzmann’s Stosszahlansatz )
— that velocities of colliding particles are uncorrelated — is not time-symmetric. It
implicitly selects the forward time direction. The Second Law emerges from this
statistical initial condition, not from the microscopic laws themselves.
6.4. The Boltzmann Distribution
At thermal equilibrium with a reservoir at temperature T , the probability that a
microstate with energy εi is occupied:
10
Entropy & the Second Law of Thermodynamics Lecture Notes
Boltzmann Factor & Partition Function
e−εi /kB T X
pi = Z= e−εi /kB T (24)
Z i
Z is the partition function — the central object of statistical mechanics. All
thermodynamic quantities follow from it:
∂ ln Z ∂F
F = −kB T ln Z, U =− , S=−
∂β ∂T V
where β ≡ 1/kB T .
⋆ Why the Boltzmann Factor?
High-energy states are less probable because occupying them ”costs” entropy —
the reservoir loses entropy ∆Sres = −ε/T when it gives energy ε to the system.
The probability is proportional to the number of microstates of the reservoir,
which is e∆Sres /kB = e−ε/kB T .
§7. The Arrow of Time
⋆ Entropy Defines the Direction of Time
Why does time have a direction — why do we remember the past but not the
future? Because entropy was low in the past. Time flows in the direction of
increasing entropy. This is called the thermodynamic arrow of time. There
is also the cosmological arrow of time: the universe began in a low-entropy state
(the Big Bang) and entropy has been increasing ever since, driving the ”flow”
of time.
7.1. Maxwell’s Demon and Information
James Clerk Maxwell proposed a thought experiment: a ”Demon” watches molecules
and opens a trapdoor to let fast ones pass right and slow ones left — sorting hot from
cold without doing work, apparently violating the Second Law.
Resolution (Landauer, 1961): The Demon must store information about each
molecule’s speed. Eventually it must erase this memory to continue operating. Eras-
ing one bit of information dissipates heat:
Qerase ≥ kB T ln 2 (25)
This Landauer’s principle saves the Second Law. Information is physical — erasing
it generates entropy.
§8. The Third Law and Absolute Entropy
11
Entropy & the Second Law of Thermodynamics Lecture Notes
Third Law of Thermodynamics (Nernst, 1906)
As T → 0, the entropy of a perfect crystal approaches zero:
lim S = 0 (26)
T →0
Statistical interpretation: At T = 0, the system is in its unique ground state
(Ω = 1), so S = kB ln 1 = 0. This establishes an absolute scale for entropy.
Consequences:
We can compute absolute molar entropies from heat capacity data: S ◦ (T ) =
R T CP
0 T′
dT ′
Absolute zero is unattainable: reaching T = 0 would require removing all en-
tropy, which requires infinite steps.
§9. Entropy in Other Contexts
9.1. Entropy of Mixing
When nA moles of gas A and nB moles of gas B (both ideal, at same T , P ) are mixed:
∆Smix = −R(nA ln xA + nB ln xB ) ≥ 0 (27)
where xA = nA /(nA + nB ) is the mole fraction. Since 0 < xi < 1, all ln xi < 0, so
∆Smix > 0 always.
⋆ Why mixing is always spontaneous (at same T, P)
When two different gases mix, the number of spatial arrangements skyrockets
— each A molecule can now be anywhere in the full volume, not just the left
half. This is purely entropic: ∆Hmix = 0 for ideal gases. Entropy drives the
mixing.
9.2. Entropy in Information Theory (Shannon)
Claude Shannon (1948) discovered that the same formula governs information. The
entropy of a probability distribution {pi } is:
X
H=− pi log2 pi (bits) (28)
i
This measures the average surprise or information content of a message. Max-
imum entropy = maximum uncertainty = maximum information capacity.
9.3. Entropy and Black Holes (Bekenstein–Hawking)
Remarkably, black holes have entropy:
kB c3
SBH = A (29)
4Gℏ
12
Entropy & the Second Law of Thermodynamics Lecture Notes
where A is the horizon area. This is enormous (∼ 1077 kB per solar mass black hole) and
suggests a deep connection between thermodynamics, gravity, and quantum mechanics.
§10. Summary and Unifying Picture
Clausius
H Inequality
path-independence Entropy S
dQ/T
¯ ≤0 (State Function)
isolated system kB connects
2nd Law: Statistical:
G = H − TS
dSuniv ≥ 0 S = kB ln Ω
const T, P
Free Energies
G, A: Spontaneity
Figure 2: Conceptual map of entropy and the Second Law.
The Five Faces of Entropy
1. Classical (Clausius): dS = dQ
¯ rev /T — entropy as dispersal of heat.
2. Statistical (Boltzmann): S = kB ln Ω — entropy as number of mi-
crostates. P
3. Information (Shannon): H = − pi log pi — entropy as missing infor-
mation.
4. Kinetic (Boltzmann H): dH/dt ≤ 0 — entropy increase from collision
dynamics.
5. Gravitational (Bekenstein): S ∝ A — entropy as horizon area.
All five are the same fundamental concept seen from different angles.
“The entropy of the universe tends to a maximum.” — Rudolf Clausius, 1865
“If someone points out to you that your pet theory of the universe is in disagreement with
Maxwell’s equations — then so much the worse for Maxwell’s equations. But if your theory
is found to be against the Second Law of Thermodynamics, I can give you no hope; there is
nothing for it but to collapse in deepest humiliation.” — Sir Arthur Eddington
13