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