extracted from sea water electrolytically. The remaining portion of the magnesium metal and salts is extracted from ancient ocean deposits where the salts precipitated during evaporation or formed during diagenesis .