Valence electrons are those electrons in the outer shell of a given atom, the number of which determines how atoms interact with each other. An atom is said to have a closed shell when it has enough valence electrons in order to make it stable; when there are not enough, it is said to have an open shell. An atom with an open shell is constantly trying to reach stability, forming one of the foundations of many chemical reactions.
An atom is reactive or inert depending on how many valence electrons it has. The most reactive atoms are those that have one or two to lose or those that have one or two to gain in order to maintain stability. For this reason, the noble gases — all of which have a closed outer shell in nature — are chemically inert. In general, eight electrons are needed for an atom to reach stability. Two notable exceptions are hydrogen and helium, both of which need two to make a closed shell.
The affinity for atoms to achieve stability by gaining or losing valence electrons provides a foundation for two types of chemical bonds: the ionic bond and the covalent bond. Ionic bonds are formed when one atom “steals” an electron from another. Table salt (NaCl) is an example of this. Sodium (Na) has one electron to give up. Chlorine (Cl), on the other hand, needs one to be complete.
To reach stability, chlorine will take an electron from sodium. This allows both elements to achieve a closed shell and stability. The result of this is that the sodium atom becomes a positive ion and the chlorine atom becomes a negative ion. The opposite charges will then attract each other. When in a solution, these molecules also conduct electricity, since ions are free to move around in the solution.
Water is an example of atoms forming a covalent bond. Hydrogen has one atom to gain or lose and oxygen needs two to achieve stability. In this application, however, the oxygen does not steal the electrons from the two hydrogen atoms. Rather, the oxygen and the two hydrogen atoms share the electrons, forming a water molecule. Atoms can also use covalent bonds to share electrons with atoms of the same element, such as in a hydrogen molecule (H2).