The structures observed for many inorganic solids are the result of a compromise between the conflicting requirements of chemical bonding and threedimensional geometry. The ideal chemical structure and bond geometry can be predicted using the bondvalence model which is developed in some detail. The constraints imposed on this geometry when the ideal structure is mapped into three-dimensional space require, in many cases, that ideal bond lengths be strained. Particularly in compounds containing bonds of intermediate strength (e.g. the oxides and halides of di-and trivalent cations), the relaxation of this strain can result in non-stoichiometry, stabilization of unusual oxidation states, distortion of bonding environments and lowering of symmetry. The resulting rich crystal chemistry is often associated with important physical properties such as ferroelectricity and superconductivity. Examples are given which show that these properties can, at least in some cases, be derived directly from the chemical formula by considering the problems of generating a structure that conforms to both the chemical and the spatial constraints.