Temporary hardness of water is due to the presence of calcium hydrogencarbonate Ca (HCO3)2(aq) and magnesium hydrogencarbonate Mg(HCO3)2(aq). Both calcium hydrogencarbonate and magnesium hydrogencarbonate decompose when heated. The original insoluble carbonates is reformed. This happens when water is boiled.