X-ray crystallography is a technique used to determine the atomic and molecular structure of crystals. X-rays are produced when high energy electrons strike a metal target, and the crystal causes the x-rays to diffract in specific directions. Bragg's law describes how the diffraction pattern can be used to determine the spacing of planes of atoms in the crystal. Common techniques include rotating crystal, powder, and single crystal methods. X-ray crystallography has many applications including identifying unknown compounds and determining molecular structures.