What is the formula for an ionic compound that contains the elements magnesium and chlorine? what is the formula for an ionic compound that contains the elements magnesium and chlorine? mgcl mg2cl mgcl2 mg2cl2?