Here’s an interesting fact. Oxygen is magnetic. You wouldn’t normally see this, being as it’s a colourless gas which we’re all constantly surrounded by. But if you cool it down so it becomes a liquid, you can actually catch liquid oxygen in a magnetic field.
Being as most of us don’t have the means to cool oxygen down to a liquid state, here are a couple of gifs showing exactly this.
It’s not surface tension holding that little globule of oxygen in place. It’s actually caught in the magnetic field. You can see the original video here, courtesy of Ri Science.
The reason is that oxygen molecules are paramagnetic – their electronic structure contains two unpaired electrons, and unpaired electrons, anywhere you find them, are what cause magnetism. In the case of molecular oxygen, they’re also the reason why it’s so reactive. Two unpaired electrons like this puts a molecule into a triplet state, also known as a diradical – molecules with triplet ground states are rather unusual.
A more detailed explanation is that this is because its molecular orbital structure is a little unusual. Unfortunately, I’m afraid I’m really not in the mood to explain molecular orbital theory in detail right now. If anyone particularly wants me to, leave me a comment below. Yes, even if it’s for your coursework problems. Sure, why not?
Otherwise, for anyone reading who’s studied chemistry, I’ll just say it’s because of the two degenerate 1πg* antibonding orbitals, two electrons with nowhere else in to go in the molecule, and a consequence of Hund’s rule. Those two extra electrons are also why O₂ has a double bond and not a triple bond like N₂.
Also, as it happens, good quality molecular orbital diagrams are rather scarce on the internet. I can’t imagine why. This one has been borrowed from Research Gate.