Like dissolves like. This rule allows us to predict or explain why a solute may be soluble in one solvent and be insoluble in another. For example. Ethanol is soluble in water because both compounds are polar compounds; but benzene is insoluble in water because benzene is non-polar. Sodium chloride is soluble in water because it is an ionic compound, whereas water is a polar compound; but sodium chloride is not soluble in benzene, because benzene is non-polar.

Then the question is: Why some ionic compounds are insoluble in water?

Tunderstand this, we must understand what happens when a compound dissolves in water.

When you mix two substances, the process passes through different steps as shown below. Some processes require energy, others release energy, and there is also a change in entropy. It is the combination of all those factors that leads to solubility or no solubility of a substance in a solvent

(a) Water + Ionic solute

- Dissociation of the solute into ions: this is an endothermic process, i.e. it requires energy: +H1

- Once the ions are separated, they are surrounded by molecules of solvent: this is an exothermic process, i.e. it releases energy: -H2

                                    Example of the dissociation of NaCl in water:

                                                                      (study.com)

- After dissociation, the ions disperse randomly in the solvent: the entropy increases: ΔS>0

- Gibbs Free Energy for the whole process: ΔG = (+H1 -H2) – TΔS = ΔH – TΔS

- If ΔG = ΔH – TΔS < 0,  the solute is soluble.

- If ΔG = ΔH – TΔS > 0,  the solute is insoluble.

Since ΔS of mixing is always positive, all compounds with negative enthalpy of dissolution, ΔH < 0 (exothermic), are soluble.

Also, compounds with a positive enthalpy of dissolution, ΔH > 0 (endothermic), but where ΔH < TΔS, are soluble, as in the case of the dissolution of NH4Cl where the needed ΔH is drawn from the near environment (mixture). If you dissolve NH4Cl in water in an Erlenmeyer and you touch it, you notice that the Erlenmeyer has cooled down.

(b) Water + Covalent solute

Here the same reasoning applies, except that there is no dissociation of the solute; but molecules of water and molecules of the solute must be separated to allow them to intermix.

- Separation of molecules of water and molecules of the solute: the process is endothermic: +H1

- Attraction between the molecules of water and the molecules of the solute (water-solute attraction): the process is exothermic: -H2

- Random distribution of solute molecules in the solvent: increasing of entropy: ΔS>0

- In term of Gibbs Free Energy for the whole process:

                                        ΔG = (+H1 -H2) - TΔS = ΔH –TΔS

- If ΔG = ΔH – TΔS < 0,  the the solute is soluble.

- If ΔG = ΔH – TΔS > 0,  the solute is insoluble.

For covalent molecules, generally ΔH > TΔS or ΔG > 0, and this explains why most of organic compounds are insoluble in water.

For covalent molecules having one or another of the following groups, O-H, N-H and H-F, in their molecules, they are soluble in water because of the favorable hydrogen bond interactions between water molecules and the solute molecules. This explains for example why most of alcohols and amines are soluble in water.

Therefore, the solubility is affected by two main factors: the enthalpy factor, ΔH, and the entropy factor, TΔS. When the combination of those two factors gives a negative ΔG, the solute is soluble in the solvent, when the combination gives a positive ΔG, the solute is not soluble.

Let’s illustrate this by a simple example: Water and Benzene are immiscible because of the following:

- Separating the molecules of water: this requires a lot of energy due to the strong attraction force between the molecules of water held by Hydrogen bonding:

H2O...H2O →  H2O              H2O   requires lot of energy (+H1)

- Separating the molecules of benzene: this requires little energy due to the weak attraction force between the molecules of benzene held by van der Waals forces:

C6H6..........C6H6→   C6H6          C6H6 requires little energy (+H2)

- Mixing the two means creation of new attraction force between water, a polar molecule, and benzene, a non-polar molecule; those are very week van de Waals forces:

H2O -------------------- C6H6: releases little energy (-H3)

- In these three processes we have: (H1+ H2) – H3 = ΔH > 0

- Therefore, the two liquids are immiscible, because: ΔH – TΔS > 0, the enthalpy change of the process is too high compared to the entropy factor TΔS. Therefore, water and benzene are immiscible.