Answer. Salts of divalent cations like Mg2+, Ca2 and anions like Cl-, S042-, HCO3- and COs2; for example, gypsum (CaSO4.2H2O) and lime stone (CaCO3) are responsible for hardness of water. Gypsum is sparingly soluble in water, while limestone is insoluble in water. However, in the presence of carbon dioxide small quantity of limestone is soluble in water according to the chemical reaction.
CaCO3(s) + CO2(g) + H2O(1) Ca(HCO3)2(aq)
MgCO3(s) + CO2(g) + H2O(1) Mg(HCO3) 2(aq)