How MRI Machines Work: Magnetic Resonance, Radio Waves, and Medical Imaging
Explore the physics behind Magnetic Resonance Imaging — from nuclear spin and powerful superconducting magnets to gradient coils, radiofrequency pulses, and how a computer reconstructs slice-by-slice images of soft tissue.
The Discovery That Made MRI Possible
Magnetic Resonance Imaging traces its scientific roots to the phenomenon of nuclear magnetic resonance (NMR), first demonstrated independently by Felix Bloch and Edward Purcell in 1946 — work for which they shared the Nobel Prize in Physics in 1952. NMR showed that atomic nuclei placed in a magnetic field absorb and re-emit radio-frequency energy at characteristic frequencies determined by their type and local chemical environment. For decades NMR remained a chemistry laboratory technique used to identify molecular structures.
The leap from chemistry bench to hospital scanner came in 1973 when Paul Lauterbur published a paper showing that by applying magnetic field gradients — fields that vary in strength across space — one could spatially encode NMR signals and reconstruct two-dimensional images. Raymond Damadian had earlier shown that tumors emit different NMR signals than healthy tissue, suggesting diagnostic potential. Together, these insights launched the era of MRI. Lauterbur and Sir Peter Mansfield shared the Nobel Prize in Physiology or Medicine in 2003 for their contributions to the technique.
What makes MRI so clinically powerful is what it images: hydrogen nuclei (protons) in water and fat molecules, which are enormously abundant in the human body. Unlike X-rays or CT scans, MRI uses no ionizing radiation, making it safe for repeated use. It produces exquisite soft-tissue contrast — distinguishing white matter from gray matter in the brain, cartilage from bone, and active tumor from surrounding healthy tissue — in ways that CT simply cannot match.
Nuclear Spin: The Physics Foundation
At the heart of MRI is the quantum mechanical property called spin. Protons — and many other atomic nuclei — behave like tiny bar magnets because they possess angular momentum, or spin. When placed in an external magnetic field, these microscopic magnets do not simply align with the field like a compass needle; instead they precess around the field direction, much like a spinning top wobbling around the direction of gravity. The frequency of this precession is called the Larmor frequency and is proportional to the strength of the external magnetic field.
For hydrogen protons in a 1.5-Tesla MRI scanner, the Larmor frequency is approximately 63.9 MHz — in the radiofrequency range. In a 3-Tesla scanner it doubles to about 127.8 MHz. This is crucial because it means MRI can exploit the same part of the electromagnetic spectrum used by FM radio, but the body's protons are far more selective: they only absorb and re-emit energy at precisely their Larmor frequency.
In a strong magnetic field, slightly more protons align parallel to the field than antiparallel — the energy difference between these two states is tiny, so the population difference is small, but in a macroscopic sample containing roughly 10²³ protons, the net effect is a measurable bulk magnetization pointing along the field direction. It is this bulk magnetization that MRI manipulates and measures.
The Superconducting Magnet and Its Field
A clinical MRI scanner's most expensive and imposing component is its main magnet, which must produce a field of extraordinary uniformity and stability. Standard clinical scanners operate at 1.5 or 3 Tesla — compare this to Earth's magnetic field of about 0.00005 Tesla, which means a 3T scanner is roughly 60,000 times stronger. Research scanners push to 7 Tesla and beyond, while specialized ultra-high-field machines reach 11.7 Tesla.
Achieving fields this strong requires superconducting electromagnets. The magnet coils are wound from niobium-titanium alloy wire, which becomes a perfect electrical conductor with zero resistance when cooled below its critical temperature of about 9.2 Kelvin (−263.8°C). The coils are immersed in liquid helium at 4.2 Kelvin within a vacuum-insulated cryostat — essentially a giant thermos — that keeps helium consumption manageable. Once energized, a superconducting magnet sustains its current indefinitely without any power input, making long-term operation economical despite the enormous initial field strength.
Field homogeneity is equally critical. Spatial variation in the main field across the imaging volume must be held to a few parts per million. To achieve this, scanner manufacturers use passive shimming — carefully placed iron pieces — and active shimming coils that generate small corrective fields. Even small inhomogeneities cause image distortion and signal loss, so shimming is performed both at the factory and, in some systems, dynamically during each patient scan.
Gradient Coils and Spatial Encoding
The main magnet provides a uniform field, but to produce an image rather than a single bulk signal, the scanner must determine where in the body each NMR signal originated. This spatial encoding is the job of three sets of gradient coils — one for each spatial direction (x, y, z) — that superimpose small, linearly varying magnetic fields on top of the main field.
When a gradient field is applied along the z-axis (typically the patient's head-to-foot direction), the Larmor frequency varies linearly along that axis. A radiofrequency pulse tuned to a narrow band of frequencies then excites only the protons in a thin slice of tissue where the local field produces that exact Larmor frequency. This is slice selection. By changing the gradient strength or the RF frequency, the scanner can step through different slices one by one.
Within the selected slice, two more gradients encode position in the remaining two dimensions. The frequency-encoding gradient, applied while the signal is being collected, causes protons at different positions across the slice to precess at slightly different frequencies; a Fourier transform of the received signal separates contributions from each column of tissue. The phase-encoding gradient is switched on briefly before signal collection; it imparts different phase offsets to protons at different positions along the third axis. By repeating the sequence with many different phase-encoding gradient strengths, the scanner accumulates a grid of data in what physicists call k-space, which is then transformed by a two-dimensional fast Fourier transform to produce the final image.
Pulse Sequences and Image Contrast
The beauty of MRI is that image contrast — which tissues appear bright or dark — can be tuned by adjusting the timing parameters of the radiofrequency pulses. The two most important parameters are TR (repetition time) and TE (echo time). Different tissues have characteristic relaxation times: T1, describing how quickly protons realign with the main field after being tipped by an RF pulse, and T2, describing how quickly the coherent precession of protons loses synchrony due to local field variations.
A T1-weighted scan uses a short TR and short TE, making fatty tissue bright and water dark — useful for showing anatomy clearly and for assessing gadolinium contrast enhancement in tumors. A T2-weighted scan uses a long TR and long TE, making fluid-filled structures such as cerebrospinal fluid or edematous tissue very bright — ideal for detecting pathology because inflammation, infection, and many tumors contain excess water. Fluid-Attenuated Inversion Recovery (FLAIR) sequences suppress the signal from free water while preserving signal from water bound in lesions, making subtle brain lesions far more conspicuous than on standard T2 images.
Beyond these basics, specialized pulse sequences have expanded MRI's reach enormously. Diffusion-weighted imaging (DWI) measures the random Brownian motion of water molecules; in acute stroke, cell swelling restricts diffusion, producing a bright signal that appears within minutes of symptom onset. Functional MRI (fMRI) detects subtle changes in blood oxygenation associated with neural activity, enabling researchers to map brain function non-invasively. Magnetic resonance angiography (MRA) images blood vessels without catheterization. Spectroscopy sequences measure concentrations of specific metabolites in tissue, aiding tumor characterization.
Safety, Artifacts, and Future Directions
Despite its lack of ionizing radiation, MRI carries its own safety considerations. The powerful magnetic field will forcibly attract ferromagnetic objects — a phenomenon that has caused projectile injuries when metal items have been brought into the scanner room. All implanted devices must be verified as MRI-compatible before scanning. Patients with certain pacemakers, cochlear implants, or aneurysm clips may be contraindicated. The rapidly switching gradient coils induce currents in the body and generate the characteristic loud knocking noise that patients experience; acoustic noise levels can exceed 100 decibels, requiring hearing protection.
Image artifacts present ongoing engineering challenges. Metal implants distort the local magnetic field, creating signal voids or bright halos in nearby tissue. Patient motion during the typically lengthy acquisition (a complete brain MRI may take 30 to 60 minutes) blurs images. Parallel imaging techniques acquire data from multiple receiver coil elements simultaneously, dramatically reducing scan time. Compressed sensing exploits the mathematical sparsity of medical images to reconstruct complete images from significantly undersampled k-space data, further shortening scans.
The frontier of MRI development points toward higher field strengths — 7T scanners are now approved for clinical use in many countries and reveal brain microstructure previously invisible — and toward artificial intelligence-driven reconstruction that can produce high-quality images from far less data than traditional methods require. Quantitative MRI, which maps tissue parameters like T1 and T2 numerically rather than producing weighted images, promises to make MRI findings more reproducible across sites and scanners. As hardware, pulse sequence design, and reconstruction algorithms continue to advance, MRI will remain the most versatile and information-rich modality in the clinical imaging arsenal.
Related Articles
how things work
How 3D Printers Work: FDM, SLA, and Why They're Changing Manufacturing
Understand the technology behind 3D printing, including FDM and SLA processes, the materials used, and how additive manufacturing is transforming industries worldwide.
10 min read
how things work
How Air Conditioning Reshaped Modern Civilization
Willis Carrier's 1902 invention for a printing plant became the technology that enabled Sun Belt migration, transformed architecture, and now consumes 10% of global electricity.
9 min read
how things work
How Airplane Wings Generate Lift: The Physics of Flight
Lift is the upward force that keeps aircraft airborne, and its real explanation is more nuanced than the popular Bernoulli story. This article explains how wings actually work using correct aerodynamics.
9 min read
how things work
How Batteries Work: Chemistry, Types, and Applications
Understand the chemistry behind batteries, how they store and release electrical energy, the major battery types, and their applications in modern technology.
8 min read