Soap contains salts such as sodium stearate and sodium palmitate and when calcium ions in hard water mix with soap, a precipitate of calcium stearate / calcium palmitate is formed.
In the following equation, "X" represents either the stearate/palmitate:
Ca2+ (aq) + 2X- (aq) ----> CaX2 (s)
Some advantages of hard water as follows:
Calcium (in hard water) + Palmitate/stearate ions in soap ----> Scum
Some disadvantages of hard water:
- Taste supposedly better
- Strengthens bones/teeth
- With correct diet, it can reduce the risk of heart disease
- Needs more soap to form a lather
- Scum formed in wash basins etc...
- Scale will build up in pipes and reduce the efficiency of machinery using those pipes