Soaps are sodium or potassium salts of long chain carboxylic acids.
The Soap molecule has two ends with different properties.
Hydrophillic end :
Hydrophillic end dissolves in water
Hydrophobic which dissolves in hydrocarbons.
Cleaning action of soap:
The cleaning action of soap is due to micelle formation and emulsion formation. Inside water a unique orientation forms clusters of molecules in which the hydrophobic tails are in the interior of the cluster and the ionic ends on the surface of cluster. This results in the formation of micelle.
Soap in the form of micelle cleans the dirt as the dirt will be collected at the centre of micelle.
This property of soap makes it an emulsifier. The dirt suspended in micelles is easily rinsed away. This is known as cleaning action of soap.
In hard water soap don't give lather .Hard water contains calcium and magnesium salts, which combine with soap molecules to form insoluble precipitates known as scum.
Detergents have almost the same properties as soaps but they are more effective in hard water. Detergents are generally ammonium or sulphonate salts of long chain carboxylic acids. The charged ends of these compounds do not form insoluble precipitates with the calcium and magnesium ions in water.