What is the empirical formula for an ionic compound?

$N a C l$ does not mean one sodium ion and one chloride ion; it means for every sodium ion in the salt, there is also one chloride ion. $M g C {l}_{2}$ means that there are two chloride ions for every magnesium ion in the salt The true numbers would be huge, of course, so we write it as the simplest ratio (the same as an empirical formula).