One of the most important advances in chemistry during the twentieth century was the understanding of the way atoms bond (join together) to form compounds. Atoms either share pairs of electrons between them (a covalent bond), or they transfer one or more electrons from one atom to another to form positive and negative ions, which are held together because of their opposite charge (the ionic bond). The electrons farthest away from the nucleus, the valence electrons, are the ones involved in bonding. Lewis symbols for elements show only the valence electrons possessed by a particular element. The valence shell becomes uniquely stable with eight electrons. Many elements try to fill out the valence shell with eight electrons by forming bonds with other atoms.
Bonds between nonmetal elements are formed by sharing electrons between atoms, whereas the formation of bonds between metals and nonmetals involves the transfer of electrons forming ions of opposite charge. If an atom completely loses one or two electrons, it becomes an ion with a +1 or +2 charge, respectively, such as Na + or Ca 2+. If an atom gains one or two electrons, it forms an ion with a –1 or –2 charge, respectively, such as Cl – or S 2–. Metals tend to lose electrons, whereas nonmetals tend to gain electrons in reactions. In all cases and no matter how it is done, the goal to achieve eight electrons in the outermost shell drives the formation of bonds between atoms.