In mathematics, the discrete Fourier transform (DFT) is a discrete version of the Fourier transform that converts a finite sequence of numbers into another sequence of the same length, representing the amplitude and phase of different frequency components. In this way, it changes data from a description in terms of sampled values to a description in terms of oscillations. The inverse discrete Fourier transform reverses this process and recovers the original sequence. For data sampled at equally spaced points, the DFT can be understood more precisely as converting between sample values and the coefficients of a trigonometric polynomial that interpolates those values. It is therefore a basic tool for numerical work with smooth periodic functions, which can often be approximated well by trigonometric polynomials. In practice, the DFT is usually computed by efficient fast Fourier transform (FFT) algorithms.
The DFT is used in many practical applications of Fourier analysis. In digital signal processing, the input is often a sampled quantity or signal that varies over time, such as the pressure of a sound wave, a radio signal, or daily temperature readings, sampled over a finite time interval (often defined by a window function). In image processing, the samples can be the values of pixels along a row or column of a raster image. The DFT is also used to efficiently solve partial differential equations, and to perform other operations such as convolutions or multiplying large integers. Since the DFT deals with a finite amount of data, it can be implemented in computers by numerical algorithms or even dedicated hardware. These implementations usually employ efficient fast Fourier transform (FFT) algorithms; so much so that the terms "FFT" and "DFT" are often used interchangeably. Prior to its current usage, the "FFT" initialism may have also been used for the ambiguous term "finite Fourier transform".
Definition The discrete Fourier transform transforms a sequence of N complex numbers {𝐱n}:=x0,x1,…,xN−1 into another sequence of complex numbers, {𝐗k}:=X0,X1,…,XN−1, which is defined by:
The transform is sometimes denoted by the symbol ℱ, as in 𝐗=ℱ{𝐱} or ℱ(𝐱) or ℱ𝐱. As a linear transformation on a finite-dimensional vector space, the DFT expression can also be written in terms of a DFT matrix. When scaled appropriately, it becomes a unitary matrix, and the DFT can thus be viewed as a transformation from one orthonormal basis to another. The inverse transform is given by:
Eq.2 is also N-periodic (in index n). In Eq.2, each Xk is a complex number whose polar coordinates are the amplitude and phase of a complex sinusoidal component (ei2πkNn) of the function xn. (See Discrete Fourier series.) The sinusoid's frequency is k cycles per N samples. The normalization factor multiplying the DFT and inverse DFT (IDFT), here 1 and 1N, and the signs of the exponents are the most common conventions. The only actual requirements of these conventions are that the DFT and IDFT have opposite-sign exponents and that the product of their normalization factors be 1N. An uncommon normalization of 1N for both the DFT and IDFT makes the transform-pair unitary. Eq.1 can also be evaluated outside the domain k∈[0,N−1], and that extended sequence is N-periodic. Accordingly, other sequences of N indices are sometimes used, such as [−N2,N2−1] (if N is even) and [−N−12,N−12] (if N is odd), which amounts to swapping the left and right halves of the result of the transform.
DFT including sampling interval Using the standard definition of the DFT omits the sampling interval (or sampling distance) Δt in cases where the index corresponds to time via nΔt=t. To relate the DFT coefficients to the continuous Fourier transform of sampled data, the sampling interval can be included explicitly as
X~k=Δt∑n=0N−1xn⋅e−i2πkNn Most software libraries compute the unscaled DFT coefficients Xk, including their corresponding FFT implementations. The scaled coefficients can therefore be obtained as X~k=Δt⋅Xk. The corresponding inverse transform then becomes:
xn=Δf∑k=0N−1X~k⋅ei2πkNn Where Δf=1ΔtN. Using the inverse discrete Fourier transform as implemented in most software libraries, this can equivalently be written as:
xn=1ΔtIDFT(X~) When applying the DFT to physical data, the sampling interval Δt (or equivalently Δf) is an essential part of the signal definition. Including the sampling interval ensures correct amplitude, energy, and frequency interpretation, particularly when combining or comparing data from different sources.
Interpretations
The DFT can be regarded as transforming a finite sequence of equally-spaced samples of a function into a same-length sequence of equally-spaced samples of the discrete-time Fourier transform (DTFT), which is a complex-valued function of frequency. The interval at which the DTFT is sampled is the reciprocal of the duration of the input sequence. An inverse DFT (IDFT) is a Fourier series, using the DTFT samples as coefficients of complex sinusoids at the corresponding DTFT frequencies. It has the same sample-values as the original input sequence. The DFT is therefore said to be a frequency domain representation of the original input sequence. If the original sequence spans all the non-zero values of a function, its DTFT is continuous (and periodic), and the DFT provides discrete samples of one cycle. If the original sequence is one cycle of a periodic function, the DFT provides all the non-zero values of one DTFT cycle.
Eq.1 can be interpreted or derived in various ways, for example:
Example This example demonstrates how to apply the DFT to a sequence of length N=4 and the input vector 𝐱=(x0x1x2x3)=(12−i−i−1+2i). Calculating the DFT of 𝐱 using Eq.1 X0=e−i2π0⋅0/4⋅1+e−i2π0⋅1/4⋅(2−i)+e−i2π0⋅2/4⋅(−i)+e−i2π0⋅3/4⋅(−1+2i)=2X1=e−i2π1⋅0/4⋅1+e−i2π1⋅1/4⋅(2−i)+e−i2π1⋅2/4⋅(−i)+e−i2π1⋅3/4⋅(−1+2i)=−2−2iX2=e−i2π2⋅0/4⋅1+e−i2π2⋅1/4⋅(2−i)+e−i2π2⋅2/4⋅(−i)+e−i2π2⋅3/4⋅(−1+2i)=−2iX3=e−i2π3⋅0/4⋅1+e−i2π3⋅1/4⋅(2−i)+e−i2π3⋅2/4⋅(−i)+e−i2π3⋅3/4⋅(−1+2i)=4+4i results in 𝐗=(X0X1X2X3)=(2−2−2i−2i4+4i).
Properties
Linearity The DFT is a linear transform, i.e. if ℱ({xn})k=Xk and ℱ({yn})k=Yk, then for any complex numbers a,b:
ℱ({axn+byn})k=aXk+bYk
Time and frequency reversal Reversing the time (i.e. replacing n by N−n) in xn corresponds to reversing the frequency (i.e. k by N−k). Mathematically, if {xn} represents the vector x then
if ℱ({xn})k=Xk then ℱ({xN−n})k=XN−k
Conjugation in time If ℱ({xn})k=Xk then ℱ({xn∗})k=XN−k∗.
… excerpt ends here. Continue reading the full article.




