Final answer:
The formula for the ionic compound formed between magnesium (Mg) and oxygen (O) is MgO.
Step-by-step explanation:
The ionic compound formed between magnesium (Mg) and oxygen (O) is magnesium oxide (MgO).
The formula for magnesium oxide is MgO because magnesium is a cation with a charge of 2+ (Mg2+) and oxygen is an anion with a charge of 2- (O2-). In an ionic compound, the positive and negative charges must balance out, so one Mg2+ ion combines with one O2- ion to form MgO.