---
title: "MRI Frequency Encoding: Turning Position into Pitch Interactive Lab | Sandbox Physics"
description: "One coil hears every spin at once. How does a field gradient tell it where each one sits?"
canonical_url: "https://sandboxphysics.com/labs/mri-frequency-encoding/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/mri-frequency-encoding/"
last_modified: "2026-10-30"
---

FR35 · MRI

# MRI Frequency Encoding: Turning Position into Pitch

**One coil hears every spin at once. How does a field gradient tell it where each one sits?** A magnetic field that grows across the scanner makes protons precess faster on one side than the other, so each position gets its own frequency. The coil still records one summed signal, but that signal is the Fourier transform of where the water is, and a Fourier sum turns it back into a profile. How finely the signal is sampled sets the field of view; how long it is sampled sets the pixel size.

Two water tubes sit in a magnetic field gradient. Each precesses at its own frequency, the coil records their sum, and a Fourier sum turns that record into a profile.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

One-dimensional model in the frame rotating at the Larmor frequency of the main field. Water tubes are uniform blocks of spins; the coil is uniformly sensitive. After an ideal 90-degree pulse a prephasing gradient and a readout gradient play, and the recorded samples are the analytic Fourier transform of the blocks with a single-exponential T2\* decay and seeded complex Gaussian noise. The image is the inverse discrete Fourier sum of those recorded samples. No chemical shift, no gradient non-linearity, no eddy currents and no body; the numbers are a teaching model, not scanner performance.

What the coil recorded

The profile computed from that record

More numbers and how they are checked

- **Time between samples**: $0$
- **Spatial-frequency step**: $0$
- **Largest spatial frequency reached**: $0$
- **Readout duration**: $0$
- **Echo time**: $0$
- **Frequency spread across the field of view**: $0$
- **Selected tube, true centre**: $0$
- **Selected tube, centre folded into the field of view**: $0$
- **Transverse signal left at the end of the readout**: $0$
- **Receiver noise relative to the total signal**: $0$
- **Image energy over sample energy (Parseval, should be 1)**: $0$

The yellow profile is computed only from the recorded samples. The dashed blue outline is the model object and never passes through the reconstruction, so their difference is the honest cost of finite sampling, decay and noise.

Physics tutorial

## Position written as frequency

**Background** After a 90-degree pulse every proton in the water tips into the transverse plane and precesses about the main field. A single receive coil around the sample picks up the sum of all of them.

**Why it matters** A sum has no address label. Without a gradient, two tubes at different places give exactly the same signal as one tube with the same amount of water. Imaging starts by making the precession frequency depend on position.

Start with the essentials

- **Focus question**: One coil hears every spin at once. How does a field gradient tell it where each one sits?
- **One-sentence intuition**: A gradient adds a field $Gx$, so a spin at $x$ runs $\bar\gamma Gx$ hertz faster than the reference. After time $t$ it has turned by $2\pi kx$ with $k=\bar\gamma Gt$. The coil signal is then the Fourier transform of the density, sampled at those values of $k$, and an inverse Fourier sum gives the profile back.

### Core mathematical model

#### Signal of the whole sample

$$
s(t)=e^{-t/T_2^{*}}\int\rho(x)\,e^{-i2\pi k(t)x}\,\mathrm{d}x,\qquad k(t)=\bar\gamma\int_0^t G(\tau)\,\mathrm{d}\tau
$$

Rotating frame, $\bar\gamma=\gamma/2\pi=42.576\,\mathrm{MHz/T}$ for protons. The minus sign follows the MIT 6.3000 handout: a positive gradient makes the phase decrease.

#### Sampling sets the field of view and the pixel

$$
\Delta k=\bar\gamma G\,\Delta t,\qquad \mathrm{FOV}=\frac{1}{\Delta k},\qquad \Delta x=\frac{\mathrm{FOV}}{N}
$$

Samples spaced by $\Delta t$ are spaced by $\Delta k$ in spatial frequency. Anything outside one field of view folds back in.

### Common difficulties

#### The gradient does not move the spins

**Typical misconception** The gradient pushes water to one side, and the coil then senses where it went.

**Better mental model** Nothing moves. The gradient only changes how fast each spin precesses, so their phases fan out in a pattern that depends on position. The coil measures how well that fan lines up with each spatial frequency.

### Run the experiment

1. 01

   #### Watch the arrows fan out

   Start with Two tubes, two pitches and watch the stage for one cycle.

   **What to observe:** During prephasing the arrows spread; at the echo they line up again and the coil arrow is longest; then they fan out the other way.

2. 02

   #### Drag a tube

   Drag the yellow-outlined tube across the gradient.

   **What to observe:** Its frequency offset changes sign at the centre, and its bump in the profile follows it until it leaves the field of view and reappears on the other side.

3. 03

   #### Halve the bandwidth

   Choose Slow sampling folds the image.

   **What to observe:** The field of view shrinks to 117 mm and the right-hand tube appears on the left, at its true position minus one field of view.

Physical conclusion

A gradient makes frequency a ruler. The spacing of the samples in time fixes the field of view, the number of samples fixes the pixel size, and the image is a Fourier sum of what the coil recorded.

## Related experiments and articles

MRI spatial encoding · Reading path

### From precessing water to k-space, undersampling and diffusion

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **How proton magnetization precesses, tips over and recovers**](https://sandboxphysics.com/stories/mri-spatial-encoding/precession-and-relaxation/)
2. [Lab **NMR Inversion Recovery Relaxometer** Read T1 from the zero crossing](https://sandboxphysics.com/labs/nmr-inversion-recovery/)
3. [Article **How a gradient turns position into frequency**](https://sandboxphysics.com/stories/mri-spatial-encoding/gradients-make-position-into-frequency/)

Quantum & fields · Starter path

## Start from a single measurement

Predict an outcome, then count what the measurements actually give. The path starts with one qubit and moves on to wave packets, bound states and two-photon interference.

[Start here → **Quantum State & Born Measurement** Predict a probability, turn the analyzer, then compare your prediction with the measured frequency over many shots. Observe · 15 min](https://sandboxphysics.com/labs/qubit-state/)

1. [1 Quantum State & Born Measurement](https://sandboxphysics.com/labs/qubit-state/)
2. [2 Stern–Gerlach Sequence](https://sandboxphysics.com/labs/stern-gerlach-sequence/)
3. [3 Wave Packet & Uncertainty](https://sandboxphysics.com/labs/wave-packet-uncertainty/)
4. [4 Quantum Harmonic Oscillator](https://sandboxphysics.com/labs/quantum-harmonic-oscillator/)
5. [5 Which Path & Quantum Eraser](https://sandboxphysics.com/labs/quantum-eraser/)
6. [6 Hong–Ou–Mandel Two-Photon Interference](https://sandboxphysics.com/labs/hong-ou-mandel/)

[View the full path →](https://sandboxphysics.com/topics/quantum/#starter-path)
