We write n ai for the number of atoms of type a in compound i. The equilibrium of chemical reactions, grounded in the Law of Conservation of Mass by Antoine Lavoisier , stipulates that all reactions r are balanced in the sense that the total number n - ar of atoms of type a in the reactants equals the total number n + ar of atoms of type a in the products, i.e.,