The formation of a complex between a metal ion, M, and a ligand, L, is in fact usually a substitution reaction. For example, in aqueous solutions, metal ions will be present as aqua ions, so the reaction for the formation of the first complex could be written as
The equilibrium constant for this reaction is given by
[L] should be read as "the concentration of L" and likewise for the other terms in square brackets. The expression can be greatly simplified by removing those terms which are constant. The number of water molecules attached to each metal ion is constant. In dilute solutions the concentration of water is effectively constant. The expression becomes
Following this simplification a general definition can be given, for the general equilibrium
The definition can easily be extended to include any number of reagents. The reagents need not always be a metal and a ligand but can be any species which form a complex. Stability constants defined in this way, are association constants. This can lead to some confusion as pK values are dissociation constants. In general purpose computer programs it is customary to define all constants as association constants. The relationship between the two types of constant is given in association and dissociation constants.