Adding or removing a single atom can turn a molecule into a molecule of a different substance, just as adding or removing a single ingredient can change the nature of a recipe. In both cases, the combination of atoms or ingredients determines the characteristics of the final product, such as its chemical or physical properties, taste, or texture.
Just as a recipe specifies the quantities and types of ingredients that should be combined to produce a desired dish, the chemical formula of a molecule specifies the quantities and types of atoms that should be combined to produce a particular molecule. For example, the chemical formula for water, H2O, indicates that two hydrogen atoms should be combined with one oxygen atom to produce a molecule of water.
In the same way that a chef must carefully measure and mix the ingredients in a recipe to produce the desired outcome, a chemist must carefully control the quantities and types of atoms that are combined to produce a particular molecule. Changing the quantities or types of atoms in a molecule, or the quantities or types of ingredients in a recipe, can alter the properties of the final product.
Overall, combining atoms to form a molecule is similar to mixing ingredients for a recipe in that both processes involve the careful combination of specific quantities and types of components to produce a desired outcome.