How MRI Works — Nuclear Magnetic Resonance and Medical Imaging
Every year, over 100 million MRI scans are performed worldwide — producing detailed 3-D images of soft tissue without a single X-ray photon. The machine exploits a curious quantum-mechanical property of atomic nuclei: their spin. This article traces the physics from a proton's magnetic moment all the way to the image on a radiologist's screen.
1. Proton Spin and Magnetic Moments
Every proton (hydrogen nucleus) has an intrinsic angular momentum called spin. Although spin is a quantum property with no classical analogue, it behaves macroscopically like a tiny bar magnet: each proton carries a magnetic moment μ aligned along its spin axis.
The human body is ~60% water (H₂O), making hydrogen by far the most abundant NMR-active nucleus. Clinical MRI therefore primarily images proton density and tissue relaxation properties.
2. Alignment in a Strong Static Field (B₀)
Outside a magnetic field proton spins point in random directions and cancel out. Inside the bore of an MRI scanner, a superconducting magnet generates a powerful static field B₀ (typically 1.5 T or 3 T — up to 50,000 times Earth's field).
Quantum mechanics allows only two energy states for a spin-½ nucleus in field B₀:
The net magnetization M₀ is what the scanner ultimately measures. It is proportional to field strength B₀ — one reason why a 3 T scanner produces sharper images than a 1.5 T scanner.
3. The RF Pulse and Larmor Resonance
To produce a detectable signal, the scanner tips the net magnetization M₀ away from the B₀ axis using a brief radiofrequency (RF) pulse. The key is resonance: the pulse frequency must exactly match the Larmor frequency ω₀.
A 90° pulse tips M₀ entirely into the transverse (x-y) plane. The magnetization then precesses around B₀ at ω₀, sweeping past the receive coil and inducing a sinusoidal voltage — the Free Induction Decay (FID) signal.
dMx/dt = γ(My·Bz − Mz·By) − Mx/T2
dMy/dt = γ(Mz·Bx − Mx·Bz) − My/T2
dMz/dt = γ(Mx·By − My·Bx) − (Mz − M₀)/T1
4. T1 and T2 Relaxation — Where Contrast Comes From
After the RF pulse is switched off, the magnetization returns to equilibrium through two independent processes. These characteristic time constants are the primary source of tissue contrast in MRI.
Longitudinal (T1) Relaxation — Spin-Lattice
The z-component of magnetization (Mz) recovers exponentially back to M₀ as spins release energy to the surrounding molecular lattice:
T1 depends on how efficiently molecules tumble at the Larmor frequency. Lipids tumble at just the right rate, giving fat a short T1 (fast recovery, appears bright on T1-weighted images).
Transverse (T2) Relaxation — Spin-Spin
The transverse magnetization (Mxy) decays as individual spins dephase due to tiny local field variations from neighboring nuclei:
T2 is always ≤ T1. Free water has long T1 and T2 (slow tumbling, poor energy transfer); bound water in tissue has short T2. Tumors and edema often appear hyperintense on T2-weighted images because pathological processes increase tissue water content.
Pulse Sequences Control Contrast
By choosing TR (repetition time) and TE (echo time) the radiologist suppresses or emphasises T1 and T2 contributions:
- T1-weighted: short TR (~500 ms), short TE (~15 ms) — fat bright, water dark, anatomy
- T2-weighted: long TR (~4000 ms), long TE (~90 ms) — water bright, pathology visible
- Proton density: long TR, short TE — removes both T1 and T2 weighting
- FLAIR: T2-weighted with CSF suppressed — MS plaques visible near ventricles
5. Gradient Coils and Spatial Encoding
After the RF pulse, all protons produce signal at the same Larmor frequency — the scanner cannot yet tell where the signal came from. Three sets of gradient coils (Gx, Gy, Gz) add small, linear variations to B₀ that encode spatial position into frequency and phase.
Slice Selection
A Gz gradient is applied during the RF pulse, making B₀ vary along z. Only the slice where the local field matches the pulse frequency is excited:
Frequency Encoding
During signal readout, a Gx gradient is applied. Protons at different x positions precess at different frequencies; the received signal is a superposition of sinusoids:
Phase Encoding
A Gy gradient is applied for a brief period before readout. This imparts a phase shift proportional to y position — encoding the second spatial dimension. The entire sequence is repeated with different Gy amplitudes to fill a 2-D k-space matrix.
6. k-Space and the 2-D Fourier Transform
The raw data collected by the scanner is stored in a 2-D matrix called k-space. Each point [kx, ky] represents a specific spatial frequency of the image:
The center of k-space (low kx, ky) contains low spatial frequencies — overall brightness and contrast. The periphery contains high spatial frequencies — edges and fine detail. This is why partial k-space acquisitions (sampling only the center) are faster but blurrier.
// Simplified k-space → image reconstruction
function reconstructMRI(kSpaceData) {
// kSpaceData: 2-D complex array [Nky][Nkx]
const N = kSpaceData.length;
// Step 1: 2-D inverse FFT (row-by-row, then column-by-column)
const temp = kSpaceData.map(row => ifft1D(row)); // IFFT each row
const image = transposeAndIFFT(temp); // IFFT each column
// Step 2: magnitude image (discard phase)
return image.map(row =>
row.map(c => Math.sqrt(c.re**2 + c.im**2))
);
}
// k-space properties exploited in fast sequences:
// Partial Fourier: acquire 60% of k-space, zero-fill rest (homodyne)
// Parallel imaging (GRAPPA/SENSE): undersample with multi-channel coil
// Compressed sensing: incoherent undersampling + sparse reconstruction
7. Contrast Mechanisms and Common Sequences
Gadolinium Contrast Agents
Gadolinium (Gd³⁺) is strongly paramagnetic — it dramatically shortens T1 of nearby protons. Injected intravenously, Gd accumulates where the blood-brain barrier is disrupted (active tumors, inflammation), creating bright spots on T1-weighted images.
fMRI — Blood Oxygen Level Dependent (BOLD)
Deoxy-hemoglobin is paramagnetic and shortens T2*; oxy-hemoglobin is diamagnetic and does not. Active brain regions have higher blood oxygenation → longer T2* → brighter signal on gradient-echo sequences. This BOLD contrast is the basis of functional MRI — mapping brain activity without radioactive tracers.
Diffusion Tensor Imaging (DTI)
By applying strong gradient pulses in multiple directions, DTI measures how water molecules diffuse through tissue. In white matter axon bundles, diffusion is anisotropic — faster along the axon than across it. DTI reveals neural fiber tracts and detects early axonal damage in stroke and MS.
MR Spectroscopy (MRS)
Without spatial gradients, the NMR spectrum reveals the chemical signature of metabolites. NAA (N-acetyl-aspartate) is a neuronal marker; its reduction signals neuronal loss. Choline rise indicates membrane turnover (tumors). Lactate appears in anaerobic metabolism (ischemia).
8. Safety, Field Strengths, and the Limits of MRI
Why MRI Is Safe (for most patients)
Unlike CT or PET, MRI uses no ionizing radiation. The RF energy deposited (SAR — Specific Absorption Rate) is limited to 4 W/kg by safety guidelines. The main hazards are:
- Projectile effect: ferromagnetic objects (scissors, implants) accelerate toward the bore — the field exerts megawatts of force at 1.5 T.
- Implant heating: metallic implants can heat due to induced eddy currents — MR-conditional labeling is required.
- Acoustic noise: Lorentz forces on gradient coils produce loud clicking — up to 130 dB — requiring hearing protection.
- Claustrophobia: solved by open-bore and wide-bore (70 cm) designs.
Field Strength Trends
- 0.5–1.0 T (open MRI): lower SNR but accessible for anxiety and obese patients.
- 1.5 T: gold standard for clinical imaging since 1985.
- 3 T: doubles SNR vs 1.5 T; standard for neuro and cardiac research.
- 7 T: FDA-cleared since 2017; sub-millimeter cortical layer imaging, metabolite mapping.
- 11.7 T (Iseult, CEA): largest whole-body magnet as of 2024, first human images published March 2024.