Cooley-Tukey FFT algorithm Created 2026-10-14 Updated 2026-10-20
The radix-two Cooley--Tukey algorithm recursively splits a discrete Fourier transform into transforms of the even-indexed and odd-indexed samples. For a power-of-two length this evaluates the transform in arithmetic operations.
The saving comes from reusing the two shorter discrete Fourier transforms for both halves of the output, through an FFT butterfly. For , each level of the even--odd fast Fourier transform recursion needs work proportional to , and there are levels. This gives the time complexity without changing the discrete Fourier transform being computed.
James W. Cooley and John W. Tukey published An Algorithm for the Machine Calculation of Complex Fourier Series in Mathematics of Computation 19 (1965), pp. 297–301. Their original paper factors a composite length as , derives an operation count , and discusses powers of two and in-place storage. Its opening explicitly builds on earlier algorithms by I. J. Good; the 1965 paper is a landmark computational formulation, rather than the invention of the underlying Fourier analysis. Its positive-exponent convention also illustrates why a Fast Fourier transform's exponent sign must be specified.[ref]
Discrete Fourier transform Created 2026-09-24 Updated 2026-10-18
The discrete Fourier transform turns a finite list of samples into the weights of its discrete Fourier modes. The goal is to reveal a simple oscillatory recipe hidden in complicated-looking data, while retaining enough information to reconstruct every sample exactly. In signal processing, those weights identify sampled frequencies and wave phases; in numerical analysis, they simplify circular convolution and the discrete sine transform Poisson solver.
Start with eight real samples, indexed by :
Writing , the actual list is
The discrete Fourier transform recovers the recipe as
The constant contributes ; the cosine contributes ; the half-sized sine contributes and . All other coefficients vanish exactly. The imaginary coefficients carry the sine's wave phase, which a plot of absolute values alone would hide.
Figure 1.
Eight samples become a constant, a cosine pair, and a sine pair in the discrete Fourier transform
. Details.
Precisely, for a positive integer and a vector , the forward discrete Fourier transform and inverse discrete Fourier transform used here are
Thus the forward exponent has a minus sign and no scale factor; the inverse exponent has a plus sign and the factor . The coefficients in the reconstruction are , rather than . In the example, , the pair reconstructs the cosine, and the pair reconstructs the half-sized sine. These conventions agree with the scaled Fourier coefficients in MIT's authored notes.[ref]
The proof idea is orthogonality of roots of unity: for integers ,
Distinct discrete Fourier modes cancel in this finite geometric series. Substituting the forward formula into the inverse discrete Fourier transform leaves only the desired sample. The same orthogonality makes the normalized discrete Fourier modes an orthonormal basis and gives the discrete Parseval identity, in the present convention,
For the eight-sample example, direct squaring gives , while , so . This identity preserves the squared L2 norm after accounting for normalization. The existing discrete Parseval identity instead scales the forward discrete Fourier transform by , producing a unitary matrix and equal squared L2 norms without the factor .
For real input, discrete Fourier conjugate symmetry pairs positive and negative frequencies. The label is a residue modulo : when represents the same discrete Fourier mode as , since . It therefore represents negative frequency cycles per sample. If samples are seconds apart, the corresponding signed frequency is cycles per second. Similarly, index represents , while index is its own negative modulo .
The discrete Fourier transform is an invertible map between two finite vectors. The continuous Fourier transform instead describes a function on the real line by an integral over a continuous frequency variable. A finite list of samples does not determine the full continuous frequency spectrum: aliasing of discrete Fourier modes already supplies distinct waveforms with identical observations. Applying the inverse formula at arbitrary integer indices gives the periodic extension of a finite sequence, repeating the recorded block every samples. This is a property of that representation, rather than evidence that the physical signal repeats beyond the recording. Laurent Demanet's MIT notes place the discrete Fourier transform alongside the continuous Fourier transform and Fourier series to explain the role of sampling and repetition.[ref]
The beauty is that a change of basis exposes cancellation and structure without losing data. Direct evaluation needs sums of terms; a Fast Fourier transform computes the same discrete Fourier transform with far less work. Computational speed and the mathematical meaning of the coefficients are separate questions.
For on a square with homogeneous Dirichlet boundary conditions, the five-point finite difference operator on a mesh is diagonalized by . Its eigenvalues are . A two-dimensional discrete sine transform, division by these nonzero eigenvalues and the inverse transform give the solution. Odd extension realizes each one-dimensional transform by a Fast Fourier transform of length , making the total cost and storage . These finite-difference eigenvalues should not be confused with the continuous spectral eigenvalues .
Fast Fourier transform 2026-10-14
A Fast Fourier transform is an efficient algorithm for computing the discrete Fourier transform or inverse discrete Fourier transform. The discrete Fourier transform specifies the mathematical result; a Fast Fourier transform specifies how to compute it. Different Fast Fourier transform algorithms reorganize the same finite sums, with the selected sign and normalization. The Cooley-Tukey FFT algorithm is one important family of Fast Fourier transforms, using factorization of the record length.[ref]
For a power-of-two length, the radix-two Cooley-Tukey FFT algorithm has time complexity in arithmetic operations, compared with for evaluating every sum independently; these are Big O notation growth rates rather than machine timings. It returns the same eight coefficients in the example. In exact arithmetic this reorganization introduces no approximation; actual implementations still incur roundoff error.
Use the negative-exponential forward discrete Fourier transform and the -normalized inverse discrete Fourier transform:
For the circulant matrix with first column , the discrete Fourier mode is an eigenvector with eigenvalue
Indeed, substitution into circular convolution gives
The columns of are , so the diagonalization of a matrix takes the form
The roots of unity give orthogonality of these eigenvectors; dividing each by makes the basis orthonormal. Consequently, every complex circulant matrix is a normal matrix, including ones that are not Hermitian matrices.
The sign convention matters. For , the circulant matrix is
Changing the direction of the shift or the sign in the discrete Fourier transform changes which complex eigenvalue goes with which discrete Fourier mode. A real symmetric example alone would conceal that distinction.
For a linear system , put and . The equation becomes independent scalar equations
If every is nonzero, divide to find the unique vector and apply the inverse discrete Fourier transform. If some , a vector satisfying the linear system exists exactly when at every such index; the corresponding remain free. This is a concrete version of the Fredholm alternative in a finite-dimensional setting.
With an appropriate Fast Fourier transform, multiplication or a compatible solve takes arithmetic operations, instead of forming a dense matrix and applying general Gaussian elimination. The gain comes from the periodic structure; an arbitrary matrix does not have this shared basis of discrete Fourier modes.[ref]
Choose an initially transform-limited pulse with Gaussian power and complex envelope
Here is the standard deviation of the power-weighted time distribution; is its full width at half maximum. Neither is a field-amplitude width. The spectral amplitude is proportional to , so the spectral power has standard deviation . The Gaussian time-bandwidth product in ordinary frequency is , where both widths are power FWHMs.
Multiplication by preserves spectral power and energy. Substituting into the moment identity gives
This is an exact result for a Gaussian spectrum with quadratic spectral phase. It also follows by completing the square in its inverse Fourier transform.
Figure 1.
Phase cancellation recovers a Gaussian pulse, while residual phase and narrowed bandwidth limit it
. Original complex-envelope Fast Fourier transform calculations for a chosen power FWHM, pulse. The stretcher adds of group delay dispersion. Separate output cases show exact cancellation, residual GDD, residual third-order dispersion, and a Gaussian optical gain profile. The finite-gain curve divides out the central-frequency gain and retains the resulting energy change. All curves are calculations, not measured pulse traces. Details.
For these chosen inputs, . The stretched pulse has and root mean square width . Adding recovers ; leaving gives . All phase-only cases retain .
If GDD is cancelled but remains, the pulse is asymmetric. Gaussian spectral moments give
Thus the centroid is and the root mean square duration is . Converting this last value to a FWHM with the Gaussian factor would be wrong: the power envelope is no longer Gaussian. The calculation's integrated energy agrees in time and frequency through Parseval's identity, while its centroid and variance agree with these independent moment formulas.
A real amplifier also changes spectral amplitude. For a simple small-signal example, stipulate an intensity gain profile
This specifies finite gain bandwidth, with no saturation or extra amplifier phase. Multiplying two Gaussian spectra gives
For chosen , the amplified spectrum is narrower by , the shortest Gaussian power FWHM becomes , and the total energy is . Perfect spectral phase correction cannot recreate the suppressed spectral amplitude. Real gain narrowing and saturation require a material-dependent amplifier model; a constant multiplier is only a limited idealization. Gérard Mourou's 2018 lecture discusses gain narrowing as a limit on the shortest amplified pulses.[ref]
Off-axis holography 2026-10-18
Off-axis holography tilts the holographic reference wave relative to the holographic object wave. Its interference fringes acquire a carrier spatial frequency; the two cross terms occupy different spatial frequency regions when the carrier is sufficiently large compared with the object's signal bandwidth. This permits filtering a single image term.
Gabor's lecture credits Emmett Leith and Juris Upatnieks with the later skew-reference method using helium–neon laser illumination, separating reconstructed images angularly.[ref]
For an original periodic calculation, let run over a unit-length interval and choose
All spatial frequencies here are cycles per unit length; the data are a chosen field at the recording plane, not measurements or a physical object profile. Direct expansion gives
Consequently its Fourier series coefficients are at zero, at , at and at . The component lies at ; the component lies at ; the background lies at . Filtering the negative-frequency cross term and multiplying by recovers , including its relative wave phase.
Figure 1.
Original periodic off-axis holography calculation: separated cross terms and recovered complex amplitude
. Details.
The figure samples equally spaced positions with the endpoint excluded, computes a normalized discrete Fourier transform using a Fast Fourier transform, retains bins , then applies the inverse discrete Fourier transform and multiplies by . The recovered real and imaginary parts coincide with the chosen to numerical precision. This exact periodic example avoids leakage by placing every frequency on an integer bin; finite nonperiodic records need allowance for broadening and an aperture.
For a continuous object field with Fourier transform confined to , the background occupies . A carrier is a sufficient separation condition for the sideband centred at , and must remain below the Nyquist spatial frequency. Here , and the Nyquist spatial frequency is . This sufficient bound describes a whole bandwidth, rather than exploiting the gaps in this particular two-component field.
The same example also makes optical playback explicit. Choose and . Since , the bounds imply , and . The affine response is stipulated; its weak-modulation interpretation is approximate. In , the desired field has frequencies ; the conjugate term has frequencies ; the background has frequencies . Thus the same carrier that separates the recorded cross terms separates the playback components. Reillumination restores a field through diffraction; computational filtering extracts the corresponding encoded field through Fourier analysis.
For data values, define the discrete Fourier transform by
Direct evaluation costs operations. For even , split the sum into even and odd indices. If and are the length- transforms of and , then
The fact that makes the two smaller transforms reusable; gives the second output. This is the FFT butterfly. For recursively splitting until length one gives
An iterative Cooley-Tukey FFT algorithm can arrange the input in bit-reversed order and apply butterflies of lengths . The factors are the twiddle factors. Each level uses work, and in-place organization uses storage. The inverse uses the conjugate roots with the final normalization . Mixed-radix factorizations extend the same idea beyond powers of two. For a two-dimensional array, transforming rows and then columns implements the two-dimensional transform, again exploiting separability.
For a concrete Poisson application, choose in the unit square with zero Dirichlet boundary conditions. Let and use interior indices . The five-point finite difference equation is
The product sine vectors diagonalize this matrix. Their eigenvalues are
Define the two-dimensional discrete sine transform coefficients by
The sine orthogonality identity gives the inverse reconstruction. The discrete sine transform Poisson solver is therefore
All eigenvalues are positive, so there is no division by a zero mode for Dirichlet data. Nonzero prescribed boundary values are moved to the right side at neighboring interior points before transforming.
To compute the sine transform with a Fast Fourier transform, extend a one-dimensional interior vector oddly to length : set and . Its length- Fourier coefficient is . Thus ordinary FFTs compute each sine transform. Apply this along all rows and columns, divide the coefficients, and apply inverse transforms. The total cost is operations and storage for unknowns. The method solves the finite-difference linear system directly to rounding accuracy; discretization error is separate and is second order for sufficiently smooth data and solution.
Boundary conditions determine the appropriate transform. Periodic data use the ordinary two-dimensional discrete Fourier transform and eigenvalues . The constant mode then requires zero-mean forcing, and the solution mean is fixed separately. Neumann conditions similarly use an appropriate discrete cosine transform, with a compatibility condition and an undetermined additive constant. A Fourier spectral discretization would use continuous spectral eigenvalues instead of the finite-difference eigenvalues above. The speed comes from a constant-coefficient separable operator on a regular rectangle; a general irregular domain or variable-coefficient equation is not diagonalized by this simple FFT construction.
The radix-two Fast Fourier transform recursively splits the input into even and odd subsequences until length one, then assembles the transforms using the FFT butterfly identities. For , the recursive leaf order is the bit-reversed order . The three assembly stages have block sizes two, four and eight. In a block of size , butterfly number maps to .
Figure 1.
Eight-point inverse FFT with bit-reversed inputs and three butterfly stages
. Details.
The radix-two Fast Fourier transform recursively applies part (a) until it reaches one-point transforms, then combines adjacent even and odd transforms in butterfly operations. For , the decomposition tree is
followed by the reverse sequence of twiddle-factor butterfly combinations. This is the usual three-stage FFT network.
Split the generator as . One Strang splitting step is
The two potential half-steps are componentwise multiplications. The circulant matrix is diagonalized by the discrete Fourier transform; its eigenvalues are
Thus the middle step consists of a Fast Fourier transform, multiplication of Fourier coefficient by , and an inverse transform. Its cost is and every factor is unitary, so the implementation preserves the discrete norm exactly up to roundoff.
Regular timing supplies a common interval and a well-defined frequency grid for a standard discrete Fourier transform and Fast Fourier transform. It also makes sample-index lags correspond to fixed physical delays in cross-correlation, autocorrelation and digital filtering. These methods estimate frequency content and characteristic periods, separate instrument or environmental noise from signals, identify arrivals and time delays, and compare ground-motion spectra.
A uniform interval establishes a Nyquist frequency; frequencies above it alias unless filtered before acquisition. Interpolating irregular data onto a regular grid does not undo prior aliasing or fill large gaps with new measurements, and it can alter spectra and create correlated errors. Methods that directly use irregular times are possible, but the ordinary FFT and fixed-lag filter formulas cannot simply treat the original irregular observations as evenly spaced.
For consistency with the supplied wavenumbers, use an FFT grid on a periodic interval: , , and similarly for . In MATLAB, replace the endpoint-inclusive coordinate definitions by x = (0:nx-1)*Lx/nx; and y = (0:ny-1)*Ly/ny;. The supplied linspace arrays instead have spacing while the Fourier multipliers assume . Including both copies of the periodic endpoint creates a grid inconsistency, separate from high-frequency aliasing.
The line references below use the original listing's line numbers.
For this linear homogeneous problem, the exponential update is exact for the retained modes, apart from roundoff error. It is not a forward Euler method step and does not require the explicit finite-difference diffusion stability restriction. Sampling, periodic modelling and spatial resolution still matter.