See also: Course-wide Conventions & Notation
Run the code: Notebook for Section 7.1, in which you can change and rerun the Python cells of this section in your browser.
The course map shows where this module sits in the course and which relations connect the microscopic and macroscopic descriptions. Select a module to unfold its sections.

Overview and Learning Objectives¶
Module 6 treated one kind of equilibrium — the coexistence of two phases of a single substance — and showed that the condition for equilibrium reduces to equality of chemical potentials, . Chemical equilibrium is the multi-species generalization: instead of two phases of one substance, we now have several chemical species interconverting through a reaction, and the analogous condition (derived below) is
In this section we translate that abstract condition into the quantitative tools students have seen in general chemistry: the extent of reaction , the reaction quotient , the equilibrium constant , and the temperature dependence given by the van’t Hoff equation. The key ideas are:
A reaction at constant proceeds in the direction that decreases the Gibbs free energy of the system.
We track progress with the extent of reaction .
At constant and , equilibrium occurs when the Gibbs free energy is minimized, i.e.
This minimization gives the chemical equilibrium condition , and (for ideal gases) the familiar relationship
Learning objectives:
Use the extent of reaction to relate changes in species amounts via .
Derive and show .
Derive for ideal gases and define as a dimensionless product of pressure ratios.
Use and the comparison of and to predict reaction direction.
Apply the van’t Hoff equation to predict how changes with temperature.
Core Ideas and Derivations¶
Extent of Reaction ¶
Consider a general reaction, written with positive coefficients , , , and :
Each species is given a stoichiometric coefficient that carries a sign, negative for reactants and positive for products: , , , and .
A convenient way to describe composition changes is the extent of reaction (units of moles). If are initial amounts, then as the reaction proceeds, the amount of every species is
Differentiating gives the compact relation
Gibbs Free Energy and the Equilibrium Condition¶
Treat the system Gibbs energy as a function of , and composition:
Its total differential is
The partial derivative was introduced under Open Systems and the Chemical Potential in Section 6.1 as the chemical potential , so
At constant and ,
Using Eq. (7.1.6),
This motivates the definition of the Gibbs free energy of reaction:
and therefore
Spontaneity and Equilibrium (Constant )¶
: reaction proceeds forward (toward products).
: equilibrium.
: reaction proceeds backward (toward reactants).
At equilibrium,
This is the multi-species analog of the phase-equilibrium condition of Section 6.1. Instead of transferring matter between two phases, we now transfer it among several chemical species; equilibrium is again the stationary point of at fixed .
Reaction Quotient and the Equilibrium Constant ¶
To connect to measurable composition variables, we need an expression for the chemical potentials.
Ideal-Gas Chemical Potential¶
Section 5.3 showed that for one mole of an ideal gas at constant , integrating from to gives . For a single species in an ideal-gas mixture, the same argument with in place of yields
where is the standard-state pressure (1 bar, per the notation conventions) and is the standard chemical potential.
Derivation of ¶
Substitute Eq. (7.1.15) into Eq. (7.1.12):
Define the standard Gibbs energy of reaction
and combine the logarithms to define the reaction quotient :
Therefore,
Equilibrium: ¶
At equilibrium, , so
with
For an ideal-gas reaction this is the pressure-based equilibrium constant (the value of at equilibrium).
Using vs to Predict Direction¶
Since :
If , then and the reaction proceeds toward products.
If , then and the reaction proceeds toward reactants.
If , the system is at equilibrium.
Worked Example: Gas-Phase Dimerization of ¶
Consider the equilibrium
( is brown; is colorless.)
Thermodynamics and at 298.15 K¶
At , the NIST-JANAF Thermochemical Tables (see Computing from Tabulated Thermochemistry) give
giving
Equilibrium Composition at a Specified Total Pressure¶
Suppose we start with 2 mol of and 0 mol of . Build an ICE table in terms of :
Initial: ,
Change: ,
Equilibrium: , ,
Mole fractions (ideal-gas mixture):
At total pressure , partial pressures are , and
For and , numerical root-finding gives
so
Has a Minimum at ¶
The equilibrium condition is the statement that has a stationary point at equilibrium. For this system, with mole fractions and , the Gibbs free energy relative to pure reactants is
The first term is the “bookkeeping” shift in standard chemical potentials, which is linear in . The second is the ideal-mixing term, , where is the entropy of mixing of the two ideal gases. Figure 7.1.1 shows their sum.
Source
import sys
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import brentq
sys.path.append("..") # the book folder, which holds figstyle
import figstyle as fs
R = 8.314462618 # J mol^-1 K^-1
T = 298.15 # K
dG_std = -4.73e3 # J per mole of reaction
K_eq = np.exp(-dG_std / (R * T))
def G_of_xi(xi):
# G(xi) - G(0) in J, for 2 mol of NO2 initially and P equal to the standard pressure
n_NO2, n_N2O4, n_tot = 2 - 2 * xi, xi, 2 - xi
mix = n_NO2 * np.log(n_NO2 / n_tot) + n_N2O4 * np.log(n_N2O4 / n_tot)
return xi * dG_std + R * T * mix
xis = np.linspace(1e-4, 1 - 1e-4, 400)
# Numerical root of K = xi (2 - xi) / (2 - 2 xi)^2
xi_eq = brentq(lambda x: x * (2 - x) / (2 - 2 * x)**2 - K_eq, 0.01, 0.99)
G_eq = G_of_xi(xi_eq) / 1e3 # kJ
def draw_extent(c):
fig, ax = plt.subplots(figsize=(6.0, 4.0), constrained_layout=True)
ax.axvline(xi_eq, color=c.gray, lw=1.2, ls=(0, (4, 3)))
ax.plot(xis, G_of_xi(xis) / 1e3, color=c.blue, lw=fs.LINE)
ax.plot(xi_eq, G_eq, "o", color=c.ink, ms=5.5, zorder=3)
ax.text(xi_eq - 0.02, -2.5, f"$\\xi_{{\\mathrm{{eq}}}} = {xi_eq:.2f}$", ha="right")
ax.set(xlim=(0, 1), xlabel="Extent of reaction $\\xi$ (mol)", ylabel="$G(\\xi) - G(0)$ (kJ)")
return fig
fs.show(draw_extent, alt=f"Gibbs energy of the reacting mixture relative to pure nitrogen dioxide against the extent "
f"of reaction from 0 to 1 mole. The curve falls steeply at first, passes through a minimum "
f"of {G_eq:.1f} kilojoules at an extent of {xi_eq:.2f} mole, which is marked by a dashed "
f"line, and rises again toward pure dinitrogen tetroxide.")Figure 7.1.1:Gibbs free energy of the reacting mixture relative to pure , from Eq. (7.1.32), for at and , starting from 2 mol of . The dashed line marks , the value computed from .
The minimum of lies at the computed from , where the slope is zero. The curve is not symmetric, and it is steep at both ends. To see why, evaluate the slope in the limits and , and decide which of the two terms of Eq. (7.1.32) produces that behavior. Concept Check 4 builds on the result.
Interactive Visualization¶
Figure 7.1.2 draws the same curve, , and lets you change the temperature and the total pressure. Move the red point with the slider for . The slope of the red tangent line is , and it is zero at the minimum, where . The flask beside the curve shows the mixture at the same extent.
Figure 7.1.2:The reacting mixture , starting from 2 mol of , at a temperature and a total pressure that you choose. (a) from Eq. (7.1.32), with the term added when , the tangent at the chosen extent, and (dashed line). (b) The mixture at that extent, with 40 units of for the 2 mol (schematic). The brown shade of the flask follows the concentration of . (c) , , , the slope , the mole fractions, and . and are the values at , taken as constant, as in Temperature Dependence: the van’t Hoff Equation.
You can also open the studio in a new tab: Chemical Equilibrium Studio.
Temperature Dependence: the van’t Hoff Equation¶
The temperature dependence of follows from the Gibbs–Helmholtz relation. Because and (from , Section 5.1),
Applying this relation to each species in its standard state and summing with the coefficients gives
Using gives the van’t Hoff equation:
An equivalent integrated form between and (assuming is approximately constant over the range) is
Example Trend for ¶
The integrated form, with and , gives the values below. The extent of reaction is for .
| (K) | (starting from 2 mol NO) | |
|---|---|---|
| 250 | 570 | 0.98 |
| 298.15 | 6.74 | 0.81 |
| 350 | 0.22 | 0.27 |
The NIST-JANAF tables, which include the temperature dependence of , give at 250 K and at 350 K, so the assumption of a constant costs less than 1 % over this range.
Because for dimerization, increasing temperature drives down and shifts equilibrium toward (less ). This is the quantitative form of Le Châtelier’s principle for an exothermic reaction.
The integrated form also says that plotted against is a straight line with slope , as long as is constant. Figure 7.1.3 shows such a plot for the exothermic dimerization of and for an endothermic reaction, the formation of from and , for which . The line rises toward low temperature for the exothermic reaction and falls for the endothermic one. Each line uses only data at , and it stays within 10 % of the tabulated over the whole range of its panel, in which changes by about six orders of magnitude.
Source
import sys
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
sys.path.append("..") # the book folder, which holds figstyle
import figstyle as fs
R = 8.314462618e-3 # kJ mol^-1 K^-1
T_ref = 298.15 # K
# Standard Gibbs free energies of formation (kJ/mol) from the NIST-JANAF tables
T_a = np.array([250, 298.15, 350, 400, 450, 500]) # K
dfG_NO2 = np.array([48.355, 51.258, 54.445, 57.560, 60.703, 63.867])
dfG_N2O4 = np.array([83.513, 97.787, 113.251, 128.204, 143.163, 158.109])
T_b = np.array([1000, 1200, 1500, 2000, 2500, 3000]) # K
dfG_NO = np.array([77.775, 75.239, 71.425, 65.060, 58.720, 52.439])
lnK_a = -(dfG_N2O4 - 2 * dfG_NO2) / (R * T_a) # 2 NO2 = N2O4
lnK_b = -(2 * dfG_NO) / (R * T_b) # N2 + O2 = 2 NO
# Integrated van't Hoff equation through K(298.15 K), with the reaction enthalpy at 298.15 K (kJ/mol)
drH_a, lnK_ref_a = 9.079 - 2 * 33.095, -(97.787 - 2 * 51.258) / (R * T_ref)
drH_b, lnK_ref_b = 2 * 90.291, -(2 * 86.600) / (R * T_ref)
def lnK_line(T, drH, lnK_ref):
return lnK_ref - drH / R * (1 / T - 1 / T_ref)
def reciprocal(x):
with np.errstate(divide="ignore"):
return 1 / x
def draw_vant_hoff(c):
fig, axes = plt.subplots(1, 2, figsize=(fs.WIDTH, 3.5), constrained_layout=True)
panels = (("a", "Exothermic", T_a, lnK_a, drH_a, lnK_ref_a, [250, 300, 350, 400, 500]),
("b", "Endothermic", T_b, lnK_b, drH_b, lnK_ref_b, [1000, 1200, 1500, 2000, 3000]))
for ax, (letter, title, T, lnK, drH, lnK_ref, ticks) in zip(axes, panels):
T_fit = np.linspace(T.min(), T.max(), 200)
ax.plot(1 / T_fit, lnK_line(T_fit, drH, lnK_ref), color=c.blue, lw=fs.LINE)
ax.plot(1 / T, lnK, "o", color=c.ink, ms=5.5, zorder=3)
ax.set(xlabel="$1/T$ (K$^{-1}$)", ylabel="$\\ln K$")
ax.xaxis.set_major_locator(MaxNLocator(4))
top = ax.secondary_xaxis("top", functions=(reciprocal, reciprocal))
top.set_xticks(ticks)
top.set_xlabel("Temperature (K)")
fs.panel(ax, letter, title)
axes[0].text(0.0030, -4.6, "$\\Delta_r H° = -57.11$ kJ mol$^{-1}$\nslope $-\\Delta_r H°/R > 0$", ha="left")
axes[1].text(0.00036, -17.2, "$\\Delta_r H° = +180.58$ kJ mol$^{-1}$\nslope $-\\Delta_r H°/R < 0$", ha="left")
return fig
fs.show(draw_vant_hoff, alt="Two plots of the natural logarithm of the equilibrium constant against the reciprocal "
"of the temperature, each with points from the NIST-JANAF tables on a straight line. "
"Panel a, the dimerization of nitrogen dioxide between 250 and 500 kelvin: the line "
f"rises from {lnK_a[-1]:.1f} at 500 kelvin to {lnK_a[0]:.1f} at 250 kelvin. Panel b, the "
"formation of nitric oxide from nitrogen and oxygen between 1000 and 3000 kelvin: the "
f"line falls from {lnK_b[-1]:.1f} at 3000 kelvin to {lnK_b[0]:.1f} at 1000 kelvin.")/opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages/matplotlib/axis.py:1540: RuntimeWarning: One of rtol or atol is not valid, atol: inf, rtol: 0
mask = np.isclose(tr_minor_locs[:, None], tr_major_locs[None, :],
/opt/hostedtoolcache/Python/3.11.18/x64/lib/python3.11/site-packages/matplotlib/axis.py:1540: RuntimeWarning: One of rtol or atol is not valid, atol: inf, rtol: 0
mask = np.isclose(tr_minor_locs[:, None], tr_major_locs[None, :],
Figure 7.1.3:Plots of against for (a) the exothermic reaction and (b) the endothermic reaction . The points are from the NIST-JANAF tables. Each line is the integrated van’t Hoff equation with the value of at , drawn through . The scale on top gives the temperature.
Computing from Tabulated Thermochemistry¶
Under Reaction Quotient and the Equilibrium Constant we derived the key link between equilibrium and thermochemistry:
So if you can compute at a temperature of interest, you can immediately compute the equilibrium constant. This subsection is a practical workflow for getting from tabulated thermochemical data.
Step 0: Write the Reaction (with Phases) and Choose a Standard State¶
Balance the reaction and include phases, e.g. vs .
Use a consistent standard state across all species (most modern tables use at ; always check the table header).
Step 1: Pull Species Data at the Same Temperature¶
For each species in the balanced equation, collect either:
Option A (most common at 298.15 K): and (and optionally ).
Option B (temperature-dependent, e.g. ): and (or directly if provided).
Where to get the data:
NIST Chemistry WebBook: fast way to grab and for many species (check the phase!).
NIST-JANAF Thermochemical Tables: best when you need and over a range of temperatures (not just 298.15 K).
Active Thermochemical Tables (ATcT): best when you care about high-accuracy formation thermochemistry (often includes uncertainties). In practice, many workflows use ATcT for and NIST-JANAF for .
Appendix D describes what each source tabulates, its conventions, and how to cite it.
Step 2: Convert Species Data into Reaction Values¶
Once you have consistent species data, compute reaction properties using stoichiometric coefficients (positive for products, negative for reactants):
If your data are enthalpies of formation, the same sum applies:
Because the of the reactants are negative, this is the familiar “products minus reactants” form of Hess’s law (Section 3.3).
Step 3: Compute ¶
If you have and at the same temperature, then
Step 4: Compute ¶
Finally,
For an ideal-gas reaction, this corresponds to a pressure-based equilibrium constant with the dimensionless ratio inside .
Worked Example: Ammonia Formation at 298.15 K¶
For the Haber–Bosch reaction (as written in Section 5.3),
Using the reaction values quoted in Section 5.3 at 298.15 K,
gives
Then
Interpretation. at room temperature, so the equilibrium strongly favors at the standard state. (Section 5.3 explains why temperature and pressure “knobs” still matter for industrial operation, where the 500 °C kinetic sweet spot drives down dramatically.)
Common Pitfalls (and Quick Fixes)¶
Wrong phase: and (or vs ) have very different and .
Mixed standard states: make sure all species use the same convention and the same temperature.
Unit mismatches: always reconcile kJ vs J and “per mole of reaction” vs “per mole of species.”
Sign mistakes: products minus reactants (or use with the sign convention consistently).
Concept Checks¶
Why is the correct equilibrium condition at constant ? What would change if the reaction instead ran at constant ? (The constant- case is developed in Section 7.2.)
Why must and be dimensionless? What role does play?
How does comparing to predict the direction of spontaneous change?
Inspecting Eq. (7.1.32): which term in would vanish if there were no entropy of mixing? Why does this entropy term prevent the reaction from running to completion even when ?
What changes in the derivation of if the mixture is non-ideal and activities replace partial-pressure ratios?
Key Takeaways¶
Extent of reaction provides a compact way to track composition changes via stoichiometry: .
At constant , equilibrium corresponds to minimizing , giving — the multi-species analog of the phase-equilibrium condition of Section 6.1.
For ideal gases, and .
The sign of (equivalently the comparison vs ) determines spontaneous direction.
The temperature dependence of is governed by van’t Hoff: .
Thermochemical tables (NIST Chemistry WebBook, NIST-JANAF, ATcT) provide the and values needed to compute and hence .