X-ray diffraction (XRD) is an analysis technique to determine the crystal structure of crystalline materials. You do this by bombarding the material with X-rays. This is radiation with a wavelength of about 1 Angstrom (10-10 m), in the same order of magnitude as the distance between atoms in a crystal. Where a normal mirror reflects visible light, the crystal planes act as a mirror for X-rays. In most directions, these reflected rays cancel each other, but in certain directions they reinforce each other. This happens at a suitable combination of the incident angle θ under which the X-rays hit the plane, the wavelength λ of this radiation and the spacing d between adjacent lattice planes.
If you bombard a stationary crystal with X-rays from different incident angles, then there will be different crystal planes, each with their own crystal plane spacing, that successfully reflect the X-rays. A recorder measures the intensity of the reflected radiation, and this is expressed in a pattern with peaks at certain angles (2θ) or crystal plane distances. This X-ray diffraction pattern is characteristic for the crystal structure, a fingerprint indeed. For many known crystals, these patterns are available in a library, and by comparing a newly recorded diffraction pattern with the patterns in the library, you can find out which crystalline material you are dealing with.
X-ray diffraction can be carried out with single crystals, but also with polycrystalline materials that are ground into powders. Using X-ray diffraction, you can determine so much more than only the crystal structure. For a polycrystalline material, you can also say something about the crystallite size – smaller crystallites cause broader peaks – or about a possible preferred orientation of the crystallites. With a certain preferred orientation, certain crystal planes will reflect X-rays much more often than in the case of a random orientation, so that the peak associated with that crystal plane becomes larger.
X-ray diffraction also allows you to check whether a material is subjected to mechanical stress. After all, atoms in the lattice – and therefore crystal planes as well – are slightly pulled apart or squeezed together under stress. Stress can result in broader peaks as well as in peak displacement towards a larger or smaller crystal plane spacing. So X-ray diffraction is a technique to demonstrate mechanical stress in crystalline materials. In addition to e.g. polarisation to actually ‘show’ stress in transparent materials.