When collecting X-ray diffraction data from a crystal, we measure the intensities of the diffracted waves scattered from a series of planes that we can imagine slicing through the crystal in all directions. From these intensities we derive the amplitudes of the scattered waves, but in the experiment we lose the phase information; that is, how we offset these waves when we add them together to reconstruct an image of our molecule. This is generally known as the 'phase problem'. We can only derive the phases from some knowledge of the molecular structure. In small-molecule crystallography, some basic assumptions about atomicity give rise to relationships between the amplitudes from which phase information can be extracted. In protein crystallography, these ab initio methods can only be used in the rare cases in which there are data to at least 1.2 A resolution. For the majority of cases in protein crystallography phases are derived either by using the atomic coordinates of a structurally similar protein (molecular replacement) or by finding the positions of heavy atoms that are intrinsic to the protein or that have been added (methods such as MIR, MIRAS, SIR, SIRAS, MAD, SAD or combinations of these). The pioneering work of Perutz, Kendrew, Blow, Crick and others developed the methods of isomorphous replacement: adding electron-dense atoms to the protein without disturbing the protein structure. Nowadays, methods from small-molecule crystallography can be used to find the heavy-atom substructure and the phases for the whole protein can be bootstrapped from this prior knowledge. More recently, improved X-ray sources, detectors and software have led to the routine use of anomalous scattering to obtain phase information from either incorporated selenium or intrinsic sulfurs. In the best cases, only a single set of X-ray data (SAD) is required to provide the positions of the anomalous scatters, which together with density-modification procedures can reveal the structure of the complete protein.