A chemical compound contains atoms of at least two chemical elements joined in a characteristic chemical structure. Molecular water has composition , while sodium chloride is an ionic solid with a one-to-one ratio of sodium and chloride ions rather than isolated NaCl molecules.
A compound differs from a mixture: separating its constituent elements generally requires a chemical transformation. A formula records composition but may not uniquely determine connectivity or stereochemistry, so different isomers can share a molecular formula.
New to topics? Read the docs here!