Elements bond together by trading or sharing electrons to create a stable shell of eight electrons, satisfying the octet rule. The octet rule is the rule that states that atoms tend to share or donate electrons such that the valence shell contains eight electrons (). The valence electrons are determined by the column (or group) that an atom is in on the periodic table. The first group on the periodic table is the alkali metals, which all have one valence electron. Sodium, lithium, potassium, and all alkali metals have one valence electron. Elements in the second group (beryllium, magnesium, calcium,…) have two valence electrons. All the elements in group 13, sometimes called 3A, which includes boron and aluminum, have three valence electrons. The elements in the carbon group (group 14 or 4A), which includes carbon and silicon, have four valence electrons. The elements in groups 15 (5A), 16 (6A), 17 (7A), and 18 (8A) have five, six, seven, and eight electrons, respectively.
Organic chemistry focuses on a few elements. Hydrogen, carbon, nitrogen, oxygen, phosphorus, sulfur, and the halogens are the main elements that are found in organic molecules. All of these elements, except carbon and hydrogen, have one (nitrogen and phosphorus), two (oxygen and sulfur), or three (halogens) lone pairs. A lone pair is a valence electron pair that does not form a bond.Boron and aluminum have three valence electrons, so they typically make compounds with three bonds and no lone pairs of electrons. Therefore, boron and aluminum often form compounds with only six valence electrons, which is an exception to the octet rule. Row 2 elements, such as boron, carbon, nitrogen, oxygen, and fluorine, cannot violate the octet rule by having more than eight electrons, but they may have fewer than eight electrons.
A neutral molecule may contain atoms that individually bear a positive and negative formal charge. A formal charge is the hypothetical charge assigned to an atom in a molecule with the assumption that bonding electrons are shared equally. The formal charge is the difference between the number of "owned" electrons in the Lewis structure and the number of electrons in the unbonded atomic state. For example, in nitromethane, CH3NO2, one oxygen shares a single bond with nitrogen, leaving the oxygen atom with six unbonded, or lone pair, electrons and a net negative (−1) charge, or a formal charge of −1. The nitrogen atom has a net positive (+1) charge, or a formal charge of +1. The double-bonded oxygen is neutral because its electron count in the molecule is the same as a neutral oxygen atom. Similarly, the hydrogens have one electron, both in the molecule and in the neutral elemental form.
Formal charge is calculated using the formal charge formula:
For O-methylhydroxylamine, H2NOCH3, the formal charge of each element is calculated using the formal charge formula.
Hydrogen:Hydrogen does not follow the octet rule because it has a maximum of two electrons. Hydrogen and helium follow a modification of the octet rule called the duet rule. The duet rule states that hydrogen and helium prefer to have two valence electrons when forming compounds.