text: The chemical potential, , of a substance B in an ideal mixture of liquids or an ideal solution is given by
  where μ is the chemical potential of a pure substance , and  is the mole fraction of the substance in the mixture.
  This is generalised to include non-ideal behavior by writing
  when  is the activity of the substance in the mixture,
  where  is the activity coefficient, which may itself depend on . As  approaches 1, the substance behaves as if it were ideal. For instance, if  ≈ 1, then Raoults law is accurate. For  > 1 and  < 1, substance B shows positive and negative deviation from Raoults law, respectively. A positive deviation implies that substance B is more volatile.
  In many cases, as  goes to zero, the activity coefficient of substance B approaches a constant; this relationship is Henry's law for the solvent.  These relationships are related to each other through the Gibbs–Duhem equation.
  Note that in general activity coefficients are dimensionless.
  In detail: Raoult's law states that the partial pressure of component B is related to its vapor pressure (saturation pressure) and its mole fraction  in the liquid phase,
  with the convention
  In other words: Pure liquids represent the ideal case.
  At infinite dilution, the activity coefficient approaches its limiting value, . Comparison with Henry's law,
  immediately gives
  In other words: The compound shows nonideal behavior in the dilute case.
  The above definition of the activity coefficient is impractical if the compound does not exist as a pure liquid. This is often the case for electrolytes or biochemical compounds. In such cases, a different definition is used that considers infinite dilution as the ideal state:
  with
  and
  The  symbol has been used here to distinguish between the two kinds of activity coefficients. Usually it is omitted, as it is clear from the context which kind is meant. But there are cases where both kinds of activity coefficients are needed and may even appear in the same equation, e.g., for solutions of salts in (water + alcohol) mixtures. This is sometimes a source of errors.
  Modifying mole fractions or concentrations by activity coefficients gives the effective activities of the components, and hence allows expressions such as Raoult's law and equilibrium constants to be applied to both ideal and non-ideal mixtures.
  Knowledge of activity coefficients is particularly important in the context of electrochemistry since the behaviour of electrolyte solutions is often far from ideal, due to the effects of the ionic atmosphere.  Additionally, they are particularly important in the context of soil chemistry due to the low volumes of solvent and, consequently, the high concentration of electrolytes.