How MRI Actually Works: The Physics of Magnetic Resonance

How MRI Actually Works: The Physics of Magnetic Resonance

How MRI Turns Spinning Protons Into a Picture of Your Body

Lie still inside a giant tube, listen to it bang like a construction site, and a few minutes later a radiologist has a crisp slice through your knee, your brain, or your spine. No cut, no X-ray, no dye required for many scans. Understanding how MRI works means following a chain of physics that starts with the most boring particle imaginable: the single proton at the heart of a hydrogen atom.

Your body is mostly water, and water is full of hydrogen. MRI listens to those hydrogen nuclei. It nudges them with a magnetic field, tips them with a radio pulse, and records the faint radio echo they give back. The timing of that echo encodes what kind of tissue the proton sits in. That is the whole trick, stretched across some genuinely beautiful physics.

This is a curiosity piece, not medical advice. The goal is to make the machine make sense.

What this covers: the quantum-to-classical picture of proton spin, the main magnet and Larmor frequency, RF excitation, T1 and T2 relaxation, gradients and k-space, pulse sequences, and the trade-offs that decide why a scan looks the way it does and takes as long as it does.

Context and Background

MRI stands for magnetic resonance imaging, and the thing it images best is soft tissue. X-ray and CT are wonderful at bone and dense structures because they measure how much radiation each bit of tissue absorbs. Dense bone blocks X-rays; soft tissue barely does. That makes a brain or a torn ligament look like vague grey fog on a plain X-ray.

MRI takes a different measurement entirely. Instead of absorption, it measures a magnetic property of hydrogen nuclei, and that property changes dramatically between fat, muscle, cerebrospinal fluid, grey matter, and white matter. So the contrast between soft tissues is enormous. A radiologist can see the boundary between healthy and diseased tissue that would be invisible on a CT.

Concretely, that is what makes MRI the go-to tool for the brain and spinal cord, for joints and ligaments, for muscles, and for many tumours. Torn cartilage, a herniated disc pressing on a nerve, an early stroke, the subtle plaques of multiple sclerosis, all show up because they change the local water environment that MRI is so sensitive to. CT still wins for speed, for trauma, for lung detail, and for bone fractures. The two are partners, not rivals, and a good imaging plan often uses each for what it does best.

Two more things make MRI special. First, it uses no ionizing radiation. The energy involved is in the radio band, millions of times weaker per photon than an X-ray, so it does not break chemical bonds or damage DNA. That is why MRI is used so freely for children, for repeated brain scans, and for soft-tissue follow-ups. Second, it is exquisitely flexible. By changing the timing of its pulses, the same scanner can highlight water, suppress fat, map blood flow, or trace nerve fibre bundles, all without moving the patient.

The trade-off is speed and cost. MRI is slower, louder, and far more expensive than an X-ray, and the giant magnet brings its own safety rules. If you want a deeper sense of how a physical sensing chain turns a faint signal into usable data, our explainer on how LiDAR actually works walks through a similar journey from raw physics to a clean output. For a clinical overview of what MRI is used for, the US National Institute of Biomedical Imaging and Bioengineering keeps a clear public summary at NIBIB’s MRI page.

The Physics of Magnetic Resonance

MRI works by placing hydrogen protons in a strong magnetic field so they align and precess at a sharp resonant frequency, then hitting them with a radio pulse at exactly that frequency to tip their magnetization sideways. As the protons return to alignment they induce a tiny radio signal in a receiver coil, and the rate of that return encodes the tissue type.

That is the answer in one paragraph. Now let us unpack each step, because every word in it is doing real work.

Spin, the magnet, and net magnetization

A proton has a quantum property called spin. You can picture it, loosely, as a tiny spinning charge that behaves like a microscopic bar magnet with a north and south pole. The honest caveat is that spin is not literal rotation; it is an intrinsic quantum property with no everyday equivalent. But the bar-magnet picture predicts the real behaviour well enough that physicists use it constantly, so we will too.

Normally those proton magnets point in random directions, so the body has no net magnetic alignment. Slide into the scanner and that changes. The main magnet, called B0, is enormous, typically 1.5 or 3 tesla, which is tens of thousands of times stronger than Earth’s field. In that field, each proton magnet prefers to line up with B0, the way a compass needle swings to north.

The alignment is not perfect or instant. Thermal jostling keeps most protons disordered, and only a tiny excess line up with the field. Out of millions, perhaps a handful per million tip the balance. But the body holds so many hydrogen nuclei that this faint excess adds up to a real, measurable net magnetization pointing along B0. That net vector is the thing MRI manipulates. Everything that follows is about pushing it around and watching it return.

