A homonuclear diatomic molecule is a molecule consisting of two atoms of the same element, bound together by one or more covalent bonds. Oxygen and hydrogen are examples of elements that form homonuclear diatomic molecules. Molecular orbital theory is frequently used to explain the properties of homonuclear diatomic molecules. Fractional bond orders can account for the stability of the H2+ and H2– ions, which cannot be explained by Lewis structures or valence bond theory. Molecular orbital theory has this key advantage over Lewis structures and valence bond theory.Oxygen (O2) molecules have eight molecular orbitals: and , and , and two each of and . Each oxygen atom, however, has six valence electrons, so an O2 molecule has 12 valence electrons. The electrons fill the orbitals in order of increasing energy, so there are two electrons in , two in , two in , and two in each of the orbitals. Once these five orbitals are filled with five pairs of electrons (10 total), there are still two more electrons to account for. Electrons enter orbitals of the same energy level singly before pairing up, so the last two electrons are split into the two orbitals. This means that according to molecular orbital theory, an O2 molecule has two unpaired electrons. These unpaired electrons explain why O2 is paramagnetic. Unpaired electrons induce a small magnetic field.