John Dalton's theory of atoms said that all elements had one atom and atoms in compounds were usually alone. For example, he wrongly thought that water (HO) had the formula of just HO. In 1805, Joseph Louis Gay-Lussac and Alexander von Humboldt showed that water is made up of two hydrogen atoms and one oxygen atom. By 1811, Amedeo Avogadro correctly worked out what water was made of based on Avogadro's law.