# Why do the matrices in k-space and the final MRI image have to match?

Naturally, there is no correspondence pixel-to-pixel between Fourier space (k-space) and the final 2D image of an MRI - k-space stores the Fourier coefficients, hence each pixel in it affects the whole final image.

Further, there are tons of examples online in which cutting off part of k-space degrades the final image, but only to some extent.

Yet, in general MRI spatial encoding of the image takes place by dephasing the precessing hydrogen atoms across a selected slice as many time in each direction as the number of pixels we want to acquire in the final 2D image. I'm aware that there are methods to acquire half of k-space, for example, to save time, but I'm focusing on the math for the more general method.

So the question is why do we need to match the number of frequency and phase encoding steps (points in Fourier space) during the acquisition of the matrix of the final image?

My bet is that the answer will be an embarrassing "dah!" comment making reference to the nature of the inverse Fourier transform necessary to form the image from the signal ($$S$$):

$$S(\mathbf k) = \int \rho(\mathbf r) \, \exp(\mathrm i \,2\pi\mathbf k\cdot \mathbf r)\,\mathrm d \mathbf r$$

where $$\mathbf r$$ is a space position vector, to which a gray-scale value will be assigned, i.e. $$\rho(\mathbf r)$$; and $$\mathbf k$$ is a vector-value function of the magnetic gradient applied and time $$\mathbf k =\gamma \mathbf\nabla_{xyz} \,t,$$ dotted with each positional vector within the anatomy of the patient.

If $$\rho(\mathbf r)$$ is a $$256\times 256$$ matrix of the image, it makes perfect sense that it matches a $$256\times 256$$ matrix of Fourier coefficients in $$S(\mathbf k).$$

Under the integral sign this equation would seem to point to a closed formula, but when it comes to computation in MRI scanning, the solution is in discrete time, and we are multiplying huge matrices in FFT's (of this or this types), requiring that there is matrix-to-pixel correspondence. Although the formation of an image corresponds to the inverse of a DFT, the concept is the same, and the answer to the question lies in the sine and cosine basis functions needed, matching the number of points sampled from the RF wave, i.e. $$N,$$ dividing $$\frac{2\pi}{N},$$ as explained here and here.

... Hmm... I probably would have accepted this as an answer... Anybody can confirm or correct this explanation? If there are no comments contradicting this take, I may even post this as an answer...

So the question is why do we need to match the number of frequency and phase encoding steps (points in Fourier space) during the acquisition of the matrix of the final image?

Technically you do not need to have the same acquired and final matrix size, and very often in MRI these matrices are not the same. However, for computational efficiency the size of the matrix that is used as input to the FFT is the same as the size of the matrix for output to the FFT. So when the size of the acquired data and the final data differ there is always some zero padding or truncation done outside of the FFT itself.

For example, in the case where you are doing interpolation the acquired matrix size is smaller than the final matrix. In this case the acquired data is “padded” with zeros to make a matrix equal to the final size, that matrix is passed to the FFT, and the result is the final matrix.

As a second example, in the case where you are doing oversampling the acquired matrix size is larger than the final matrix. In this case the acquired data is passed to the FFT. The resulting matrix is larger than the desired final image matrix and so the extra portions are simply cropped off and the cropped matrix is the final size.

• Thanks, Dale! Can you take a peek at my edited OP (right below the actual framed question) - It seems as though my intuition was correct? Nov 25, 2018 at 17:03
• Yes, that seems pretty good. The use of the FFT is common for computational convenience, but it is possible to sample the MR signal in a non-Cartesian fashion (usually radial or spiral). In those cases some people will use the DFT directly or others will do a “regridding” operation and then use the standard FFT
– Dale
Nov 25, 2018 at 17:10

If you dont match the number of frequency and phase encoding steps, the spatial resolution of the image will be different in the different spatial directions associated with the frequency and phase encodings, respsectively.

• Kindly, this is not what was asked. But what you say is true. Nov 28, 2018 at 8:53
• This is the question I see: "So the question is why do we need to match the number of frequency and phase encoding steps (points in Fourier space) during the acquisition of the matrix of the final image?" Nov 29, 2018 at 9:35