Both magnesium deficiency and excess inhibits parathyroid hormone secretion resulting in hypocalcemia; and the hypocalcemia due to deficiency is corrected by magnesium supplements. Here, PTH is linked to Hypocalcemia.