X-ray diffraction (XRD) and scattering experiments are performed at synchrotrons for the structural analysis of crystalline and amorphous materials. These measurements may be performed on powders, single crystals, or thin films. The high resolution and intensity of the synchrotron beam enables the measurement of scattering from dilute phases or the analysis of residual stress. Materials can be studied at high pressure using diamond anvil cells to simulate extreme geologic environments or to create exotic forms of matter.