Final answer:
Nitrogen gains three electrons to achieve a noble-gas electron configuration, filling its valence shell to satisfy the octet rule and becoming stable like the noble gases.
Step-by-step explanation:
Nitrogen achieves a noble-gas electron configuration by gaining three electrons. With five valence electrons, nitrogen has three unpaired electrons, and by gaining three more electrons, it fills its outer shell to satisfy the octet rule, which is the state where an element has eight electrons in its valence shell, akin to the electron configuration of a noble gas. Noble gases are known for their chemical inertness due to this complete valence shell, and other elements strive to achieve this configuration for stability, as seen in the formation of the strong triple covalent bond in diatomic nitrogen (N₂).
The electron configuration of a noble gas, such as neon (Ne), is complete with all orbitals in the n = 1 and n = 2 shells filled, resulting in the configuration 1s² 2s² 2p⁶. This stable arrangement is often the goal for other elements through electron gain or loss or through covalent bonding where electrons are shared. Nitrogen, with its ability to form triple bonds, is a prime example of achieving stability through covalent sharing of electrons to fulfill the octet rule.