An ionic compound is formed when an atom gains or loses electrons to achieve a stable electron configuration. Ions are formed due to electrostatic attraction between oppositely charged ions. Transition metals can form multiple stable ionic states due to their complex electron configurations. Polyatomic ions contain multiple atoms that travel together and are indicated using brackets. Covalent bonds form between nonmetals by sharing electrons rather than transferring them. Latin prefixes indicate the number of atoms in covalent compounds.