* Ionic Bonding: Ionic compounds are formed by the electrostatic attraction between oppositely charged ions. Barium (Ba) is a metal, which tends to lose electrons to form a positively charged ion (Ba²⁺). Phosphorus (P) is a nonmetal, which tends to gain electrons to form a negatively charged ion (P³⁻).
* Electrostatic Attraction: The positively charged barium ions (Ba²⁺) are attracted to the negatively charged phosphide ions (P³⁻), forming the compound Ba₃P₂.
In summary: The transfer of electrons from barium to phosphorus, resulting in the formation of ions and their electrostatic attraction, makes barium phosphide an ionic compound.