MgIn2 crystallizes in the hexagonal P-6m2 space group. Mg(1) is bonded in a 6-coordinate geometry to three equivalent In(1) and three equivalent In(3) atoms. There are three inequivalent In sites. In the first In site, In(1) is bonded to three equivalent Mg(1) and three equivalent In(2) atoms to form distorted InMg3In3 cuboctahedra that share corners with six equivalent In(2)In12 cuboctahedra, corners with six equivalent In(1)Mg3In3 cuboctahedra, edges with six equivalent In(2)In12 cuboctahedra, edges with six equivalent In(1)Mg3In3 cuboctahedra, and  a faceface with one In(1)Mg3In3 cuboctahedra. In the second In site, In(2) is bonded to six equivalent In(1) and six equivalent In(2) atoms to form InIn12 cuboctahedra that share corners with six equivalent In(2)In12 cuboctahedra, corners with twelve equivalent In(1)Mg3In3 cuboctahedra, edges with six equivalent In(2)In12 cuboctahedra, edges with twelve equivalent In(1)Mg3In3 cuboctahedra, and faces with six equivalent In(2)In12 cuboctahedra. In the third In site, In(3) is bonded in a 6-coordinate geometry to six equivalent Mg(1) atoms.
MgIn2 crystallizes in the hexagonal P-6m2 space group. Mg(1) is bonded in a 6-coordinate geometry to three equivalent In(1) and three equivalent In(3) atoms. All Mg(1)-In(1) bond lengths are 3.13 Å. All Mg(1)-In(3) bond lengths are 3.07 Å. There are three inequivalent In sites. In the first In site, In(1) is bonded to three equivalent Mg(1) and three equivalent In(2) atoms to form distorted InMg3In3 cuboctahedra that share corners with six equivalent In(2)In12 cuboctahedra, corners with six equivalent In(1)Mg3In3 cuboctahedra, edges with six equivalent In(2)In12 cuboctahedra, edges with six equivalent In(1)Mg3In3 cuboctahedra, and  a faceface with one In(1)Mg3In3 cuboctahedra. All In(1)-In(2) bond lengths are 3.31 Å. In the second In site, In(2) is bonded to six equivalent In(1) and six equivalent In(2) atoms to form InIn12 cuboctahedra that share corners with six equivalent In(2)In12 cuboctahedra, corners with twelve equivalent In(1)Mg3In3 cuboctahedra, edges with six equivalent In(2)In12 cuboctahedra, edges with twelve equivalent In(1)Mg3In3 cuboctahedra, and faces with six equivalent In(2)In12 cuboctahedra. All In(2)-In(2) bond lengths are 3.37 Å. In the third In site, In(3) is bonded in a 6-coordinate geometry to six equivalent Mg(1) atoms.