Rain water is almost pure (may contain some dissolved gases from the atmosphere). Being a good solvent, when it flows on the surface of the earth, it dissolves many salts.
Presence of calcium and magnesium salts in the form of hydrogencarbonate, chloride and sulphate in water makes water ‘hard’. Hard water does not give lather with soap.
Water free from soluble salts of calcium and magnesium is called Soft water. It gives lather with soap easily.
Hard water forms scum/precipitate with soap. Soap containing sodium stearate (C17H35COONa) reacts with hard water to precipitate out Ca/Mg stearate.
2 C17H35COONa (aq) + M2+ (aq) → (C17H35COONa)2 M ↓ + 2Na+ (aq); Mis Ca/Mg
It is, therefore, unsuitable for laundry. It is harmful for boilers as well, because of deposition of salts in the form of scale. This reduces the efficiency of the boiler.
The hardness of water is of two types:
(i) temporary hardness, and (ii) permanent hardness