Fig 1: Relationship between the (continuous) Fourier transform and the discrete Fourier transform. Left: A continuous function (top) and its Fourier transform (bottom). Center-left:Periodic summation of the original function (top). Fourier transform (bottom) is zero except at discrete points. The inverse transform is a sum of sinusoids called Fourier series. Center-right: Original function is discretized (multiplied by a Dirac comb) (top). Its Fourier transform (bottom) is a periodic summation (DTFT) of the original transform. Right: The DFT (bottom) computes discrete samples of the continuous DTFT. The inverse DFT (top) is a periodic summation of the original samples. The FFT algorithm computes one cycle of the DFT and its inverse is one cycle of the DFT inverse.Fig 2: Depiction of a Fourier transform (upper left) and its periodic summation (DTFT) in the lower left corner. The spectral sequences at (a) upper right and (b) lower right are respectively computed from (a) one cycle of the periodic summation of s(t) and (b) one cycle of the periodic summation of the s(nT) sequence. The respective formulas are (a) the Fourier seriesintegral and (b) the DFTsummation. Its similarities to the original transform, S(f), and its relative computational ease are often the motivation for computing a DFT sequence.
In mathematics, the discrete Fourier transform (DFT) converts 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.[A][1] An inverse DFT (IDFT) is a Fourier series, using the DTFT samples as coefficients of complexsinusoids 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.
Since it 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;[4] 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 Ncomplex numbers into another sequence of complex numbers, which is defined by:
Discrete Fourier transform
Eq.1
The transform is sometimes denoted by the symbol , as in or or .[B]
Eq.1 can be interpreted or derived in various ways, for example:
It can also provide uniformly spaced samples of the continuous DTFT of a finite length sequence. (§ Sampling the DTFT)
It is the cross correlation of the input sequence, , and a complex sinusoid at frequency Thus it acts like a matched filter for that frequency.
It is the discrete analog of the formula for the coefficients of a Fourier series:
Eq.1 can also be evaluated outside the domain , and that extended sequence is -periodic. Accordingly, other sequences of indices are sometimes used, such as (if is even) and (if is odd), which amounts to swapping the left and right halves of the result of the transform.[5]
The inverse transform is given by:
Inverse transform
Eq.2
Eq.2. is also -periodic (in index n). In Eq.2, each is a complex number whose polar coordinates are the amplitude and phase of a complex sinusoidal component of function (see Discrete Fourier series) The sinusoid's frequency is cycles per samples.
The normalization factor multiplying the DFT and IDFT (here 1 and ) 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 An uncommon normalization of for both the DFT and IDFT makes the transform-pair unitary.
Example
This example demonstrates how to apply the DFT to a sequence of length and the input vector
The DFT is a linear transform, i.e. if and , then for any complex numbers :
Time and frequency reversal
Reversing the time (i.e. replacing by )[D] in corresponds to reversing the frequency (i.e. by ).[6]: p.421 Mathematically, if represents the vector x then
This table shows some mathematical operations on in the time domain and the corresponding effects on its DFT in the frequency domain.
Property
Time domain
Frequency domain
Real part in time
Imaginary part in time
Real part in frequency
Imaginary part in frequency
Orthogonality
The vectors , for , form an orthogonal basis over the set of N-dimensional complex vectors:
where is the Kronecker delta. (In the last step, the summation is trivial if , where it is 1 + 1 + ⋯ = N, and otherwise is a geometric series that can be explicitly summed to obtain zero.) This orthogonality condition can be used to derive the formula for the IDFT from the definition of the DFT, and is equivalent to the unitarity property below.
These theorems are also equivalent to the unitary condition below.
Periodicity
The periodicity can be shown directly from the definition:
Similarly, it can be shown that the IDFT formula leads to a periodic extension of .
Shift theorem
Multiplying by a linear phase for some integer m corresponds to a circular shift of the output : is replaced by , where the subscript is interpreted moduloN (i.e., periodically). Similarly, a circular shift of the input corresponds to multiplying the output by a linear phase. Mathematically, if represents the vector x then
if
then
and
Circular convolution theorem and cross-correlation theorem
The convolution theorem for the discrete-time Fourier transform (DTFT) indicates that a convolution of two sequences can be obtained as the inverse transform of the product of the individual transforms. An important simplification occurs when one of sequences is N-periodic, denoted here by because is non-zero at only discrete frequencies (see DTFT § Periodic data), and therefore so is its product with the continuous function That leads to a considerable simplification of the inverse transform.
Customarily, the DFT and inverse DFT summations are taken over the domain . Defining those DFTs as and , the result is:
In practice, the sequence is usually length N or less, and is a periodic extension of an N-length -sequence, which can also be expressed as a circular function:
As seen above, the discrete Fourier transform has the fundamental property of carrying convolution into componentwise product. A natural question is whether it is the only one with this ability. It has been shown [9][10] that any linear transform that turns convolution into pointwise product is the DFT up to a permutation of coefficients. Since the number of permutations of n elements equals n!, there exist exactly n! linear and invertible maps with the same fundamental property as the DFT with respect to convolution.
This interpolation is not unique: aliasing implies that one could add N to any of the complex-sinusoid frequencies (e.g. changing to ) without changing the interpolation property, but giving different values in between the points. The choice above, however, is typical because it has two useful properties. First, it consists of sinusoids whose frequencies have the smallest possible magnitudes: the interpolation is bandlimited. Second, if the are real numbers, then is real as well.
In contrast, the most obvious trigonometric interpolation polynomial is the one in which the frequencies range from 0 to (instead of roughly to as above), similar to the inverse DFT formula. This interpolation does not minimize the slope, and is not generally real-valued for real ; its use is a common mistake.
where is the determinant function. The determinant is the product of the eigenvalues, which are always or as described below. In a real vector space, a unitary transformation can be thought of as simply a rigid rotation of the coordinate system, and all of the properties of a rigid rotation can be found in the unitary DFT.
The orthogonality of the DFT is now expressed as an orthonormality condition (which arises in many areas of mathematics as described in root of unity):
If X is defined as the unitary DFT of the vector x, then
If we view the DFT as just a coordinate transformation which simply specifies the components of a vector in a new coordinate system, then the above is just the statement that the dot product of two vectors is preserved under a unitary DFT transformation. For the special case , this implies that the length of a vector is preserved as well — this is just Plancherel theorem,
A useful property of the DFT is that the inverse DFT can be easily expressed in terms of the (forward) DFT, via several well-known "tricks". (For example, in computations, it is often convenient to only implement a fast Fourier transform corresponding to one transform direction and then to get the other transform direction from the first.)
First, we can compute the inverse DFT by reversing all but one of the inputs (Duhamel et al., 1988):
(As usual, the subscripts are interpreted moduloN; thus, for , we have .)
Second, one can also conjugate the inputs and outputs:
Third, a variant of this conjugation trick, which is sometimes preferable because it requires no modification of the data values, involves swapping real and imaginary parts (which can be done on a computer simply by modifying pointers). Define as with its real and imaginary parts swapped—that is, if then is . Equivalently, equals . Then
That is, the inverse transform is the same as the forward transform with the real and imaginary parts swapped for both input and output, up to a normalization (Duhamel et al., 1988).
The conjugation trick can also be used to define a new transform, closely related to the DFT, that is involutory—that is, which is its own inverse. In particular, is clearly its own inverse: . A closely related involutory transformation (by a factor of ) is , since the factors in cancel the 2. For real inputs , the real part of is none other than the discrete Hartley transform, which is also involutory.
Eigenvalues and eigenvectors
The eigenvalues of the DFT matrix are simple and well-known, whereas the eigenvectors are complicated, not unique, and are the subject of ongoing research. Explicit formulas are given with a significant amount of number theory.[11]
Consider the unitary form defined above for the DFT of length N, where
This can be seen from the inverse properties above: operating twice gives the original data in reverse order, so operating four times gives back the original data and is thus the identity matrix. This means that the eigenvalues satisfy the equation: