Polyatomic and molecular ions are often formed by the gaining or losing of elemental ions such as a proton, , in neutral molecules. For example, when ammonia, , accepts a proton, —a process called protonation—it forms the ammonium ion, . Ammonia and ammonium have the same number of electrons in essentially the same electronic configuration, but ammonium has an extra proton that gives it a net positive charge.
Ammonia can also lose an electron to gain a positive charge, forming the ion . However, this ion is unstable, because it has an incomplete valence shell around the nitrogen atom, making it a very reactive radical ion.
Due to the instability of radical ions, polyatomic and molecular ions are usually formed by gaining or losing elemental ions such as , rather than gaining or losing electrons. This allows the molecule to preserve its stable electronic configuration while acquiring an electrical charge.