= Discrete Fourier transform
{wiki}
= DFT
{c}
{synonym}
{title2}
Input: a sequence of $N$ <complex numbers> $x_k$.
Output: another sequence of $N$ <complex numbers> $X_k$ such that:
$$
x_n = \frac{1}{N} \sum_{k=0}^{N-1} X_k e^{i 2 \pi \frac{k n}{N}}
$$
Intuitively, this means that we are braking up the complex signal into $N$ <sinusoidal> frequencies:
* $X_0$: is kind of magic and ends up being a constant added to the signal because $e^{i 2 \pi \frac{k n}{N}} = e^{0} = 1$
* $X_1$: <sinusoidal> that completes one cycle over the signal. The larger the $N$, the larger the resolution of that <sinusoidal>. But it completes one cycle regardless.
* $X_2$: <sinusoidal> that completes two cycles over the signal
* ...
* $X_{N-1}$: <sinusoidal> that completes $N-1$ cycles over the signal
and is the amplitude of each sine.
We use <Zero-based numbering> in our definitions because it just makes every formula simpler.
Motivation: similar to the <Fourier transform>:
* compression: a <sine> would use N points in the time domain, but in the frequency domain just one, so we can throw the rest away. A sum of two sines, only two. So if your signal has periodicity, in general you can compress it with the transform
* noise removal: many systems add noise only at certain frequencies, which are hopefully different from the main frequencies of the actual signal. By doing the transform, we can remove those frequencies to attain a better <signal-to-noise>
In particular, the <discrete Fourier transform> is used in <signal processing> after a <analog-to-digital converter>. <Digital signal processing> historically likely grew more and more over analog processing as digital <processor (computing)>[processors] got faster and faster as it gives more flexibility in algorithm design.
Sample software implementations:
* <numpy.fft>, notably see the example: <numpy/fft.py>{file}
\Image[https://raw.githubusercontent.com/cirosantilli/media/master/home/numpy/fft_plot.svg]
{title=<DFT> of $2 \sin(t) + \cos(4t)$ with 25 points}
{description=This is a simple example of a <discrete Fourier transform> for a real input signal. It illustrates how the <DFT> takes N <complex numbers> as input, and produces N <complex numbers> as output. It also illustrates how the <discrete Fourier transform of a real signal> is symmetric around the center point.}
{disambiguate=Discrete Fourier transform}
{height=600}
Back to article page