X-ray diffraction (XRD) is a technique used to analyze the crystal structure of materials. It works by firing X-rays at a crystalline sample and measuring the angles and intensities of the diffracted rays. Bragg's law explains why certain crystal structures scatter X-rays at specific angles. There are several methods for XRD including Laue, rotating crystal, and powder methods. XRD is widely used to identify unknown materials and determine structures of molecules, crystals, and thin films. Its applications include material science, mineralogy, and structural biology. Limitations include only being able to detect about 2% of impurities in mixed samples.