Every rule has its exception, and that goes for the Octet Rule as well. While there are many scenarios where the Octet Rule does not apply, this relatively short article will only cover one of them. The Duet Rule applies to hydrogen and helium only, but the abundance of hydrogen is so prominent that the rule deserves its own article. For hydrogen and helium, unlike most other elements, a full valence shell consists of two electrons rather than eight.
Before continuing on, note this article assumes familiarity with the Octet Rule.
Helium atoms have two electrons and two protons. There is only one shell of electrons, the valence shell of two electrons. It is a noble gas and is ths relatively inert. If it needs to gain electrons as part of a bonding sequence, it will need to form a new valence shell further away from the nucleus than the old one. That said, any bizarre bonding patterns with helium are not sufficiently practical or simple to be taught in high school chemistry classes.
Theoretically, however, helium can form a single bond with fluorine, but this is a very unstable configuration as the helium atom will then have one unpaired electron.
When hydrogen participates in ionic bonding, it wil always be the anion. This group of comounds are called metal hydrides. In them, hydrogen atoms gain one electron and become hydride ions, \(H^{-}\).
Example 1: Sodium hydride is \(NaH\). Sodium most easily gets a full octet by losing one valence electron, so the sodium ion is \(Na^{+}\), so it bonds with hydride ions in a 1:1 ratio.
Example 2: Magnesium hydride is \(MgH_2\). Magnesium tends to form \(+2\) cations most easily as this requries the transfer of the fewest electrons. As we discussed earlier, hydride ions have a \(-1\) charge, so we need two of them to balance out the charge of one magnesium cation. Thus magnesium hydride is \(MgH_2\).
The Duet Rule still applies when hydrogen forms covalent bonds, but the two valence electrons that are used will always be shared with another atom through a covalent bond. A single bonding pair is all hydrogen needs to get its duet, so it typically does not form double or triple bonds.
Example 3: Hydrogen monochloride, a.k.a. hydrochloric acid, is one hydrogen atom bonded with one chlorine atom. Recall that hydrogen atoms have one valence electron unbonded and chlorine has seven. Thus each atom can contribute one electron to a bonding pair, and now hydrogen has two [shared] valence electrons and chlorine has a full octet! Thus this is a stable molecule. Its Lewis Structure is depicted below.