Temporary hardness of water is caused by the presence of dissolved metal ions such as calcium and magnesium carbonates. When these ions come into contact with soap, they react to form insoluble compounds known as soap curds or scum. This scum floats on the surface of the water.