Soaps cannot be used with hard water. Why?

(a) Soaps cannot be used with hard water. Why?
(b) Give the chemical composition of detergents.
© Give one advantage of detergents over soaps.

(a) Hard water contains calcium and magnesium salts, which react with soap and form scum (insoluble substance).
(b) Detergents are ammonium or sulphonate salts.
© Detergents do not form insoluble precipitate with calcium and magnesium ions in hard water, thus, they remain effective in hard water.