Step-by-step explanation:
Sodium is the element of the group 1 and period 3 which means that the valence electronic configuration is
.
Sodium is most likely to loose 1 electron so as to gain noble gas configuration (Stable oxidation state = +1) .
Fluorine is the element of the group 17 and period 2 which means that the valence electronic configuration is
.
Fluorine is most likely to gain 1 electron so as to gain noble gas configuration (Stable oxidation state = -1) .
Thus, 1 atom of sodium losses 1 electron to 1 atom of fluorine and the atoms of fluorine accepts this one electron to form ionic bond. This is done in order that the octet of the atoms are complete and they become stable.
Thus, the formula of sodium fluorine is
.