Soaps are salts of fatty acids. Common soaps are water soluble sodium and potassium salts of fatty acids. Soap cannot form lather unless it dissolves in water. Hard water does not dissolve soap because the calcium and magnesium salts present in it produce insoluble substances by reacting with soap. These insoluble substances separate out as scum and reduce the effectiveness of the soap as a cleansing agent.