Thermodynamic equilibrium is characterized by the free energy for the whole (closed) system being a minimum. For systems at constant temperature and pressure the Gibbs free energy is minimum. The slope of the reaction free energy with respect to the extent of reaction, ξ, is zero when the free energy is at its minimum value. 
The free energy change, dG, can be expressed as a weighted sum of change in amount times the chemical potential, the partial molar free energy of the species. The chemical potential, μ, of the ith species in a chemical reaction is the partial derivative of the free energy with respect to the number of moles of that species, N
A general chemical equilibrium can be written as
where n are the stoichiometric coefficients of the reactants in the equilibrium equation, and m are the coefficients of the products. At equilibrium
The chemical potential, μ, of the ith species can be calculated in terms of its activity, a.
μ is the standard chemical potential of the species, R is the gas constant and T is the temperature. Setting the sum for the reactants j to be equal to the sum for the products, k, so that δG(Eq) = 0
Rearranging the terms,
This relates the standard Gibbs free energy change, ΔG</sup> to an equilibrium constant, K, the reaction quotient of activity values at equilibrium.