# Entropy of mixing

The entropy of mixing (also known as configurational entropy) is the change in the entropy, an extensive thermodynamic quantity, when two different chemical substances or components are mixed. This entropy change must be positive since there is more uncertainty about the spatial locations of the different kinds of molecules when they are interspersed. We assume that the mixing process has reached thermodynamic equilibrium so that the mixture is uniform and homogeneous. If the substances being mixed are initially at different temperatures and pressures, there will, of course, be an additional entropy increase in the mixed substance due to these differences being equilibrated, but if the substances being mixed are initially at the same temperature and pressure, the entropy increase will be entirely due to the entropy of mixing.

The entropy of mixing may be calculated by Gibbs' Theorem which states that when two different substances mix, the entropy increase upon mixing is equal to the entropy increase that would occur if the two substances were to expand alone into the mixing volume. (In this sense, then the term "entropy of mixing" is a misnomer, since the entropy increase is not due to any "mixing" effect.) Nevertheless, the two substances must be different for the entropy of mixing to exist. This is the Gibbs paradox which states that if the two substances are identical, there will be no entropy change, yet the slightest detectable difference between the two will yield a considerable entropy change, and this is just the entropy of mixing. In other words, the entropy of mixing is not a continuous function of the degree of difference between the two substances.

The entropy of mixing $\Delta S_{m}\,$ is given by:

$\Delta S_{m}=-nR(x_{1}\ln x_{1}+x_{2}\ln x_{2})\,$ where $R\,$ is the gas constant, $n\,$ the total number of moles and $x_{i}\,$ the mole fraction of each of the mixed components

## Proof

Assume that the molecules of two different substances are approximately the same size, and regard space as subdivided into a square lattice whose cells are the size of the molecules. (In fact, any lattice would do, including close packing.) This is a crystal-like conceptual model to identify the molecular centers of mass. If the two phases are liquids, there is no spatial uncertainty in each one individually. Everywhere we look in component 1, there is a molecule present, and likewise for component 2. After they are intermingled (assuming they are miscible), the liquid is still dense with molecules, but now there is uncertainty about what kind of molecule is in which location. Of course, any idea of identifying molecules in given locations is a thought experiment, not something one could do, but the calculation of the uncertainty is well-defined.

We can use Boltzmann's equation for the entropy change as applied to the mixing process

$\Delta S_{m}=k_{B}\ln \Omega \,$ where $k_{B}\,$ is Boltzmann’s constant. We then calculate the number of ways $\Omega \,$ of arranging $N_{1}\,$ molecules of component 1 and $N_{2}\,$ molecules of component 2 on a lattice, where

$N=N_{1}+N_{2}\,$ is the total number of molecules, and therefore the number of lattice sites. Calculating the number of permutations of $N\,$ objects, correcting for the fact that $N_{1}\,$ of them are identical to one another, and likewise for $N_{2}\,$ ,

$\Omega =N!/N_{1}!N_{2}!\,$ After applying Stirling's approximation, the result is

$\Delta S_{m}=-k_{B}[N_{1}\ln(N_{1}/N)+N_{2}\ln(N_{2}/N)]\,$ This expression can be generalized to a mixture of $r\,$ components, $N_{i}\,$ , with $i=1,2,3,...r\,$ $\Delta S_{m}=-k_{B}\sum _{i=1}^{r}N_{i}\ln(N_{i}/N)=-k_{B}\sum _{i=1}^{r}N_{i}\ln x_{i}\,\!$ where we have introduced the mole fractions, which are also the probabilities of finding any particular component in a given lattice site.

$x_{i}=N_{i}/N=p_{i}\,\!$ A more direct and logically transparent derivation, not requiring require Stirling's approximation, is to start with the Shannon entropy or compositional uncertainty

$-k_{B}\,\sum _{i=1}^{r}p_{i}\ln(p_{i})$ The summation is over the various chemical species, so this is the uncertainty about which kind of molecule is in any one site. It must be multiplied by the number of sites $N\,$ to get the uncertainty for the whole system. The entropy of mixing from above can be rearranged as

$\Delta S_{m}=-k_{B}N\sum _{i=1}^{r}(N_{i}/N)\ln(N_{i}/N)\,\!$ The equivalence of the two follows immediately.

Reverting to two components, we obtain

$\Delta S_{m}=-R(n_{1}\ln x_{1}+n_{2}\ln x_{2})=-nR(x_{1}\ln x_{1}+x_{2}\ln x_{2})\,$ where $R\,$ is the gas constant, equal to $k_{B}\,$ times Avogadro's number, $n_{1}\,$ and $n_{2}\,$ are the numbers of moles of the components, and $n\,$ is the total number of moles. Since the mole fractions are necessarily less than one, the values of the logarithms are negative. The minus sign reverses this, giving a positive entropy of mixing, as expected.

## Gibbs free energy of mixing

In an ideal gas or ideal solution (no enthalpy term) the Gibbs free energy change of mixing is given by:

$\Delta G_{m}=nRT(x_{1}\ln x_{1}+x_{2}\ln x_{2})\,$ where $\ \Delta G_{m}$ is the Gibbs free energy and $\ T$ the absolute temperature 

The Gibbs energy is always negative meaning that mixing as ideal solutions is always spontaneous. The lowest value is when the mole fraction is 0.5 for a mixture of two components or 1/n for a mixture of n components.

## Solutions

If the solute is a crystalline solid, the argument is much the same. A crystal has no spatial uncertainty at all, except for crystallographic defects, and a (perfect) crystal allows us to localize the molecules using the crystal symmetry group. The fact that volumes do not add when dissolving a solid in a liquid is not important for condensed phases. If the solute is not crystalline, we can still use a spatial lattice, as good an approximation for an amorphous solid as it is for a liquid.

The Flory-Huggins solution theory provides the entropy of mixing for polymer solutions, in which the macromolecules are huge compared to the solute molecules. In this case, the assumption is made that each monomer subunit in the polymer chain occupies a lattice site.

Note that solids in contact with each other also slowly interdiffuse, and solid mixtures of two or more components may be made at will (alloys, semiconductors, etc.). Again, the same equations for the entropy of mixing apply, but only for homogeneous, uniform phases.

## Gases

In gases there is a lot more spatial uncertainty because most of their volume is merely empty space. We can regard the mixing process as simply conjoining the two containers. The two lattices which allow us to conceptually localize molecular centers of mass also join. The total number of empty cells is the sum of the numbers of empty cells in the two components prior to mixing. Consequently, that part of the spatial uncertainty concerning whether any molecule is present in a lattice cell is the sum of the initial values, and does not increase upon mixing.

Almost everywhere we look, we find empty lattice cells. But we do find molecules in those few cells which are occupied. For each one, there is a contingent uncertainty about which kind of molecule it is. Using conditional probabilities, it turns out that the analytical problem for the small subset of occupied cells is exactly the same as for mixed liquids, and the increase in the entropy, or spatial uncertainty, has exactly the same form as obtained previously. Obviously the subset of occupied cells is not the same at different times. But only when an occupied cell is found do we ask which kind of molecule is there.

See also: Gibbs paradox, in which it would seem that mixing two samples of the same gas would produce entropy. 