Question

# Why do soaps not work in hard water?

Hint: Hard water has salts of the elements which belong to the s-block, especially group 2 elements. When the soap and the salts combine a precipitate is formed rather than mixing up.

Soap is sodium or potassium salt of certain higher fatty acids such as stearic acid, palmitic acid, etc. When hard water is treated with soap solution, $C{{a}^{2+}}$ and $M{{g}^{2+}}$ ions present in hard water react with the anions of fatty acids present in soap to form scum or curdy white precipitates. As a result, hard water does not produce lather with soap immediately.
$2{{C}_{17}}{{H}_{35}}CO{{O}^{-}}N{{a}^{+}}+CaC{{l}_{2}}\to {{({{C}_{17}}{{H}_{35}}COO)}_{2}}Ca\downarrow +2NaCl$
$2{{C}_{17}}{{H}_{35}}CO{{O}^{-}}N{{a}^{+}}+MgS{{O}_{4}}\to {{({{C}_{17}}{{H}_{35}}COO)}_{2}}Mg\downarrow +N{{a}_{2}}S{{O}_{4}}$
However, when all the $C{{a}^{2+}}$ and $M{{g}^{2+}}$ ions present in hard water have been precipitated by addition of sufficient amount of soap, resulting water becomes soft and readily produce lather with soap. Instead, we can use detergent in the hard water because it forms lather with detergent.