Hydrogen combines with oxygen to make the compound water. A water molecule contains two hydrogen atoms and one oxygen atom, giving it the chemical formula H₂O.
The atoms are held together by covalent bonds, in which they share electrons. Oxygen attracts the shared electrons more strongly than hydrogen does, making water a polar molecule. This uneven charge distribution helps water molecules form hydrogen bonds with one another.
Those bonds explain many of water’s unusual properties, including its relatively high boiling point, its ability to dissolve many substances, and the fact that ice is less dense than liquid water. Water is also essential to known life and is the main component of Earth’s oceans, lakes, rivers, and organisms.
The composition of water was clarified through eighteenth-century chemistry. Henry Cavendish showed in 1781 that water could be produced from hydrogen and oxygen, while later work established the two-to-one hydrogen-to-oxygen ratio. A common mix-up is confusing oxygen with ozone: ozone is O₃, while the oxygen in ordinary water is part of H₂O.