At it’s most basic, different elements prefer different numbers of things bonded to them. In this case, hydrogen likes to have one thing bonded to it and oxygen likes two. In the case of H20 and H2O2 this is satisfied by the connectivity HOH and HOOH. If it were OHHO or OHOH then you’d get oxygens with one bond and hydrogens with two.
For more complicated molecules where you can have more than one reasonable answers for how things are connected you need to use more complicated techniques such as infrared spectroscopy, NMR spectroscopy or x-ray crystallography. These are just a few of the more common techniques but there are many ways depending on exactly what you’re trying to determine the structure of.
Latest Answers