Suppose, I have the following matrix which represents a grayscale image in the spatial domain,
I = 91 192 155 218
99 99 201 99
99 99 99 99
99 198 99 99
I have obtained its FFT as follows which is the frequency domain representation of the image I,
J = fft2(I);
J = 1.0e+03 *
2.0450 + 0.0000i -0.1660 - 0.0730i -0.1610 + 0.0000i -0.1660 + 0.0730i
0.2600 - 0.0030i 0.0350 + 0.1280i -0.1640 - 0.2010i -0.1630 + 0.0760i
0.0590 + 0.0000i 0.0380 + 0.1250i -0.1670 + 0.0000i 0.0380 - 0.1250i
0.2600 + 0.0030i -0.1630 - 0.0760i -0.1640 + 0.2010i 0.0350 - 0.1280i
Now, my question is,
How do these complex numbers represent frequencies?
You need to understand the one-dimensional DFT (whose implementation is with the FFT algorithm).
In the same way, if $x(n_1,n_2), n_i \in 0 \ldots N-1$ is a matrix then $x(n_1,n_2 ) = \frac{1}{N^2}\sum_{k_1,k_2=0}^{N-1} X(k_1,k_2) e^{2i \pi (n_1k_1+n_2k_2) / N}$ where $X(k_1,k_2) = \ldots$