# From DTFT to DFT, why do we take N samples in frequency domain

And I have read several books, the authors take N samples with DTFT to get DFT. Why N?

I think N is simply the sampling rate in time domain, right.

In frequency domain, can we choose other sampling rate to get DFT?

Thank you very much indeed.

• No,N is the number of samples i.e. the length of your discrete signal . Fs is the sampling rate . DTFT spectrum is continuous and cannot be completely represented by digital computers(because of finite memory),hence we assume frequency to be discrete . This is DFT. The frequency spectrum is divided into N parts at an interval of Fs/N between them.
– user50456
Commented Nov 29, 2015 at 13:37
• should be migrated to the signal processing site. Commented Nov 29, 2015 at 17:08
• Hi, I am sorry. I am a new comer. And could you please recommend any community about signal-processing. Or how can I move it to that place :) thanks :) Commented Dec 11, 2015 at 12:07
• Hi, "The frequency spectrum is divided into N parts at an interval of Fs/N between them". Actually, I am wondering, why it is divided into N parts. What would happen if I divide it into 3*N/4 parts. Commented Dec 11, 2015 at 12:08

As mentioned in the comments, $N$ typically represents the number of time-domain samples to be transformed.

In frequency domain, can we choose other sampling rate to get DFT?

Think about this in terms of information. I'll talk about systems where the time-domain signal is real-valued. Then in the time domain, you have $N$ real numbers. That's all the information you have about your signal.

In the frequency domain, with $N$ samples you end up with $N-1$ complex numbers and 1 real number (because the zero-frequency bin always has a real value). So some of this information is redundant, and in fact you will find there are DFT techniques that calculate only the positive frequency bins and discard the negative frequency bins to avoid storing redundant information.

If you chose to represent your frequency domain signal with $M$ values, with $M < \frac{N}{2}$, you'd be throwing away information. Your frequency domain signal wouldn't contain all the information in the time domain signal.

If you chose to represent your frequency domain signal with $M$ independent values, with $M > \frac{N}{2}$, you'd be generating and storing redundant information. Your frequency domain signal would contain more information than the time domain signal, so some of this information would have to be created by some arbitrary choice, and it wouldn't tell you anything new about your actual signal.

Note, there are some signal-processing techniques that do effectively use $M > \frac{N}{2}$. For example, if you "zero-pad" your time-domain signal before taking the DFT, you will obtain a smoothed frequency domain signal with extra (non-informative) bins between the usual bins, giving the appearance of greater frequency resolution. This can be useful for visualizing a complicated spectrum, but it doesn't actually produce any new information about the signal.

• hi, Thanks for your great help. Thanks for your great help, and it will take me a while to understand all what you said because I am a beginner. I still have a question, My comment is too long to put it into one comment. So I will split it into two. Commented Dec 1, 2015 at 4:15
• I am trying to get why we need to take N sample in the frequency-domain. Suppose, f(n) is the result of sampling of f(t), with N samples, sample duration is {\Delta}T. We take M samples "The Fourier Transform of f(t)", which is F(s) with the "\delta" function. Then the result, denoted F1(s) will be: \begin{align*} F1(s) &= \sum\limits_{k=-M/2}^{M/2} F(s)\delta(s - \frac{k}{{\Delta}TM}) \\ \end{align*} Commented Dec 1, 2015 at 4:15
• If we want to get the original f(t), we need to do the Inverse Fourier Transform with F1(s). Suppose the result is f1(t), then: \begin{align*} f1(t) &= {\Delta}TM\sum\limits_{k=-\infty}^{\infty} f(t)*\delta(t - {\Delta}TMk) \\ f1(t) &= {\Delta}TM\sum\limits_{k=-\infty}^{\infty} f(t - {\Delta}TMk) \\ \end{align*} * means the convolution of two signals. to make sure we can get f(t) from f1(t), then the \begin{align*} {\Delta}TM > {\Delta}TN \\ \end{align*} If we want to keep all information, we must make sure: M>N. Instead of N/2. Please correct me if I am wrong. Commented Dec 1, 2015 at 4:16
• If f(t) has real values, then the values of F(s) for $M/2 + 1 \le s \le M$ will be the complex conjugates of the values for $0 \le s \le M$. So, while generally (in case f(t) has complex values) we need to have M bins in the DFT, when we know f(t) has only real values, a good implementation can save half the storage by only calculating and storing M/2 values of F(s). Commented Dec 1, 2015 at 5:34
• hi, thank you for you help. I am trying to understand your reply. but in your reply: " will be the complex conjugates of the values for 0≤s≤M." Do you think it should be "0≤s≤M/2"? These two parts are mirrored. And I have another question, let us suppose, I do NOT sample in frequency-domain with sampling-frequency N; I sample with sampling-frequency less than N, let's say 3*N/4. What would happen then? According to my derivation, after IFFT, time-domain signal would overlap, am I right? I am trying to do this, using matlab. But the result is NOT intuitive. Commented Dec 11, 2015 at 12:02