General Chemistry/Octet Rule and Exceptions
The octet rule refers to the tendency of atoms to prefer to have eight electrons in the valence shell. When atoms have fewer than eight electrons, they tend to react and form more stable compounds. When discussing the octet rule, we do not consider d or f electrons. Only the s and p electrons are involved in the octet rule, making it useful for the representative elements (elements not in the transition metal or inner-transition metal blocks). An octet corresponds to an electron configuration ending with s2p6.
Atoms will react to get in the most stable state possible. A complete octet is very stable because all orbitals will be full. Atoms with greater stability have less energy, so a reaction that increases the stability of the atoms will release energy in the form of heat or light. Reactions that decrease stability must absorb energy, getting colder.
The other tendency of atoms is to maintain a neutral charge. Only the noble gases (the elements on the right-most column of the periodic table) have zero charge with filled valence octets. All of the other elements have a charge when they have eight electrons all to themselves. The result of these two guiding principles is the explanation for much of the reactivity and bonding that is observed within atoms: atoms seek to share electrons in a way that minimizes charge while fulfilling an octet in the valence shell.
|The noble gases rarely form compounds. They have the most stable configuration (full octet, no charge), so they have no reason to react and change their configuration. All other elements attempt to gain, lose, or share electrons to achieve a noble gas configuration.|
The formula for table salt is NaCl. It is the result of Na+ ions and Cl- ions bonding together. If sodium metal and chlorine gas mix under the right conditions, they will form salt. The sodium loses an electron, and the chlorine gains that electron. In the process, a great amount of light and heat is released. The resulting salt is mostly unreactive — it is stable. It won't undergo any explosive reactions, unlike the sodium and chlorine that it is made of.
Why? Referring to the octet rule, atoms attempt to get a noble gas electron configuration, which is eight valence electrons. Sodium has one valence electron, so giving it up would result in the same electron configuration as neon. Chlorine has seven valence electrons, so if it takes one it will have eight (an octet). Chlorine has the electron configuration of argon when it gains an electron.
The octet rule could have been satisfied if chlorine gave up all seven of its valence electrons and sodium took them. In that case, both would have the electron configurations of noble gasses, with a full valence shell. However, their charges would be much higher. It would be Na7- and Cl7+, which is much less stable than Na+ and Cl-. Atoms are more stable when they have no charge, or a small charge.
The octet rule is a useful aid when predicting the behavior of elements, but it does have limitations.
Two Electrons 
The main exception to the rule is hydrogen, which is at its lowest energy when it has two electrons in its valence shell. Helium (He) is similar in that it, too, only has room for two electrons in its only valence shell.
Hydrogen and helium have only one electron shell. The first shell has only one s orbital and no p orbital, so it holds only two electrons. Therefore, these elements are most stable when they have two electrons. You will occasionally see hydrogen with no electrons, but H+ is much less stable than hydrogen with one or two electrons.
Lithium, with three protons and electrons, is most stable when it gives up an electron.
Less Than an Octet 
Other notable exceptions are aluminum and boron, which can function well with six valence electrons. Consider BF3. The boron shares its three electrons with three fluorine atoms. The fluorines follow the octet rule, but boron has only six electrons. Although atoms with less than an octet may be stable, they will usually attempt to form a fourth bond to get eight electrons. BF3 is stable, but it will form BF4 when possible.
More Than an Octet 
In Period 3, the elements on the right side of the periodic table have empty d orbitals. The d orbitals may accept electrons, allowing elements like sulfur and phosphorus to have more than an octet. Compounds such as PCl5 and SF6 can form. These compounds have 10 and 12 electrons around their central atoms, respectively.
|Xenon hexafluoride uses d-electrons to form more than an octet. This compound shows another exception: a noble gas compound.|
Odd Numbers 
Some elements, notably nitrogen, have an odd number of electrons and will form somewhat stable compounds. Nitric oxide has the formula NO. No matter how electrons are shared between the nitrogen and oxygen atoms, there is no way for nitrogen to have an octet. It will have seven electrons instead. An atom with an unpaired electron is called a free radical and is highly reactive.
|Nitrogen dioxide has an unpaired electron. (Note the positive charge above the N).|