# Discrete Fourier Transform frequency domain

If we have a function $$f(t)$$ for $$t = a, a + \triangle t, ..., b=a+n \triangle t$$. And then I use the discrete Fourier transform on $$f(t)$$. Then what is the frequency domain of the result?

For example in Python module Numpy, the DFT only gives you the amplitude of the frequencies (list of amplitudes). But it does not say which amplitude is for which frequency.

Specifically for Python, you obtain the frequencies of the DFT by using numpy.fft.fftfreq(n,d) where n is the sample size and d is the sample spacing $$\Delta t$$, that is, the intervals at which you sample a signal: $$t=\{0,\Delta t,2\Delta t,...,(N-1)\Delta t\}$$. The frequency spacing will be $$1/(N\Delta t)$$. Indeed

$$\hat{x}_{\frac{n}{N\Delta t}}=\sum_{k=0}^{N-1}x_{k \Delta t} e^{-2\pi i(k\Delta t)(\frac{n}{N\Delta t })}=\sum_{k=0}^{N-1}x_{k \Delta t} e^{-2\pi i\frac{kn}{N}}$$

which is the DFT of the signal.

Reference here.

• I think I may have tried that before. And the solution to the wave equation using Fourier transform (DFT) does not give the correct result. Jul 28, 2021 at 6:44
• @Arief I get that. You should post a question specifically about that issue with the PDE Jul 28, 2021 at 6:58

The frequencies are the harmonics of your sampling frequency, numbered in order.

You're not doing merely a discrete fourier transform, but a digital fourier transform, because your input is of finite length (and thus assumed to be periodic). Thus, both your domain and codomain are finite (periodic) and discrete.