The type found deposited on the heating elements of water heaters consists mainly of calcium carbonate (CaCO3). Hard water contains calcium (and often magnesium) bicarbonate or similar ions. Magnesium salts originate from dolomitic limestone present in the rocks through which rainwater percolates before collection. Calcium salts, such as calcium carbonate and calcium bicarbonate (Ca(HCO3)2), are more soluble in hot water than cold water; thus, heating water does not cause calcium carbonate to precipitate "per se". However, there is an equilibrium between dissolved calcium bicarbonate and dissolved calcium carbonate as represented by the chemical equation