Nuclear magnetic resonance (NMR) spectroscopy is an analytical technique that exploits the magnetic properties of atomic nuclei. It can be used to determine the structure of organic molecules and is useful in fields like chemistry, medicine, and the petroleum industry. NMR works by applying a strong magnetic field to align atomic nuclei, then applying a second radio frequency field to excite the nuclei and cause them to emit electromagnetic radiation that is detected and analyzed. The frequency of this radiation depends on the chemical environment of the nuclei.