Ionic bonding results from the electrostatic attraction between oppositely charged ions. When a metal atom reacts with a nonmetal, the metal typically loses electrons to form a cation while the nonmetal gains electrons to form an anion. These oppositely charged ions are then attracted to each other, forming an ionic bond. Ionic compounds have crystalline structures where the ions are arranged in repeating patterns. Their strong ionic bonds make them brittle with high melting points. Many ionic compounds dissolve in water to form electrolyte solutions where the ions are free to move.