How Does an MRI Scan Work? From Signals to Images

An MRI scanner uses a powerful magnet and radio waves to build detailed pictures of the inside of your body, all without any radiation. The process relies on the behavior of hydrogen atoms in your tissues, which are abundant because your body is mostly water. By manipulating these atoms with magnetic fields and carefully listening to the signals they send back, the machine can distinguish between different types of tissue with remarkable precision.

Why Hydrogen Atoms Matter

Every hydrogen atom in your body has a proton at its core, and that proton spins like a tiny top. Under normal circumstances, these protons point in random directions and their magnetic effects cancel each other out. But when you slide into the bore of an MRI scanner, you enter a magnetic field tens of thousands of times stronger than Earth’s. Clinical scanners range from 0.2 to 3.0 Tesla, and research machines go even higher. Inside that field, your hydrogen protons snap into alignment, either pointing along the field or against it. Slightly more protons align with the field than against it, and that small surplus creates a faint but measurable net magnetization running through your body.

This net magnetization is the raw material the scanner works with. On its own, though, it’s invisible to the machine’s detectors. The scanner needs to disturb it first, then listen to what happens as it recovers.

The Radio Wave Nudge

Coils built into the scanner fire a precisely tuned burst of radio waves, called a radiofrequency (RF) pulse, into your body. The frequency matches the natural spinning rate of hydrogen protons in that particular magnetic field. This is a resonance effect, the same principle that lets a singer shatter a glass by hitting the right note. When the frequencies match, the protons absorb the energy.

Two things happen simultaneously. First, protons that were aligned with the main field absorb enough energy to flip against it, reducing or eliminating the net magnetization along the scanner’s axis. Second, the protons begin spinning in sync with one another, like a crowd doing a coordinated wave. This synchronized spinning generates a rotating magnetic signal in the horizontal plane that the scanner’s receiver coils can actually detect. In essence, the RF pulse converts a static, invisible alignment into a moving, detectable signal.

Relaxation: Where the Image Comes From

The moment the RF pulse switches off, the protons start returning to their original state. This recovery process is called relaxation, and it happens in two independent ways that are central to how MRI produces contrast between tissues.

The first type involves protons realigning with the main magnetic field. Different tissues recover at different speeds. Fat realigns quickly, while water-rich tissues like cerebrospinal fluid take much longer. The time constant for this recovery is called T1, and images weighted to emphasize T1 differences are especially good at showing anatomy and distinguishing fat from other structures.

The second type involves the protons falling out of sync with each other. Right after the RF pulse, they’re spinning together in lockstep. But local variations in the magnetic environment, caused by neighboring molecules and atoms, make some protons spin slightly faster and others slightly slower. They lose their coordination, and the rotating signal fades. The rate of this fading is characterized by T2. Dense, structured tissues like tendons cause rapid signal loss, while fluid loses coherence slowly. T2-weighted images excel at revealing fluid collections, inflammation, and swelling because those areas stay bright while surrounding tissue darkens.

By adjusting the timing of RF pulses and signal collection, the technologist can emphasize T1 or T2 differences, effectively highlighting different tissue properties in the same body part. This flexibility is one of MRI’s greatest strengths.

Pinpointing Location With Gradient Fields

Knowing that a signal came from somewhere in your body isn’t useful without knowing exactly where. The scanner solves this problem with three sets of gradient coils that slightly strengthen or weaken the magnetic field along the head-to-toe, left-to-right, and front-to-back directions. These gradients are switched on and off in precise sequences, and they encode spatial information in three ways.

First, a gradient active during the RF pulse ensures that only protons in a specific thin slice resonate at the pulse’s frequency. Protons above or below that slice experience a slightly different field strength, so they ignore the pulse entirely. This is called selective excitation, and it’s how the scanner chooses which cross-section of your body to image.

Within that slice, a second gradient is briefly switched on to make protons at different positions along one axis spin at slightly different speeds. Even after the gradient turns off, those protons carry a “phase stamp,” a shift in their spin cycle that encodes their position along that direction. A third gradient stays on while the signal is being recorded, causing protons at different positions along the remaining axis to emit slightly different frequencies. The scanner can then separate the signal by frequency to determine position along this final direction.

Together, these three encoding steps (slice selection, phase encoding, and frequency encoding) give every tiny cube of tissue a unique combination of frequency and phase, letting the computer know precisely where each signal originated.

Turning Signals Into Pictures

The raw data collected by the scanner doesn’t look anything like an image. It’s a complex tangle of overlapping radio signals at different frequencies and phases, stored in a mathematical holding space called k-space. Each measurement fills one line of k-space, and building a complete image requires repeating the pulse-and-listen cycle hundreds of times with slightly different gradient settings.

A mathematical operation called the Fourier transform then dismantles this complicated signal into its component frequencies and amplitudes. A two-dimensional inverse Fourier transform of the full k-space data reconstructs the image you eventually see on screen. Each pixel’s brightness reflects the strength of the signal from that location, which in turn depends on the hydrogen density and relaxation properties of the tissue there.

Contrast Agents

Some MRI exams involve an injection of a contrast agent, most commonly based on the element gadolinium. Gadolinium is strongly magnetic at the atomic level, and when it passes through blood vessels and tissues, it speeds up T1 relaxation in nearby protons. Tissues that take up the contrast agent recover their magnetization faster and appear brighter on T1-weighted images. This is particularly useful for spotting tumors, which often have leaky blood vessels that accumulate contrast, and for mapping blood flow in the brain or heart.

Why MRI Excels at Soft Tissue

X-rays and CT scans measure how well tissues block a beam of radiation, which makes them excellent for bones but limited when it comes to telling one type of soft tissue from another. MRI, by contrast, builds images based on hydrogen behavior, water content, and the molecular environment around each proton. This gives it exceptional contrast resolution for soft tissues, nerves, blood vessels, and organs. It can distinguish between gray and white matter in the brain, reveal cartilage damage in a knee, or detect small tears in a spinal disc.

Equally important, MRI uses no ionizing radiation. CT scans and X-rays expose you to small doses of radiation that, while generally low-risk, add up over a lifetime. MRI avoids this entirely, which is one reason it’s preferred for repeated imaging, pediatric scans, and brain studies.

Safety and the Magnetic Field

The MRI magnet is always on, even when no scan is running. This means anything ferromagnetic (attracted to magnets) becomes a projectile hazard or a source of injury if it enters the room. Keys, phones, scissors, and oxygen tanks have all caused serious incidents. Before every scan, staff screen patients and anyone entering the room for metallic objects, sometimes using handheld magnets to check for hidden ferromagnetic materials on the body’s surface.

Implanted medical devices require careful evaluation. Cardiac pacemakers and defibrillators were historically a strict contraindication because the magnetic field can exert force on ferromagnetic components, induce electrical currents, or cause heating. Many newer devices are designed to be MRI-compatible under specific conditions, but the make and model must be confirmed before any scan proceeds. Orthopedic hardware like joint replacements is often safe, though external fixation devices can create electrical current loops that pose a burn risk. Some intrauterine devices manufactured outside the U.S. may contain ferromagnetic materials that are not MRI-safe.

Heating is another concern. The RF pulses deposit energy into your body, and certain implants or configurations can concentrate that energy locally. If you’re awake during the scan, you can report any unusual warmth, allowing the technologist to stop. Patients under anesthesia or with impaired consciousness can’t give that feedback, so extra caution is taken in those cases.