In chemistry, an electron pair or a Lewis pair consists of two electrons that occupy the same molecular orbital but have opposite spins. The electron pair concept was introduced in a 1916 paper of Gilbert N. Lewis.
Because electrons are fermions, the Pauli exclusion principle forbids these particles from having exactly the same quantum numbers. Therefore, the only way to occupy the same orbital, i.e. have the same orbital quantum numbers, is to differ in the spin quantum number. This limits the number of electrons in the same orbital to exactly two.
The pairing of spins is often energetically favorable and electron pairs therefore play a very large role in chemistry. They can form a chemical bond between two atoms, or they can occur as a lone pair of valence electrons. They also fill the core levels of an atom.
Although a strong tendency to pair off electrons can be observed in chemistry, it is also possible that electrons occur as unpaired electrons.
In the case of metallic bonding the magnetic moments also compensate to a large extent, but the bonding is more communal so that individual pairs of electrons cannot be distinguished and it is better to consider the electrons as a collective 'ocean'.