Magnesite is magnesium carbonate, MgCO3. Iron (as Fe2+) substitutes for magnesium (Mg) with a complete solution series with siderite, FeCO3. Calcium, manganese, cobalt, and nickel may also occur in small amounts. Dolomite, (Mg,Ca)CO3, is almost indistinguishable from magnesite.
Magnesite can be formed via talc carbonate metasomatism of peridotite and other ultrabasic rocks. Magnesite is formed via carbonation of olivine in the presence of water and carbon dioxide, and is favored at moderate temperatures and pressures typical of greenschist facies;
Magnesite can also be formed via the carbonation of magnesian serpentine (lizardite) via the following reaction:
Serpentine + carbon dioxide → Talc + magnesite + Water