The formula that represents an ionic compound from the options given is NaF (sodium fluoride). Ionic compounds are typically formed between metals and nonmetals, and in this case, Na (sodium) is a metal and F (fluorine) is a nonmetal.
The other compounds listed are:
- N2: a diatomic molecule (molecular compound).
- NO2: a molecular compound (nitrogen dioxide).
- CO2: a molecular compound (carbon dioxide).