From Academic Kids
In general, this fixed ratio must be fixed due to some sort of physical property, rather than an arbitrary man-made selection. This is why materials such as brass, the superconductor YBCO, the semiconductor aluminium gallium arsenide, or chocolate are considered mixtures or alloys rather than compounds.
A defining characteristic of a compound is that it has a chemical formula. Formulas describe the ratio of atoms in a substance, and the number of atoms in a single molecule of the substance (thus the formula for ethene is C2H4 rather than CH2). The formula does not indicate that a compound is composed of molecules; for example, sodium chloride (table salt, NaCl) is an ionic compound.
Compounds may have a number of possible phases. Most compounds can exist as solids. Molecular compounds may also exist as liquids or gases. All compounds will decompose to smaller compounds or individual atoms if heated to a certain temperature (called the decomposition temperature). Every chemical compound that has been described in literature carries a unique numerical identifier, its CAS number.