The restrictions imposed by both chemistry and three-dimensional space on the structures of inorganic crystals can be analysed using the bond-valence model and space-group theory. The bond-valence model is used to construct a bond graph (connectivity table) from which the multiplicities and possible site symmetries of each atom can be assigned. These are matched to Wyckoff positions of the three-dimensional space groups, selecting the matching space group with the highest possible symmetry. High-symmetry structures such as NaCl, perovskite and garnet are readily derived from the chemical formula and, with a little more effort, the same can be done for structures of intermediate symmetry such as wurtzite, corundum and rutile. For other compounds a relationship between the site symmetry and the multiplicity of an atom can severely restrict the possible structures.