For example neutral nitrogen has 7 protons and 7 electrons. The transition elements therefore behave rather unusually. If that is all that nature provided, there would be no compounds and no minerals other than the pure elements. We know, of course, that elements can either gain or lose electrons to form ions, and that these ions are somehow involved in the formation of compounds. The formation of ions, and indeed compounds, is related to the electronic configuration of the elements themselves.
Thermodynamic considerations demand that atoms strive toward the lowest possible energy state.
This results in atoms giving-up or acquiring electrons in their outermost electron orbitals, thereby forming cations and anions, respectively. The number of electrons gained or lost is referred to as valence or valence state . The energy required to remove an electron from its neutral orbital to form a cation is the ionization energy and the energy given up by an atom in forming an anion is called electron affinity . Cl lacks just one electron from having a completely filled 3p orbital. Chlorine's attraction for an additional electron is quite large, and it therefore typically forms an anion in bonding to atoms with low ionization energies.