The law of mass action forms the basis of the compartmental model of disease spread in mathematical epidemiology, in which a population of humans, animals or other individuals is divided into categories of susceptible, infected, and recovered (immune). The principle of mass action is at the heart of the transmission term of compartmental models in epidemiology, which provide a useful abstraction of disease dynamics. The law of mass action formulation of the SIR model corresponds to the following "quasichemical" system of elementary reactions: 
:The list of components is S (susceptible individuals), I (infected individuals), and R (removed individuals, or just recovered ones if we neglect lethality);
:The list of elementary reactions is
:If the immunity is unstable then the transition from R to S should be added that closes the cycle (SIRS model):
A rich system of law of mass action models was developed in mathematical epidemiology by adding components and elementary reactions.
Individuals in human or animal populations unlike molecules in an ideal solution do not mix homogeneously. There are some disease examples in which this non-homogeneity is great enough such that the outputs of the classical SIR model and their simple generalizations like SIS or SEIR, are invalid. For these situations, more sophisticated compartmental models or distributed reaction-diffusion models may be useful.