Ionic compounds are formed when atoms transfer electrons to achieve stability. This typically involves a metal and a non-metal joining together. In an ionic compound, one atom gives up electrons to another, forming ions. These ions are atoms with an electric charge due to the loss or gain of electrons. For instance, magnesium in the form of
- a magnesium ion (\(\mathrm{Mg}^{2+}\)) loses two electrons.
- The sulfur in a sulfide ion (\(\mathrm{S}^{2-}\)) gains two electrons, making each ion stable and forming the compound magnesium sulfide (\(\mathrm{MgS}\)).
This transfer of electrons creates a strong attractive force that holds the ions together, known as ionic bonding. The forces responsible for ionic bonding are electrostatic forces that occur between oppositely charged particles.
These compounds generally form crystalline solids at room temperature, which are characterized by a regular three-dimensional arrangement of the ions.