To write the formula for magnesium phosphide, follow these steps:
1. **Identify the ions involved**: Magnesium (Mg) and phosphorus (P) are the two elements in this compound. Magnesium typically forms a \(2+\) ion (Mg²⁺) because it loses two electrons to achieve a stable electron configuration. Phosphorus, when forming phosphide, typically forms a \(3-\) ion (P³⁻) because it gains three electrons to achieve a stable electron configuration.
2. **Determine the ratio of ions needed for neutrality**: The compound must be electrically neutral overall, so the total positive charge must balance the total negative charge.
- Magnesium ion: \( \text{Mg}^{2+} \)
- Phosphide ion: \( \text{P}^{3-} \)
3. **Find the least common multiple of the charges**: To balance the charges, you need the least common multiple of 2 and 3, which is 6. This means you need a total of 6 positive charges and 6 negative charges.
- For Mg²⁺: To get 6 positive charges, you need 3 magnesium ions (because \(3 \times 2 = 6\)).
- For P³⁻: To get 6 negative charges, you need 2 phosphide ions (because \(2 \times 3 = 6\)).
4. **Write the formula**: Combine the ions in the ratio needed. So, you have 3 magnesium ions and 2 phosphide ions. The formula for magnesium phosphide is therefore \( \text{Mg}_3\text{P}_2 \).
In summary, the formula for magnesium phosphide is \( \text{Mg}_3\text{P}_2 \).