Ba2Mg(CoO3)2 crystallizes in the triclinic P1 space group. There are two inequivalent Ba sites. In the first Ba site, Ba(1) is bonded in a 9-coordinate geometry to one O(1), one O(2), one O(5), two equivalent O(3), two equivalent O(4), and two equivalent O(6) atoms. In the second Ba site, Ba(2) is bonded in a 9-coordinate geometry to one O(3), one O(4), one O(6), two equivalent O(1), two equivalent O(2), and two equivalent O(5) atoms. Mg(1) is bonded to one O(1), one O(2), one O(4), one O(5), and one O(6) atom to form distorted MgO5 trigonal bipyramids that share  a cornercorner with one Co(1)O4 tetrahedra and  an edgeedge with one Co(1)O4 tetrahedra. There are two inequivalent Co sites. In the first Co site, Co(1) is bonded to one O(1), one O(3), one O(5), and one O(6) atom to form distorted CoO4 tetrahedra that share  a cornercorner with one Mg(1)O5 trigonal bipyramid and  an edgeedge with one Mg(1)O5 trigonal bipyramid. In the second Co site, Co(2) is bonded in a 4-coordinate geometry to one O(2), one O(3), one O(4), and one O(6) atom. There are six inequivalent O sites. In the first O site, O(1) is bonded in a 2-coordinate geometry to one Ba(1), two equivalent Ba(2), one Mg(1), and one Co(1) atom. In the second O site, O(2) is bonded in a 4-coordinate geometry to one Ba(1), two equivalent Ba(2), one Mg(1), and one Co(2) atom. In the third O site, O(3) is bonded in a 5-coordinate geometry to one Ba(2), two equivalent Ba(1), one Co(1), and one Co(2) atom. In the fourth O site, O(4) is bonded in a 2-coordinate geometry to one Ba(2), two equivalent Ba(1), one Mg(1), and one Co(2) atom. In the fifth O site, O(5) is bonded in a 2-coordinate geometry to one Ba(1), two equivalent Ba(2), one Mg(1), and one Co(1) atom. In the sixth O site, O(6) is bonded in a 3-coordinate geometry to one Ba(2), two equivalent Ba(1), one Mg(1), one Co(1), and one Co(2) atom.
Ba2Mg(CoO3)2 crystallizes in the triclinic P1 space group. There are two inequivalent Ba sites. In the first Ba site, Ba(1) is bonded in a 9-coordinate geometry to one O(1), one O(2), one O(5), two equivalent O(3), two equivalent O(4), and two equivalent O(6) atoms. The Ba(1)-O(1) bond length is 2.90 Å. The Ba(1)-O(2) bond length is 2.68 Å. The Ba(1)-O(5) bond length is 2.84 Å. There is one shorter (2.80 Å) and one longer (3.03 Å) Ba(1)-O(3) bond length. There is one shorter (2.75 Å) and one longer (3.06 Å) Ba(1)-O(4) bond length. There is one shorter (3.14 Å) and one longer (3.16 Å) Ba(1)-O(6) bond length. In the second Ba site, Ba(2) is bonded in a 9-coordinate geometry to one O(3), one O(4), one O(6), two equivalent O(1), two equivalent O(2), and two equivalent O(5) atoms. The Ba(2)-O(3) bond length is 2.64 Å. The Ba(2)-O(4) bond length is 2.74 Å. The Ba(2)-O(6) bond length is 2.86 Å. There is one shorter (2.95 Å) and one longer (3.12 Å) Ba(2)-O(1) bond length. There is one shorter (2.63 Å) and one longer (3.20 Å) Ba(2)-O(2) bond length. There is one shorter (2.93 Å) and one longer (2.99 Å) Ba(2)-O(5) bond length. Mg(1) is bonded to one O(1), one O(2), one O(4), one O(5), and one O(6) atom to form distorted MgO5 trigonal bipyramids that share  a cornercorner with one Co(1)O4 tetrahedra and  an edgeedge with one Co(1)O4 tetrahedra. The Mg(1)-O(1) bond length is 2.13 Å. The Mg(1)-O(2) bond length is 1.97 Å. The Mg(1)-O(4) bond length is 2.00 Å. The Mg(1)-O(5) bond length is 2.19 Å. The Mg(1)-O(6) bond length is 2.14 Å. There are two inequivalent Co sites. In the first Co site, Co(1) is bonded to one O(1), one O(3), one O(5), and one O(6) atom to form distorted CoO4 tetrahedra that share  a cornercorner with one Mg(1)O5 trigonal bipyramid and  an edgeedge with one Mg(1)O5 trigonal bipyramid. The Co(1)-O(1) bond length is 1.85 Å. The Co(1)-O(3) bond length is 1.93 Å. The Co(1)-O(5) bond length is 1.85 Å. The Co(1)-O(6) bond length is 2.02 Å. In the second Co site, Co(2) is bonded in a 4-coordinate geometry to one O(2), one O(3), one O(4), and one O(6) atom. The Co(2)-O(2) bond length is 1.85 Å. The Co(2)-O(3) bond length is 1.96 Å. The Co(2)-O(4) bond length is 1.93 Å. The Co(2)-O(6) bond length is 2.01 Å. There are six inequivalent O sites. In the first O site, O(1) is bonded in a 2-coordinate geometry to one Ba(1), two equivalent Ba(2), one Mg(1), and one Co(1) atom. In the second O site, O(2) is bonded in a 4-coordinate geometry to one Ba(1), two equivalent Ba(2), one Mg(1), and one Co(2) atom. In the third O site, O(3) is bonded in a 5-coordinate geometry to one Ba(2), two equivalent Ba(1), one Co(1), and one Co(2) atom. In the fourth O site, O(4) is bonded in a 2-coordinate geometry to one Ba(2), two equivalent Ba(1), one Mg(1), and one Co(2) atom. In the fifth O site, O(5) is bonded in a 2-coordinate geometry to one Ba(1), two equivalent Ba(2), one Mg(1), and one Co(1) atom. In the sixth O site, O(6) is bonded in a 3-coordinate geometry to one Ba(2), two equivalent Ba(1), one Mg(1), one Co(1), and one Co(2) atom.