The diffraction of X-rays by a crystal. The wavelengths of X-rays are comparable in size to the distances between atoms in most crystals, and the repeated pattern of the crystal lattice acts like a diffraction grating for X-rays. Thus, a crystal of suitable type can be used to disperse X-rays in a spectrometer. X-ray diffraction is also the basis of X-ray crystallography. See also Bragg’s law.