K2MgV2O7 crystallizes in the tetragonal P4_2/mnm space group. There are two inequivalent K sites. In the first K site, K(1) is bonded in a distorted body-centered cubic geometry to two equivalent O(1), two equivalent O(3), and four equivalent O(2) atoms. In the second K site, K(2) is bonded in a body-centered cubic geometry to four equivalent O(1) and four equivalent O(2) atoms. Mg(1) is bonded to four equivalent O(2) atoms to form MgO4 tetrahedra that share corners with four equivalent V(1)O4 tetrahedra. V(1) is bonded to one O(1), one O(3), and two equivalent O(2) atoms to form VO4 tetrahedra that share  a cornercorner with one V(1)O4 tetrahedra and corners with two equivalent Mg(1)O4 tetrahedra. There are three inequivalent O sites. In the first O site, O(3) is bonded to two equivalent K(1) and two equivalent V(1) atoms to form distorted edge-sharing OK2V2 tetrahedra. In the second O site, O(1) is bonded in a 4-coordinate geometry to one K(1), two equivalent K(2), and one V(1) atom. In the third O site, O(2) is bonded in a distorted bent 120 degrees geometry to one K(1), one K(2), one Mg(1), and one V(1) atom.
K2MgV2O7 crystallizes in the tetragonal P4_2/mnm space group. There are two inequivalent K sites. In the first K site, K(1) is bonded in a distorted body-centered cubic geometry to two equivalent O(1), two equivalent O(3), and four equivalent O(2) atoms. Both K(1)-O(1) bond lengths are 2.66 Å. Both K(1)-O(3) bond lengths are 2.76 Å. All K(1)-O(2) bond lengths are 3.11 Å. In the second K site, K(2) is bonded in a body-centered cubic geometry to four equivalent O(1) and four equivalent O(2) atoms. All K(2)-O(1) bond lengths are 2.89 Å. All K(2)-O(2) bond lengths are 2.85 Å. Mg(1) is bonded to four equivalent O(2) atoms to form MgO4 tetrahedra that share corners with four equivalent V(1)O4 tetrahedra. All Mg(1)-O(2) bond lengths are 1.96 Å. V(1) is bonded to one O(1), one O(3), and two equivalent O(2) atoms to form VO4 tetrahedra that share  a cornercorner with one V(1)O4 tetrahedra and corners with two equivalent Mg(1)O4 tetrahedra. The V(1)-O(1) bond length is 1.66 Å. The V(1)-O(3) bond length is 1.81 Å. Both V(1)-O(2) bond lengths are 1.71 Å. There are three inequivalent O sites. In the first O site, O(3) is bonded to two equivalent K(1) and two equivalent V(1) atoms to form distorted edge-sharing OK2V2 tetrahedra. In the second O site, O(1) is bonded in a 4-coordinate geometry to one K(1), two equivalent K(2), and one V(1) atom. In the third O site, O(2) is bonded in a distorted bent 120 degrees geometry to one K(1), one K(2), one Mg(1), and one V(1) atom.