# Difference between the DTFT and DFT [duplicate]

I know this question has been asked before. It is, however, so confusing, that I'd like to give this another try: I have come across the following 2 definitions of the DTFT:

So, the first line is the definition given in my lecture. The second line was given in a tutorial on the difference between DTFT and DFT. The first, obvious difference is the limit of the sum. While the first goes from -infinity to +infinity, the second treats a finite signal. I think DTFT are applied to infinite signals. Now, ,the second difference appears in the exponential function. In the second line, we are using small omega (2*pi*f) multiplied with n, which should be the sample index. In the first line we are using 2*pi*f divided by fs. I think the signal's highest frequency component divided by fs gives the number of samples. So... no, I still don't see the link to n. Can somebody please help me understand this? Although this question appears a lot in this forum?

## marked as duplicate by Marcus Müller, MBaz, Matt L., lennon310, Peter K.♦Jan 14 at 15:45

• Note: Sampling of DTFT $X(e^{j \omega})$ into DFT $X[k]$ is only valid for finite length sequences. As the DTFT can also be defined for infinite length sequences such as $x[n]=a^n u[n] \longleftrightarrow X(e^{j\omega}) = \frac{1}{1-a e^{-j \omega}}$, sampling of the DTFT $X(e^{j\omega})$ is not a valid DFT now. @MBaz – Fat32 Jan 12 at 23:21