X-ray diffraction 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 x-rays that are diffracted. The diffraction pattern produced can be used to determine properties like unit cell dimensions, bond angles, and phase composition. Bragg's law describes the conditions under which x-ray diffraction occurs from crystalline materials, relating the wavelength, angle of incidence, and interplanar spacing. X-ray diffraction is widely used across many fields including physics, chemistry, materials science, and biology.