metal reacting with cold water will produce metal hydroxide. However, if a metal reacts with steam, like magnesium, metal oxide is produced as a result of metal hydroxides splitting upon heating. The hydroxides of calcium, strontium and barium are only slightly water-soluble but produce sufficient hydroxide ions to make the environment basic, giving a general equation of: M(s) + 2 H2O(l) ⟶ M(OH)2(aq) + H2(g) Reactivity series of metals If metals react with cold water, hydroxides are produced. If metals react with steam, oxides are formed. Hydrogen is always produced when a metal reacts with cold water or steam. References Chemical safety Water chemistry Alkali metals Alkaline earth metals