The correct chemical formula for the ionic compound magnesium chlorate is Mg(ClO3)2.
This is because the magnesium ion has a +2 charge and the chlorate ion (ClO3) has a -1 charge. To balance the charges, you need two chlorate ions for each magnesium ion, resulting in the formula Mg(ClO3)2.