The electronic configuration of a potassium atom is
K : 2 8 8 1 ( 1s2 2s2 2p6 3s2 3p6 4s1 )
It is readily seen that if a potassium atom were to lose one electron, the resulting species would have the configuration
K+ : 2 8 8 0 ( 1s2 2s2 2p6 3s2 3p6 4s0 )
or more simply
K+ : 2 8 8 ( 1s2 2s2 2p6 3s2 3p6 )
The nucleus of a potassium atom contains 19 protons, and if there are only 18 electrons surrounding the nucleus after the atom has lost one electron, the atom will have a net charge of 1+. An atom (or group of atoms) that contains a net charge is called an ion. In chemical notation, an ion is represented by the symbol of the atom with the charge indicated as a superscript to the right. Thus, the potassium ion is written K+. Ions that have the electronic configurations of noble gases are rather stable. Note the very important differences between a potassium ion and an argon atom, the different nuclear charges and the net 1+ charge on K+. The K+ ion is not as stable as the Ar atom.
The element hydrogen exists in the form of diatomic molecules, H2. Since both hydrogen atoms are identical, they are not likely to have opposite charges. (Neither has more electron-attracting power than the other.) Each free hydrogen atom contains a single electron, and if the atoms are to achieve the same electronic configuration as atoms of helium, they must each acquire a second electron. If two hydrogen atoms are allowed to come sufficiently close to each other, their two electrons will effectively belong to both atoms. The positively charged hydrogen nuclei are attracted to the pair of electrons shared between them, and a bond is formed. The bond formed from the sharing of a pair of electrons (or more than one pair) between two atoms is called a covalent bond. The hydrogen molecule is more stable than two separate hydrogen atoms. By sharing a pair of electrons, each hydrogen atom acquires a configuration analogous to that of a helium atom. Other pairs of nonmetallic atoms share electrons in the same way.