Atoms form ions through gaining or losing electrons to achieve stable electron configurations. Oppositely charged ions attract and bond ionically, forming ionic compounds. Ionic compounds are named by listing the metal first followed by the nonmetal with an "-ide" ending. Transition metals require indicating their ionic state with Roman numerals. Polyatomic ions, like sulfate and nitrate, are also present in ionic compounds and identified by non-"-ide" endings. Covalent compounds form between nonmetals which share electrons in a covalent bond.