Magnetic resonance imaging (MRI) is a medical imaging technique used in radiology to form pictures of the anatomy and the physiological processes of the body. MRI scanners use strong magnetic fields, magnetic field gradients, and radio waves to generate images of the organs in the body. MRI does not involve X-rays or the use of ionizing radiation, which distinguishes it from CT or CAT scans and PET scans. Magnetic resonance imaging is a medical application of nuclear magnetic resonance (NMR). NMR can also be used for imaging in other NMR applications such as NMR spectroscopy.

While the hazards of X-rays are now well controlled in most medical contexts, an MRI scan may still be seen as a better choice than a CT scan. MRI is widely used in hospitals and clinics for medical diagnosis, staging of disease and follow-up without exposing the body to radiation. An MRI may yield different information compared with CT. There may be risks and discomfort associated with MRI scans. Compared with CT scans, MRI scans typically take longer and are louder, and they usually need the subject to enter a narrow, confining tube. In addition, people with some medical implants or other non-removable metal inside the body may be unable to undergo an MRI examination safely.

MRI was originally called NMRI (nuclear magnetic resonance imaging), but “nuclear” was dropped to avoid negative associations. Certain atomic nuclei are able to absorb and emit radio frequency energy when placed in an external magnetic field. In clinical and research MRI, hydrogen atoms are most often used to generate a detectable radio-frequency signal that is received by antennas in close proximity to the anatomy being examined. Hydrogen atoms are naturally abundant in people and other biological organisms, particularly in water and fat. For this reason, most MRI scans essentially map the location of water and fat in the body. Pulses of radio waves excite the nuclear spin energy transition, and magnetic field gradients localize the signal in space. By varying the parameters of the pulse sequence, different contrasts may be generated between tissues based on the relaxation properties of the hydrogen atoms therein.