The smallest components of a compound that can exist independently and retain their properties. The atoms that make up a molecule are either bonded together covalently, as in carbon dioxide, or electrovalently, as in sodium chloride.