why is trisodium phosphate an ionic compound?

Trisodium phosphate (Na3PO4) is an ionic compound because it is composed of positively charged sodium ions (Na+) and negatively charged phosphate ions (PO4^3-). In an ionic compound, the atoms are held together by electrostatic forces of attraction between the positively and negatively charged ions. In the case of trisodium phosphate, the sodium ions lose electrons to become positively charged cations, while the phosphate ions gain electrons to become negatively charged anions, resulting in the formation of an ionic bond between them.