For example, pieces of magnesium are placed next to buried steel pipelines and water tanks. If magnesium were not present, oxygen and other chemicals in the earth would corrode the steel. Instead, the magnesium reacts with the chemicals. The pieces of magnesium can easily be replaced periodically at a cost much lower than that of replacing or repairing the steel. Protective strips of magnesium are also attached to the hulls of ships.
Steel manufacturers add magnesium to steel to remove sulfur and other impurities.
In addition, magnesium is used in fireworks and flares because it burns with a brilliant white light. It also produces intense heat when it burns, making it useful for incendiary bombs. Magnesium combines with other elements to form many useful compounds. Magnesium oxide resists heat and is used to line special types of furnaces. Also, magnesium oxide forms on the surface of magnesium metal and prevents it from corroding readily at low temperatures.