Dolomite structure is formed by an ionic interaction of mg2+ (magnesium cation), ca2+ (calcium cation), and co32- (carbonate anion). For every two carbonate anions there is one magnesium cation and one calcium cation, thereby making the structure electrically neutral.