Hard water forms soap scum instead of lather due to calcium and magnesium ions destroying the surfactant properties of soap. There are two types of water hardness: temporary hardness caused by bicarbonates that can be removed by boiling, and permanent hardness caused by sulphates that require a water softener to remove.