Water softening is the removal of calcium, magnesium, and certain other metal cations in hard water.Disodium phosphate (Na2HPO4), also known as sodium hydrogen phosphate, is used in conjunction with trisodium phosphate in foods and water softening treatment.