Magnesium (Mg) is a chemical element, an alkaline earth metal, the eighth-most abundant element in the Earth's crust and the fourth-most common element on Earth. It is contained in magnesite, dolomite, brucite, carnallite, talc, and magnesium minerals. China is now the biggest producer of crude magnesite in the world for refractory and agricultural uses.