The treatment of chemical reactions is very like that of phase transitions. Again, we are considering conditions of constant temperature and pressure, and the question is the following: how far will a reaction go?
First consider the simplest case of a reaction with only one reactant and one product: . An example is the interconversion of n-pentane and isopentane (or pentane and methyl-butane, for those of us who learned our chemistry in the last thirty years).
Spontaneous changes will minimise the Gibbs free energy (see here). With temperature and pressure
fixed only
the numbers of A and B can change. Since they can only interconvert,
and
In the figure ``E'' marks the equilibrium concentration, at the point where .
If there are more reactants or products, say
, the numbers of A, B, C and D
change together:
. So
This result is general: equilibrium is reached when the sum of the chemical potential of the reactants equals that of the products. For reactants and products that can be treated as ideal gases, we can go further and make predictions about relative concentrations at equilibrium, see here.
References