Discrete Fourier transform


In mathematics, the discrete Fourier transform is a discrete version of the Fourier transform that 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, 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 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 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.
The DFT is used in the Fourier analysis of many practical applications. In digital signal processing, the function is any 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. 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 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 into another sequence of complex numbers, which is defined by:
Note: this definition omits the sampling interval, so the frequency axis becomes dimensionless and the amplitude is expressed only in relative scale. However, most software libraries, including FFT implementations, use this relative form.
The transform is sometimes denoted by the symbol, as in or or.
can be interpreted or derived in various ways, for example: can also be evaluated outside the domain, and that extended sequence is -periodic. Accordingly, other sequences of indices are sometimes used, such as and , which amounts to swapping the left and right halves of the result of the transform.
The inverse transform is given by:
. is also -periodic. In, each is a complex number whose polar coordinates are the amplitude and phase of a complex sinusoidal component of function The sinusoid's frequency is cycles per samples.
The normalization factor multiplying the DFT and IDFT 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.

DFT including sampling interval

Using the standard definition of the DFT omits the sampling interval in cases where the index corresponds to the sampling interval according to.
To express the DFT consistently with the continuous Fourier transform, including the sampling intervals, the sampling interval can be included explicitly as
Note: most software libraries don't use this form but rather use the relative form, including their corresponding FFT implementations.
The corresponding inverse transform then becomes:
where the frequency spacing is.

Example

This example demonstrates how to apply the DFT to a sequence of length and the input vector
Calculating the DFT of using
results in

Properties

Linearity

The DFT is a linear transform, i.e. if and, then for any complex numbers :

Time and frequency reversal

Reversing the time in corresponds to reversing the frequency. Mathematically, if represents the vector x then

Conjugation in time

If then.

Real and imaginary part

This table shows some mathematical operations on in the time domain and the corresponding effects on its DFT in the frequency domain.
PropertyTime 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. 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.

The Plancherel theorem and Parseval's theorem

If and are the DFTs of and respectively then Parseval's theorem states:
where the star denotes complex conjugation. The Plancherel theorem is a special case of Parseval's theorem and states:
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 modulo N. Similarly, a circular shift of the input corresponds to multiplying the output by a linear phase. Mathematically, if represents the vector x then

Circular convolution theorem and cross-correlation theorem

The convolution theorem for the discrete-time Fourier transform 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, and therefore so is its product with the continuous function That leads to a considerable simplification of the inverse transform.
where is a periodic summation of the sequence:
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:
Then the convolution can be written as:
which gives rise to the interpretation as a circular convolution of and It is often used to efficiently compute their linear convolution.
Similarly, the cross-correlation of and is given by''':'''

Uniqueness of the Discrete Fourier Transform

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 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.

Convolution theorem duality

It can also be shown that''':'''

Trigonometric interpolation polynomial

The trigonometric interpolation polynomial
where the coefficients Xk are given by the DFT of xn above, satisfies the interpolation property for.
For even N, notice that the Nyquist component is handled specially.
This interpolation is not unique: aliasing implies that one could add N to any of the complex-sinusoid frequencies 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 , 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.

The unitary DFT

Another way of looking at the DFT is to note that in the above discussion, the DFT can be expressed as the DFT matrix, a Vandermonde matrix,
introduced by Sylvester in 1867,
where is a primitive Nth root of unity.
For example, in the case when,, and
or when as in the above,, and
The inverse transform is then given by the inverse of the above matrix,
With unitary normalization constants, the DFT becomes a unitary transformation, defined by a unitary matrix:
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 :
If X is defined as the unitary DFT of the vector x, then
and the Parseval's theorem is expressed as
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 consequence of the circular convolution theorem is that the DFT matrix diagonalizes any circulant matrix.