If the calcium and magnesium levels are good on my lab test, do is still need a bone density test? Are these related or not?

#1=yes, #2 = no. Serum calcium levels are tightly controlled by a hormone in four tiny glands inside the thyroid gland called parathyroid glands. If calcium levels are abnormal and confirmed abnormal, need to work up for kidney, bone or parathyroid disease. Bone density has no relation to normal calcium levels, so if the test is indicated, do it. Magnesium may become low on diuretics (like potassium), not related.
Bone density. Serum calcium and magnesium do not predict bone density results. Bone density is done when there are factors suggesting it may be abnormal such as age, sex hormone status, family history of osteoporosis and history of atraumatic fractures.
Not necessarily. Calcium and magnesium levels are not predictive of your bone density. If you had very low vitamin d or high parathyroid hormone levels, you could be at risk of osteoporosis. If you are a woman 65 or older, or with other risk factors such as steroid therapy, hyperthyroidism or history of fracture without a trauma, then you should get a bone density test.