Crystallization is an excellent purification technique for solids because a crystal slowly forming from a saturated solution tends to selectively incorporate particles of the same type into its crystal structure (a model of a crystal lattice is in Figure 3.16a). A pure crystal is often slightly lower in energy than an impure crystal (or has a higher lattice energy), as packing identical particles into a lattice allows for maximized intermolecular forces.
If an impurity is smaller than the majority of particles in a crystal lattice, there may be a "dead space" around the impurity, resulting in a region with unrealized intermolecular forces. If the impurity is larger than the other particles, it may instead disrupt intermolecular forces by forcing other particles in the lattice out of alignment.
A developing solid will tend to incorporate particles of the same type in order to create the lowest energy solid, and exclude impurities that disrupt the idealized packing of the solid. This process works best if the impurity is present as a minor component of the crude solid. When higher quantities of impurities are present, the resulting crystal tends to be heterogeneous, with pure regions of compound and pure regions of "impurity" intermixed with impure regions. This sort of heterogeneity is often seen in the crystallization of minerals (Figure 3.16b).