It is worth sitting with how slim that margin is. The signal that produces a brilliant brain image comes from a few protons per million that happen to favour the field over thermal chaos. That is why the magnet has to be so strong and the electronics so sensitive. A bigger field tips slightly more protons into the excess, which is one reason higher field strength buys more signal. It is also why MRI looks at hydrogen rather than other nuclei: hydrogen is abundant in water and fat, and its nucleus, a lone proton, has the strongest magnetic response of any common biological nucleus. Other nuclei, like phosphorus or sodium, can be imaged too, but the signal is far fainter and the scans far harder.

Larmor frequency and RF excitation

Here is the resonance part, the heart of nuclear magnetic resonance. A proton in a magnetic field does not just sit still pointing along it. It precesses, wobbling around the field direction like a spinning top that leans and traces a slow cone. The speed of that wobble is the Larmor frequency, and it is precisely proportional to the field strength.

For hydrogen at 1.5 tesla, the Larmor frequency is about 64 megahertz; at 3 tesla it is about 128 megahertz. Those are radio frequencies, the same band as FM broadcasting. This proportionality is the single most important fact in MRI, because it means the resonant frequency is a direct readout of field strength. Hold that thought; it returns when we discuss gradients.

To excite the protons, the scanner transmits a radio-frequency pulse tuned to exactly the Larmor frequency. Resonance does the rest. Just as a child on a swing gains height when you push in time with the swing, the protons absorb energy efficiently only when the radio pulse matches their precession rate. Off-frequency radio does almost nothing. On-frequency radio tips the whole net magnetization away from B0.

A carefully calibrated pulse, the so-called 90-degree pulse, tips the net magnetization fully into the plane perpendicular to B0. Now the net vector is precessing sideways, sweeping around like a lighthouse beam at 64 or 128 megahertz. A spinning magnet near a wire induces a current, so a receiver coil wrapped around the patient picks up a faint oscillating voltage. That induced signal is the raw material of every MRI image.

The angle of the tip matters more than it first appears. A full 90-degree pulse delivers the strongest immediate signal because it puts all the magnetization into the readable transverse plane. But a smaller flip angle leaves some magnetization along B0, ready for the next pulse much sooner, which lets fast sequences fire repeatedly without waiting for full recovery. The choice of flip angle is therefore another dial the operator uses to trade signal strength against speed. The faint voltage the coil reads, by the way, is called the free induction decay, and on its own it fades within milliseconds, which is exactly why the encoding tricks in the next section have to happen so quickly.

T1 and T2 relaxation, and where contrast comes from

The moment the radio pulse stops, the protons begin to relax back toward their happy alignment with B0. They do this through two independent processes, and the difference between them is what gives MRI its astonishing tissue contrast.

The first is T1 relaxation, also called longitudinal recovery. It describes how the net magnetization rebuilds along the B0 direction as protons dump their absorbed energy into the surrounding molecular environment, the lattice. T1 is slow in watery fluids like cerebrospinal fluid and faster in fat. Tissues that recover quickly are bright on a T1-weighted image; slow ones are dark. T1 contrast makes fat look bright and fluid look dark, which is excellent for showing anatomy.

The second is T2 relaxation, or transverse decay. Right after the pulse, all the protons precess in step, in phase, giving a strong combined signal. But each proton sits in a slightly different local magnetic environment, so they drift out of sync with each other. As they dephase, their signals start to cancel, and the transverse signal fades. T2 is long in fluids, so fluid stays bright on a T2-weighted image, which is superb for spotting oedema, inflammation, and many lesions, since disease often means extra water.

There is a third, faster cousin called T2-star, or T2. It includes not just the protons disagreeing with each other but also imperfections and inhomogeneities in the magnet itself. T2 is always shorter than T2, and it matters enormously for certain fast sequences and for techniques that detect tiny field disturbances, like functional brain imaging. The single MRI signal chain, from field to relaxation to a coil reading, is shown below.

How MRI works step by step

A useful way to feel the difference: T1 is about how fast a tissue forgets its excitement and settles back along the main field, while T2 is about how fast the protons within a tissue lose their agreement with each other. The two are physically separate. A tissue can recover quickly along B0 yet still dephase slowly, or the reverse. That independence is precisely why MRI can generate several genuinely different images of the same anatomy, each one weighting one of these clocks more heavily.

The crucial insight is that T1, T2, and proton density are properties of the tissue, not of the machine. Bone, fat, water, grey matter, and tumour each have their own values. By choosing how long to wait between pulses and when to listen, the operator decides which property dominates the picture. The physics gives a palette; the sequence chooses the colours.

From Signal to Image: Gradients and k-space

So far the scanner has one bulk signal from the whole body, with no sense of where any of it came from. The leap from a single radio echo to a spatial image is the cleverest part of MRI, and it rests on the Larmor relationship: frequency tracks field strength. If you deliberately make the field vary across space, then position becomes frequency, and frequency is something a receiver can measure.

That deliberate variation comes from gradient coils. These are extra electromagnets that add a small, smoothly sloping field on top of the uniform B0, along whichever direction the scanner chooses. Switching them on and off in rapid patterns is exactly what makes MRI bang and click so loudly. The three gradients, often labelled Gx, Gy, and Gz, do three different encoding jobs.

Slice selection, frequency, and phase encoding

Slice selection comes first. The scanner turns on a gradient along the body’s long axis, so the Larmor frequency now changes from head to foot. A radio pulse contains only a narrow band of frequencies, so it excites only the thin slab of tissue whose protons precess in that band. Everything outside the slice is left alone. Change the pulse frequency and you select a different slice, like tuning a radio to a different station to hear a different layer.

Within that slice, two more gradients pin down a location in the plane. The frequency-encoding gradient switches on while the signal is being read, so protons on one side of the slice sing at a slightly higher frequency than those on the other. A single echo therefore contains a whole spread of frequencies, one for each column, and a mathematical sieve can later separate them.

The phase-encoding gradient is the subtle one. Before reading, the scanner briefly pulses a gradient in the remaining direction. This nudges protons in different rows slightly ahead or behind in their precession, stamping each row with a distinct phase offset. One pulse only encodes one row pattern, so the whole sequence must repeat many times, each with a different phase-encoding strength, to build up the full set of measurements. This is the main reason MRI takes minutes rather than milliseconds.

Filling k-space and the Fourier transform

All those measurements land in a grid called k-space. It helps to think of k-space not as a picture but as a recipe. Each point in k-space records how much of a particular spatial wave, a stripe pattern of a given spacing and direction, is present in the image. The centre of k-space holds the broad, low-detail information, the overall brightness and shape. The edges hold the fine detail, the sharp edges and small structures.

Every repetition of the sequence, with its own phase-encoding step, fills one line of k-space. Once the grid is full, a single mathematical operation, the two-dimensional Fourier transform, converts the entire collection of waves back into an ordinary image of brightness versus position. The full spatial-encoding pipeline, from gradients to k-space to the Fourier transform, is shown here.

MRI spatial encoding from gradients to k-space to image

This is why MRI feels almost magical: the machine never measures pixels directly. It measures wave components, and the Fourier transform reassembles them into anatomy. The same idea that lets a music app split a chord into individual notes lets MRI split a body into a map of tissue. If you enjoy this style of signal reconstruction, our piece on how quantum dots actually work explores another case where careful physics turns an invisible quantum effect into a usable image-grade output.

The k-space picture also explains some everyday MRI behaviour. Because the centre holds the broad-brush contrast, modern fast scans sometimes sample the centre densely and the edges sparsely, accepting slightly softer detail in exchange for a much shorter scan. It is also why a patient moving partway through a scan corrupts the whole image rather than one corner: every line of k-space contributes to every pixel, so a single bad line spreads its error everywhere. Understanding k-space turns a long list of confusing artifacts into one simple rule, that errors in the frequency domain smear across the whole image domain.

Pulse sequences, TR, and TE

A pulse sequence is the full recipe of radio pulses and gradient switches the scanner runs to fill k-space, and the timing choices inside it decide the contrast. Two timing numbers dominate. TR, the repetition time, is the gap between successive excitation pulses. TE, the echo time, is the delay between the pulse and when the signal is read.

In a spin-echo sequence, a 90-degree pulse tips the magnetization, the protons begin to dephase, and then a 180-degree pulse flips them so they rephase and form a clean echo at time TE. The 180-degree refocusing is clever: it cancels out the fixed magnet imperfections that cause T2* decay, so spin echo measures true T2 and gives sharp, robust images. A neat analogy: imagine runners on a track who start together but drift apart because some are faster. At the halfway whistle, everyone turns around. The fast runners, now behind, sprint and catch up exactly at the finish, arriving together. The 180-degree pulse is that whistle, and the reunited echo is the runners crossing the line in step. The events of a spin-echo sequence are laid out below.

Spin echo pulse sequence timing diagram

A gradient-echo sequence skips the 180-degree refocusing and uses a gradient reversal to form the echo instead. It is faster and allows small flip angles, which is why it underpins many rapid and breath-hold scans, but it stays sensitive to T2* effects. The timing controls the weighting directly. A short TR and short TE produce a T1-weighted image. A long TR and long TE produce a T2-weighted image. A long TR with a short TE emphasises proton density. The same hardware, the same patient, three completely different pictures, all from the dial settings.

It is worth pausing on why those two timing knobs map to those two clocks. TR, the gap between excitations, controls how much longitudinal magnetization has recovered before the next pulse, so a short TR penalises slow-recovering tissues and exaggerates T1 differences. TE, the wait before reading, controls how much transverse signal has decayed, so a long TE penalises fast-dephasing tissues and exaggerates T2 differences. Keep both short and neither clock has time to separate the tissues much, so brightness simply tracks how many protons are present, which is the proton-density image. Once you see TR and TE as two stopwatches, one for recovery and one for decay, the whole zoo of weightings collapses into a single, intuitive picture.

This is also where modern speed tricks live. Techniques such as parallel imaging use multiple receiver coils to skip some phase-encoding lines and reconstruct the missing data, cutting scan time at a small cost in signal. Newer compressed-sensing methods exploit the fact that medical images are mostly smooth with a few sharp edges, so they can fill k-space from far fewer measurements than the textbook recipe demands. Both are reasons a scan that once took fifteen minutes might now finish in five, without changing any of the underlying physics we have walked through.

Trade-offs, Gotchas, and Why Scans Take So Long

MRI lives inside a tight three-way bargain between signal-to-noise ratio, spatial resolution, and scan time. You can have a brighter, cleaner signal, finer detail, or a faster scan, but improving one usually costs you another. Want smaller voxels for crisp detail? Each voxel now holds fewer protons, so the signal weakens and you must average more measurements, which takes longer. Want speed? You sacrifice either resolution or signal. This triangle, not any single setting, is why a detailed scan can run twenty minutes or more.

Field strength shifts the whole bargain. A 3-tesla magnet roughly doubles the available signal compared with 1.5 tesla, so it can deliver finer detail or faster scans. Research 7-tesla systems push further still, revealing tiny structures, but stronger fields also amplify artifacts and tissue-heating limits, so they are not simply better for every job. Higher field is a different set of trade-offs, not a free upgrade.

Artifacts are the everyday gotchas. Motion, even breathing or a swallow, smears the image because k-space assumes the patient held perfectly still across every repetition. Metal and air-tissue boundaries distort the local field and create dark or warped patches, called susceptibility artifacts. These are physics, not malfunctions, and radiologists learn to read around them.

A few other artifacts are worth recognising because their causes are now familiar. Aliasing, or wrap-around, happens when the imaged region is smaller than the body part, so tissue outside the field of view folds back onto the picture, a direct consequence of how frequencies sample into k-space. Chemical-shift artifact appears at fat-water boundaries because fat protons resonate at a slightly different Larmor frequency than water protons, so they get misplaced by a pixel or two along the frequency-encoding direction. Even the faint ghosting seen with a pulsing artery traces back to the same root cause as motion: anything that changes between repetitions corrupts the consistency that k-space assumes. Read this way, the artifact list is less a catalogue to memorise and more a set of predictable side effects of the encoding scheme.

Safety is non-negotiable and flows straight from the hardware. The main magnet is always on, even when no scan runs, so a loose oxygen tank, scissors, or wheelchair becomes a deadly projectile. Implants such as some pacemakers, clips, or cochlear devices can heat, move, or malfunction, which is why screening is strict. The radio pulses deposit energy measured as the specific absorption rate, or SAR, which is capped to prevent tissue heating. And the gradient banging is genuinely loud, often over 100 decibels, so ear protection is standard and the tight bore can trigger claustrophobia.

Each of these gotchas traces directly back to a piece of the physics we have already met, and that is the satisfying part. The projectile risk exists because B0 never switches off. The heating limit exists because the same resonant radio pulses that tip protons also dump energy into tissue. The acoustic noise exists because gradients must switch hard and fast to encode space. The susceptibility artifacts exist because metal and air distort the very field uniformity that the Larmor relationship depends on. Nothing here is an accident of bad engineering; it is the unavoid

Core MRI scanner subsystems

Figure 4: Core MRI scanner subsystems. The superconducting main magnet sets the field, gradient coils encode position, the radiofrequency chain excites and receives signal, and shim coils correct field inhomogeneity.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *