Like calcium and strontium, magnesium is used in the calcification of skeletons of reef organisms. In many cases, magnesium is used in place of calcium for calcification. In addition to its role in calcification, magnesium is used by organisms ranging from bacteria to coralline algae to fish.