X-ray crystallography is a powerful technique used to determine the atomic and molecular structure of a crystal. By measuring the angles and intensities of X-rays that are diffracted by the crystal, scientists can produce a three-dimensional picture of the electron density within the crystal. This information is critical for understanding the spatial arrangement of atoms in a molecule.