Gilbert Lewis Newton introduced a simple way to show the bonding between atoms in a molecule through Lewis electron dot diagrams.
Valence electrons are represented as dots and when two electrons are paired (lone pairs), they are represented by two adjacent dots located on an atom.
When two paired electrons are shared between atoms (bonds), they are shown as lines.
Lewis electron dot diagrams allow us to show how atoms are connected and to predict the shape of the molecule using the valence shell electron repulsion theory (VSEPR).
The octet rule states that atoms form bonds to achieve eight electrons in their valence shell.
The first row elements, H and He, are exceptions to the octet rule although they still have a full valence shell.
Hypovalency is when an atom has partially-filled valence shells, such as a carbocation.
Hypervalency is a case where an element has more than eight electrons in its valence shell, common for larger atoms.
When an atom is part of a molecule, all electrons that are associated with the atom are counted as contributing to the atom's valence, including electrons that are lone pairs and shared in bonds.
Electrons in valence (octet) = total unbound electrons in the atom + total bonded electrons