* Sodium (Na) is an alkali metal in group 1 of the periodic table. It has a +1 charge when it forms an ionic bond.
* Nitrogen (N) is a nonmetal in group 15 of the periodic table. It has a -3 charge when it forms an ionic bond.
To form a neutral compound, we need to balance the charges. Three sodium ions (3 x +1 = +3) are needed to balance the -3 charge of one nitride ion. This gives us the formula Na₃N.
NaN₃ is the formula for sodium azide, a completely different compound. Azide (N₃⁻) is a polyatomic ion with a -1 charge, whereas nitride (N³⁻) is a single nitrogen atom with a -3 charge.