Mg3(PO4)2 crystallizes in the monoclinic P2_1/c space group. There are two inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to one O(2), one O(3), one O(4), and two equivalent O(1) atoms to form distorted MgO5 trigonal bipyramids that share  a cornercorner with one Mg(2)O6 octahedra, corners with three equivalent P(1)O4 tetrahedra,  an edgeedge with one Mg(2)O6 octahedra,  an edgeedge with one P(1)O4 tetrahedra, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles are 56°. In the second Mg site, Mg(2) is bonded to two equivalent O(2), two equivalent O(3), and two equivalent O(4) atoms to form MgO6 octahedra that share corners with six equivalent P(1)O4 tetrahedra, corners with two equivalent Mg(1)O5 trigonal bipyramids, and edges with two equivalent Mg(1)O5 trigonal bipyramids. P(1) is bonded to one O(1), one O(2), one O(3), and one O(4) atom to form PO4 tetrahedra that share corners with three equivalent Mg(2)O6 octahedra, corners with three equivalent Mg(1)O5 trigonal bipyramids, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 34-53°. There are four inequivalent O sites. In the first O site, O(1) is bonded in a distorted trigonal planar geometry to two equivalent Mg(1) and one P(1) atom. In the second O site, O(2) is bonded in a distorted trigonal planar geometry to one Mg(1), one Mg(2), and one P(1) atom. In the third O site, O(3) is bonded in a distorted trigonal planar geometry to one Mg(1), one Mg(2), and one P(1) atom. In the fourth O site, O(4) is bonded in a T-shaped geometry to one Mg(1), one Mg(2), and one P(1) atom.
Mg3(PO4)2 crystallizes in the monoclinic P2_1/c space group. There are two inequivalent Mg sites. In the first Mg site, Mg(1) is bonded to one O(2), one O(3), one O(4), and two equivalent O(1) atoms to form distorted MgO5 trigonal bipyramids that share  a cornercorner with one Mg(2)O6 octahedra, corners with three equivalent P(1)O4 tetrahedra,  an edgeedge with one Mg(2)O6 octahedra,  an edgeedge with one P(1)O4 tetrahedra, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles are 56°. The Mg(1)-O(2) bond length is 2.04 Å. The Mg(1)-O(3) bond length is 1.97 Å. The Mg(1)-O(4) bond length is 2.12 Å. There is one shorter (1.96 Å) and one longer (2.00 Å) Mg(1)-O(1) bond length. In the second Mg site, Mg(2) is bonded to two equivalent O(2), two equivalent O(3), and two equivalent O(4) atoms to form MgO6 octahedra that share corners with six equivalent P(1)O4 tetrahedra, corners with two equivalent Mg(1)O5 trigonal bipyramids, and edges with two equivalent Mg(1)O5 trigonal bipyramids. Both Mg(2)-O(2) bond lengths are 2.13 Å. Both Mg(2)-O(3) bond lengths are 2.15 Å. Both Mg(2)-O(4) bond lengths are 2.03 Å. P(1) is bonded to one O(1), one O(2), one O(3), and one O(4) atom to form PO4 tetrahedra that share corners with three equivalent Mg(2)O6 octahedra, corners with three equivalent Mg(1)O5 trigonal bipyramids, and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The corner-sharing octahedral tilt angles range from 34-53°. The P(1)-O(1) bond length is 1.54 Å. The P(1)-O(2) bond length is 1.55 Å. The P(1)-O(3) bond length is 1.53 Å. The P(1)-O(4) bond length is 1.53 Å. There are four inequivalent O sites. In the first O site, O(1) is bonded in a distorted trigonal planar geometry to two equivalent Mg(1) and one P(1) atom. In the second O site, O(2) is bonded in a distorted trigonal planar geometry to one Mg(1), one Mg(2), and one P(1) atom. In the third O site, O(3) is bonded in a distorted trigonal planar geometry to one Mg(1), one Mg(2), and one P(1) atom. In the fourth O site, O(4) is bonded in a T-shaped geometry to one Mg(1), one Mg(2), and one P(1) atom.