Soaps are sodium or potassium salts of fatty acids having — COONa group. Detergents are sodium or potassium salts of sulphonic acids having — SO3Na and — SO4Na group. Cleansing action of soap: Soap molecules consist of a large hydrocarbon tail which is
hydrophobic (water-hating or water repelling) with a negatively charged head which is hydrophilic (water-loving) as shown in figure.
When a soap is dissolved in water, the molecules associate together as clusters called micelles in which water molecules, being polar in nature, surround the ions and the hydrocarbon part of the molecule attracts grease, oil and dirt. The tails stick inwards and the heads outwards. In cleaning, the hydrocarbon tail attaches itself to oily dirt. When water is agiated (shaken vigorously), the oily dirt tends to lift off from the dirty surface and dissociate into fragments. This gives opportunity to other tails to stick to oil. The solution now contains small globules of oil surrounded by soap molecules. The negatively charged and form aggregates. Thus, the oily dirst is removed. Hard water has Ca2+ and Mg2+ ions. When it reacts with soap, it forms insoluble compound and the soap goes waste.