Ionic compounds are formed when ions with opposite charges, typically from a metal and a nonmetal, are attracted to each other, creating an ionic bond. Some examples of common ionic compounds include: