Skip to content
MRI Academy

Gradients, Slice Selection & Spatial Encoding

Turning one signal into a map of space

Core⏱ ~50 mink-Space explorer

Magnetic field gradients make Larmor frequency a function of position. We work through slice-selective excitation, frequency encoding (readout), and phase encoding, and show how the time-bandwidth product and gradient amplitude set slice thickness and field of view.

By the end you will be able to

  • 1Describe how a gradient maps spatial position onto resonant frequency
  • 2Design a slice-selective excitation from an RF bandwidth and gradient strength
  • 3Differentiate frequency and phase encoding and their roles in 2D acquisition
  • 4Relate gradient timing to field of view, resolution and the k-space trajectory

Prerequisites: Spin, Magnetization & the Larmor Equation

From One Signal to a Map of Space

A spinning sample in a perfectly uniform field B0B_0 emits a single resonance at one frequency, ω0=γB0\omega_0 = \gamma B_0. The receiver coil integrates contributions from every excited proton in the body and reports one number per instant in time. There is no information about where any of that signal came from. The entire enterprise of MR imaging is the trick of making frequency and phase depend on position, so that a measurement in time can be inverted into a measurement in space.

The instrument that accomplishes this is the gradient coil: a set of windings that superimpose a small, spatially linear field on top of B0B_0. By controlling the amplitude and timing of three orthogonal gradients, we select a slice, encode one in-plane axis by frequency, and encode the orthogonal axis by phase. This lesson derives each of those operations from the Larmor relation and shows how gradient area, not gradient amplitude alone, is the master variable that fixes field of view and resolution.

Linear Gradients and the Position-Dependent Larmor Frequency

A magnetic field gradient is a controlled spatial variation of the zz-component of the main field. We define three gradient amplitudes, Gx=Bz/xG_x = \partial B_z / \partial x, Gy=Bz/yG_y = \partial B_z / \partial y, and Gz=Bz/zG_z = \partial B_z / \partial z, collected into a vector G=(Gx,Gy,Gz)\mathbf{G} = (G_x, G_y, G_z) with units of millitesla per meter (mT/m). The total longitudinal field at position r\mathbf{r} is the base field plus the linear ramp.

Eq. 3.1
Total field under a linear gradient
B(r)=B0+Gr=B0+Gxx+Gyy+GzzB(\mathbf{r}) = B_0 + \mathbf{G} \cdot \mathbf{r} = B_0 + G_x x + G_y y + G_z z
B0B_0
static main field strength (T)
G\mathbf{G}
gradient amplitude vector (T/m)
r\mathbf{r}
position vector (m)

Because the Larmor frequency is proportional to the local field, the resonance frequency now carries spatial information. Substituting Eq. 3.1 into ω=γB\omega = \gamma B gives the foundational equation of spatial encoding.

Eq. 3.2
Position-dependent resonance frequency
ω(r)=γB(r)=γ(B0+Gr)\omega(\mathbf{r}) = \gamma\, B(\mathbf{r}) = \gamma\,(B_0 + \mathbf{G} \cdot \mathbf{r})
ω(r)\omega(\mathbf{r})
local angular Larmor frequency (rad/s)
γ\gamma
gyromagnetic ratio, 2.675 times 10 to the 8 rad per s per T for protons

Slice Selection

Selective excitation confines the flip to a thin slab. We apply a slice-select gradient (call it GzG_z for an axial slice) at the same time as a shaped radiofrequency pulse. The gradient spreads the Larmor frequency linearly along zz, so each plane resonates at its own frequency. An RF pulse contains only a finite band of frequencies, Δf\Delta f (its transmit bandwidth), so it can only tip the spins whose Larmor frequency falls inside that band.

Set the bandwidth condition equal to the gradient-induced spread across the slice. Spins from z0z_0 to z0+Δzz_0 + \Delta z span a frequency range Δf=(γ/2π)GzΔz\Delta f = (\gamma / 2\pi)\,G_z\,\Delta z. Solving for the slab thickness gives the master slice equation.

Eq. 3.3
Slice thickness from bandwidth and gradient
Δz=Δf(γ/2π)Gz=2πΔfγGz\Delta z = \frac{\Delta f}{(\gamma / 2\pi)\, G_z} = \frac{2\pi\, \Delta f}{\gamma\, G_z}
Δz\Delta z
slice thickness (m)
Δf\Delta f
RF transmit bandwidth (Hz)
GzG_z
slice-select gradient amplitude (T/m)

Two practical levers follow directly. To get a thinner slice, either narrow the RF bandwidth Δf\Delta f or increase the gradient GzG_z. To move the slice off isocenter to position z0z_0, shift the RF center frequency by Δf0=(γ/2π)Gzz0\Delta f_0 = (\gamma/2\pi)\,G_z\,z_0, with no change to the gradient. Worked example: with γ/2π=42.58\gamma/2\pi = 42.58 MHz/T, an RF bandwidth of 1000 Hz and Gz=10G_z = 10 mT/m give Δz=1000/(42.58×1060.010)=2.35×103\Delta z = 1000 / (42.58 \times 10^6 \cdot 0.010) = 2.35 \times 10^{-3} m, about 2.3 mm.

Slice Profile and the Time-Bandwidth Product

The slice profile (signal versus zz) is approximately the Fourier transform of the RF envelope. A rectangular profile would require an infinitely long sinc pulse, so real pulses are truncated sinc shapes that trade off pulse duration against profile sharpness. The governing dimensionless quantity is the time-bandwidth product TBW=τRFΔf\mathrm{TBW} = \tau_{RF}\,\Delta f, where τRF\tau_{RF} is the pulse duration. Typical excitation pulses use TBW2\mathrm{TBW} \approx 2 to 88; higher TBW gives sharper slice edges at the cost of a longer pulse and more specific absorption rate.

The Slice-Refocusing Lobe

During the second half of a symmetric RF pulse, spins across the slice accrue different phases because GzG_z is still imposing a position-dependent frequency. By the end of excitation the transverse magnetization is dephased across the slice, which would reduce the net signal. The fix is a negative gradient lobe applied immediately after, whose area is approximately half the area of the slice-select lobe (for a symmetric pulse, the effective excitation occurs near the pulse center). This refocusing lobe rewinds the through-slice phase to zero, restoring coherent signal. Forgetting it, or mis-setting its area, causes a global signal loss that is uniform across the image, an easy artifact to misread as low gain.

Frequency (Readout) Encoding

After exciting a slice we must localize signal within the slice plane. The first in-plane axis is encoded by switching on a readout gradient (say GxG_x) while the signal is being sampled. Each column of spins at position xx then precesses at its own offset frequency Δω(x)=γGxx\Delta\omega(x) = \gamma\,G_x\,x. The received signal is a superposition of these tones, and a one-dimensional Fourier transform of the digitized echo separates them, mapping each frequency back to its position xx.

Sampling sets the limits. If we acquire NxN_x complex points at dwell time Δt\Delta t (so the total readout duration is Tacq=NxΔtT_{acq} = N_x\,\Delta t), the receiver bandwidth is BW=1/Δt\mathrm{BW} = 1/\Delta t. The Nyquist theorem requires that the highest spatial frequency in the object fit within this sampling band; frequencies outside it alias (wrap around) in the image. The range of resolvable spatial positions, the field of view along the readout, follows from equating the receiver bandwidth to the frequency spread across the FOV.

Eq. 3.4
Field of view along the readout axis
FOVx=2πBWγGx=2πγGxΔt\mathrm{FOV}_x = \frac{2\pi\,\mathrm{BW}}{\gamma\,G_x} = \frac{2\pi}{\gamma\,G_x\,\Delta t}
FOVx\mathrm{FOV}_x
readout field of view (m)
BW\mathrm{BW}
total receiver bandwidth, equals 1 over dwell time (Hz)
Δt\Delta t
sampling dwell time (s)

Phase Encoding

The orthogonal in-plane axis cannot use a second simultaneous readout gradient, because a single sampled time series cannot separate two frequency axes at once. Instead we use phase encoding. Before readout, a gradient GyG_y is pulsed for a fixed duration τ\tau. While it is on, spins at position yy precess faster or slower and acquire a position-dependent phase ϕ(y)=γGyyτ\phi(y) = \gamma\,G_y\,y\,\tau. When GyG_y is switched off, that phase is frozen into the transverse magnetization and persists through the readout.

A single phase-encode step gives one phase ramp across yy, which is not enough to resolve the axis. We repeat the entire excitation-and-readout cycle many times, stepping the area of the phase-encode gradient on each repetition. Each step imposes a different spatial-frequency ramp along yy, and after NyN_y steps the orthogonal axis is fully sampled. The price is time: total scan time scales with the number of phase-encode steps, which is why phase encoding usually dominates the duration of a 2D acquisition.

Unifying the Picture: k-Space

Slice selection, frequency encoding, and phase encoding look like three different operations, but they are the same operation applied along different axes and bookkept by a single quantity: the spatial frequency k\mathbf{k}. Define k\mathbf{k} as the time integral of the gradient. Its value at any instant is set purely by the accumulated gradient area up to that moment, regardless of whether that area was delivered as a tall brief pulse or a low long one.

Eq. 3.5
k-space trajectory as gradient area
k(t)=γ2π0tG(t)dt\mathbf{k}(t) = \frac{\gamma}{2\pi} \int_0^{t} \mathbf{G}(t')\, dt'
k(t)\mathbf{k}(t)
spatial frequency coordinate (cycles per m)
G(t)\mathbf{G}(t')
instantaneous gradient vector (T/m)
γ/2π\gamma / 2\pi
gyromagnetic ratio in Hz/T, 42.58 MHz/T for protons

In this language, the received signal is the Fourier transform of the spin density ρ(r)\rho(\mathbf{r}), sampled along whatever trajectory the gradients trace: s(k)=ρ(r)ei2πkrdrs(\mathbf{k}) = \int \rho(\mathbf{r})\, e^{-i 2\pi\, \mathbf{k}\cdot\mathbf{r}}\, d\mathbf{r}. The readout gradient sweeps kxk_x continuously during sampling (one horizontal line). Each phase-encode step jumps to a different kyk_y (selects which line). The image is recovered by an inverse 2D Fourier transform of the filled k-space matrix.

From this single integral, the geometry of the image falls out as two reciprocal relationships. The extent of k-space you cover, kmaxk_{max}, sets the spatial resolution, and the spacing between k-space samples, Δk\Delta k, sets the field of view.

| Image property | k-space quantity | Relationship | | --- | --- | --- | | Field of view (FOV) | sample spacing Δk | FOV = 1 / Δk | | Pixel size (resolution) | maximum extent k(max) | Δr = 1 / (2 · k(max)) | | Readout line direction | k(x) swept during sampling | filled in one TR | | Phase-encode direction | k(y) stepped between TRs | one line per TR |

Explore: Trajectories and Sampling in k-Space

The KSpaceExplorer below lets you change how k-space is sampled and watch the reconstructed image respond. Try shrinking the sampled extent (kmaxk_{max}) to see resolution blur, then widen the sample spacing (Δk\Delta k) to provoke aliasing wrap. Note how the bright center governs overall contrast while the periphery sharpens edges.

Image (object)

Shepp–Logan phantom

k-space (raw data)

log magnitude · DC at center

Reconstruction

inverse Fourier transform

All samples — the complete image.

Putting the Numbers Together

The three operations chain into a complete 2D acquisition. Slice select with GzG_z plus a shaped RF pulse confines excitation to a slab of thickness Δz=2πΔf/(γGz)\Delta z = 2\pi\,\Delta f / (\gamma\,G_z). A phase-encode blip GyG_y sets the kyk_y line. The readout GxG_x sweeps kxk_x across one line while the receiver samples at bandwidth BW\mathrm{BW}, fixing FOVx=2πBW/(γGx)\mathrm{FOV}_x = 2\pi\,\mathrm{BW}/(\gamma\,G_x). Repeat over NyN_y phase-encode steps to fill k-space, then inverse Fourier transform. A representative worked set of parameters appears below.

| Parameter | Symbol | Representative value | | --- | --- | --- | | Field strength | B0 | 1.5 T | | Slice-select gradient | Gz | 10 mT/m | | RF bandwidth | Δf | 1000 Hz → 2.3 mm slice | | Readout gradient | Gx | 8 mT/m | | Receiver bandwidth | BW | 32 kHz → ~94 mm FOV | | Matrix | Nx × Ny | 256 × 256 | | Max gradient amplitude | G(max) | 40 mT/m typical clinical |

Imaging for this lesson

Explore the correct real MRI for this topic — yours to scroll, window and render.

A volume is a stack of slices, each frequency- and phase-encoded. Toggle the gray-matter probability map to see encoded signal become a labelled spatial map.

Brain & head

View
Colormap

Scroll to change slice · click-drag to move the crosshair · right-click-drag to window (brightness/contrast).

Check your understanding

  1. 1.An RF pulse with a transmit bandwidth of 1000 Hz is applied with a slice-select gradient. If you want to make the excited slice thinner without changing the RF pulse, what should you do?

  2. 2.Why must the entire excitation-and-readout cycle be repeated many times when phase encoding, while frequency encoding can resolve its axis in a single readout?

  3. 3.In k-space, the spacing between sampled points (delta k) and the maximum sampled extent (k-max) determine image geometry. Which pairing is correct?

  4. 4.A radiologist lowers the receiver bandwidth to improve SNR on a 1.5 T study. What is the most likely consequence?

  5. 5.Why is a negative slice-refocusing gradient lobe applied immediately after a symmetric slice-selective RF pulse?

Keep exploring

Take this topic further on these trusted, free references:

Further reading

  • [1]Nishimura DG. Principles of Magnetic Resonance Imaging. Stanford University, 2010.
  • [2]Bernstein MA, King KF, Zhou XJ. Handbook of MRI Pulse Sequences. Elsevier Academic Press, 2004.
  • [3]Haacke EM, Brown RW, Thompson MR, Venkatesan R. Magnetic Resonance Imaging: Physical Principles and Sequence Design. Wiley, 2014.
  • [4]McRobbie DW, Moore EA, Graves MJ, Prince MR. MRI from Picture to Proton. 3rd ed. Cambridge University Press, 2017.
  • [5]Lauterbur PC. Image formation by induced local interactions: examples employing nuclear magnetic resonance. Nature 1973;242:190-191.
  • [6]Bushberg JT, Seibert JA, Leidholdt EM, Boone JM. The Essential Physics of Medical Imaging. 3rd ed. Lippincott Williams & Wilkins, 2012.