In chemical reactions involving halogens, both Group 1A (alkali metals) and Group 2A (alkaline earth metals) react with diatomic halogens to form ionic halides. When a Group 1A metal, represented as \( M \), reacts with a diatomic halogen (e.g., \( \text{Cl}_2 \)), the resulting ionic halide can be expressed as \( MX \). Here, the metal \( M \) has a charge of +1, while the halogen, being in Group 7A, has a charge of -1. The charges balance each other out, leading to the formation of the ionic compound.
For example, if we consider the reaction:
\[ 2M + \text{Cl}_2 \rightarrow 2MX \]
In this equation, the coefficient of 2 is necessary to balance the two chlorine atoms from the diatomic halogen, which results in two metal ions on the product side.
Similarly, when a Group 2A metal, which has a charge of +2, reacts with a halogen, the product formed is \( MX_2 \). In this case, the reaction can be represented as:
\[ M + \text{Cl}_2 \rightarrow MX_2 \]
Here, the +2 charge of the Group 2A metal balances with the -1 charge of two halogen atoms, resulting in the formation of the ionic compound \( MX_2 \).
In summary, both Group 1A and Group 2A metals react with diatomic halogens to produce ionic halides, with the need to balance the overall reaction as necessary.
