Magnesium and calcium block each others absorption.
From: The Magnesium Miracle from Dr. Dean
To understand how you can create a calcium/magnesium imbalance in your own body, try this experiment in your kitchen. Crush a calcium pill and see how much dissolves in 1 oz of water. Then crush a magnesium pill and slowly stir it into the calcium water. When you introduce the magnesium, the remaining calcium dissolves; it becomes more water-soluble. The same thing happens in your bloodstream, heart, brain, kidneys, and all the tissues in your body. If you don’t have enough magnesium to help keep calcium dissolved, you may end up with calcium-excess muscle spasms, fibromyalgia, hardening of the arteries, and even dental cavities. Another scenario plays out in the kidneys. If there is too much calcium in the kidneys and not enough magnesium to dissolve it, you can get kidney stones.