A chemical compound is a pure chemical substance consisting of two or more different chemical elements that can be separated into simpler substances by chemical reactions. Chemical compounds have a unique and defined chemical structure; they consist of a fixed ratio of atoms that are held together in a defined spatial arrangement by chemical bonds. Chemical compounds can be molecular compounds held together by covalent bonds, salts held together by ionic bonds, intermetallic compounds held together by metallic bonds, or complexes held together by coordinate covalent bonds. Pure chemical elements are not considered chemical compounds, even if they consist of molecules that contain only multiple atoms of a single element (such as H2, S8, etc.), which are called diatomic molecules or polyatomic molecules.
There are exceptions to the definition above, and many solid chemical materials familiar on Earth (for example many silicate minerals) do not have simple formulas in which various elements that are chemically bonded to each other stand in exact and fixed ratios. These crystalline compounds are called "non-stoichiometric compounds". They vary in composition due to either the presence of foreign elements trapped within the crystal structure or a deficit or excess of the constituent elements. Such non-stoichiometric chemical compounds form most of the crust and mantle of the Earth.
Other compounds regarded as chemically identical may have varying amounts of heavy or light isotopes of the constituent elements, which changes the ratio of elements by mass slightly.