The atoms in a diatomic molecule are almost always held together by a covalent bond. This means the two atoms share one or more pairs of their outer electrons. Some diatomic species can be held together by ionic bonds in a gas state.
There are seven elements on the periodic table that exist naturally as homonuclear diatomic molecules. These elements are hydrogen, nitrogen, oxygen, fluorine, chlorine, bromine, and iodine. The heavier elements like iodine form solid crystals, but they are still made of paired atoms.
Chemists must always remember this rule when they are writing and balancing chemical equations. You will never find a lone atom of these seven elements sitting by itself under normal conditions. They always pair up with a twin to become more chemically stable.
Heteronuclear diatomic molecules are formed when two completely different elements bond together. Carbon monoxide and hydrogen chloride are two very common examples of these mixed molecules. These mixed molecules are typically polar because the two elements have different pulling powers on electrons. One atom will pull the shared electrons closer to its own nucleus, creating a slight charge.
