# What is the formula for the compound that forms when magnesium bonds with phosphorus?

Jan 24, 2017

The formula would be $M {g}_{3} {P}_{2}$. This would be an ionic compound.

#### Explanation:

First, we know this is an ionic compound because one of the elements is a metal.

From the periodic table or from the valence shells of the atoms, we can determine that magnesium forms an ion of $+ 2$ charge. Also, phosphorus will form a $- 3$ ion.

The formula is based on combining these ions in the smallest ratio that results in a total charge of zero, because all compounds must be electrically neutral.

So, three $M {g}^{2 +}$ ions and two ${P}^{3 -}$ ions result in a total of +6 and -6 charges, which gives us the zero total charge.

A compound with three magnesium ions and two phosphorus ions would be written $M {g}_{3} {P}_{2}$