Law of mass action
In chemistry, Law of Mass Action has two aspects: 1) the equilibrium aspect, concerning the composition of a reaction mixture at equilibrium and 2) the kinetic aspect concerning the rate equations for elementary reactions. Both aspects stem from the research by Guldberg and Waage (1864-1879) in which equilibrium constants were derived by using kinetic data and the rate equation which they had proposed. Guldberg and Waage also recognised that chemical equilibrium is a dynamic process in which rates of reaction for the forward and backward reactions must be equal.
Taken as a statement about kinetics, the law states that the rate of an elementary reaction (a reaction that proceeds through only one transition state, that is one mechanistic step) is proportional to the product of the concentrations of the participating molecules. In modern chemistry this is derived using statistical mechanics.
Taken as a statement about equilibrium, that law gives an expression for the equilibrium constant, a quantity characterising chemical equilibrium. In modern chemistry this is derived using equilibrium thermodynamics.

# History
Cato Maximilian Guldberg and Peter Waage, building on Claude Louis Berthollets ideas about reversible chemical reactions proposed the Law of Mass Action in 1864  
. These papers, in Norwegian, went largely unnoticed, as did the later publication (in French) of 1867 which contained a modified law and the experimental data on which that law was based. 
In 1877 van 't Hoff independently came to similar conclusions,  but was unaware of the earlier work, which prompted Guldberg and Waage to give a fuller and further developed account of their work, in German, in 1879. Van 't Hoff then accepted their priority.

### The equilibrium state (composition)
In their first paper, Guldberg and Waage suggested that in a reaction such as
the "chemical affinity" or "reaction force" between A and B did not just depend on the chemical nature of the reactants, as had previously been supposed, but also depended on the amount of each reactant in a reaction mixture. Thus the Law of Mass Action was first stated as follows:
In this context a substitution reaction was one such as alcohol + acid \rightleftharpoons ester + water. Active mass was defined in the 1879 paper as "the amount of substance in the sphere of action". For species in solution active mass is equal to concentration. For solids active mass is taken as a constant. \alpha, a and b were regarded as empirical constants, to be determined by experiment.
At equilibrium the chemical force driving the forward reaction must be equal to the chemical force driving the reverse reaction. Writing the initial active masses of A,B, A' and B' as p, q, p' and q' and the dissociated active mass at equilibrium as \xi, this equality is represented by
\xi represents the amount of reagents A and B that has been converted into A' and B'. Calculations based on this equation are reported in the second paper.

### Dynamic approach to the equilibrium state
The third paper of 1864 was concerned with the kinetics of the same equilibrium system. Writing the dissociated active mass at some point in time as x, the rate of reaction was given as
Likewise the reverse reaction of A' with B' proceeded at a rate given by
At equilibrium the two rates of reaction must be equal. This follows from the fact that the composition of a mixture at equilibrium does not change with time. Hence
The rate expressions given in the 1864 paper could not be integrated, so they were simplified as follows. The chemical force was assumed to be directly proportional to the product of the active masses of the reactants.
This is equivalent to setting the exponents a and b of the earlier theory to one. The proportionality constant was called an affinity constant, k. The equilibrium condition for an "ideal" reaction was thus given the simplified form
eq, eq etc. are the active masses at equilibrium. In terms of the initial amounts reagents p,q etc. this becomes
The ratio of the affinity coefficients, k'/k, can be recognized as an equilibrium constant. Turning to the kinetic aspect, it was suggested that the velocity of reaction, v, is proportional to the sum of chemical affinities (forces). In its simplest form this results in the expression
where \psi is the proportionality constant. Actually, Guldberg and Waage used a more complicated expression which allowed for interaction between A and A', etc. By making certain simplifying approximations to those more complicated expressions, the rate equation could be integrated and hence the equilibrium quantity \xi could be calculated. The extensive calculations in the 1867 paper gave support to the simplified concept, namely,
This is an alternative statement of the Law of Mass Action.
In the 1879 paper the assumption that reaction rate was proportional to the product of concentrations was justified in terms of collision theory, as had been developed for gas reactions. It was also proposed that the original theory of the equilibrium condition could be generalised to apply to any arbitrary chemical equilibrium.
The exponents ,  etc. are explicitly identified for the first time as the stoichiometric coefficients for the reaction. Since reaction rate was considered to be proportional to chemical affinity, it follows that for a general reaction of the type
where , ,  and  are active masses and k+ and k are affinity constants. Since at equilibrium the affinities and reaction rates for forward and backward reactions are equal, it follows that

# Contemporary view
The affinity constants, k+ and k-, of the 1879 paper can now be recognised as rate constants. The equilibrium constant, K, was derived by setting the rates of forward and backward reactions to be equal. This also meant that the chemical affinities for the forward and backward reactions are equal. The resultant expression
is the correct  even from the modern perspective, apart from the use of concentrations instead of activities (the concept of chemical activity was developed by Josiah Willard Gibbs, in the 1870s, but was not widely known in Europe until the 1890s). The derivation from the reaction rate expressions is no longer considered to be valid. Nevertheless, Guldberg and Waage were on the right track when they suggested that the driving force for both forward and backward reactions is equal when the mixture is at equilibrium. The term they used for this force was chemical affinity. Today the expression for the equilibrium constant is derived by setting the chemical potential of forward and backward reactions to be equal. The generalisation of the Law of Mass Action, in terms of affinity, to equilibria of arbitrary stoichiometry was a bold and correct conjecture.
The hypothesis that reaction rate is proportional to reactant concentrations is, strictly speaking, only true for elementary reactions (reactions with a single mechanistic step), but the empirical rate expression
is also applicable to second order reactions that may not be concerted reactions. Guldberg and Waage were fortunate in that reactions such as ester formation and hydrolysis, on which they originally based their theory, do indeed follow this rate expression.
In general many reactions occur with the formation of reactive intermediates, and/or through parallel reaction pathways. However, all reactions can be represented as a series of elementary reactions and, if the mechanism is known in detail, the rate equation for each individual step is given by the r_f expression so that the overall rate equation can be derived from the individual steps. When this is done the equilibrium constant is obtained correctly from the rate equations for forward and backward reaction rates.
In biochemistry, there has been significant interest in deducing the rate laws for chemical reactions occurring in the intracellular medium. Although deviations of the law of mass action have been reported, it has been shown that the law of mass action can be valid in intracellular environments under certain conditions.
The fact that Guldberg and Waage developed their concepts in steps from 1864 to 1867 and 1879 has resulted in much confusion in the literature as to which equation the Law of Mass Action refers. It has been a source of some textbook errors.  Thus, today the "law of mass action" sometimes refers to the (correct) equilibrium constant formula
and at other times to the (usually incorrect) r_f rate formula.