X-ray diffraction is a technique used to analyze the crystal structure of materials. It works by firing X-rays at a crystalline sample. The X-rays cause the electrons in the material to oscillate, re-radiating the electromagnetic waves. These waves undergo constructive and destructive interference based on Bragg's law, which states that for diffraction to occur, the path difference between waves must equal an integer multiple of the wavelength. This produces a diffraction pattern that can be analyzed to determine information about the crystal structure such as the lattice type and parameters. Other signals produced during XRD include fluorescent X-rays and electrons ejected from the material.