Algorithms And Data Structures Codexery

Fast Fourier transform

Algorithm computing discrete Fourier transforms in O(n log n) time.

Fast Fourier transform

The fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) or its inverse, converting a signal between its original domain (often time or space) and a representation in the frequency domain. By factorizing the DFT matrix into sparse factors, the FFT reduces computational complexity from O(n²) to O(n log n), enabling practical analysis of long sequences. It is widely used in engineering, music, science, and mathematics, and has been described as one of the most important numerical algorithms of the 20th century.

field
Digital signal processing, numerical analysis
known_for
Fast computation of the discrete Fourier transform
complexity_reduction
From O(n²) to O(n log n)

Lore & Background

Gauss did not analyze the method's complexity and eventually used other methods. C. Danielson and Cornelius Lanczos published their version to compute DFT for x-ray crystallography, realizing one could use periodicity to double n with only slightly more than double the labor. J. Good published a paper establishing the prime-factor FFT algorithm for sizes where n = n₁n₂ with coprime factors. Tukey conceived the idea during a meeting of President Kennedy's Science Advisory Committee discussing detecting nuclear tests. Richard Garwin recognized the algorithm's general applicability and gave Tukey's idea to Cooley for implementation. As Tukey did not work at IBM, the algorithm went into the public domain, making it indispensable in digital signal processing.

Reader's Guide

The fast Fourier transform is significant because it made the discrete Fourier transform computationally practical for large sequences, reducing the number of operations from O(n²) to O(n log n). The FFT is not a new transform but an algebraic refactoring of the DFT, yielding mathematically equivalent results with infinite precision. In the presence of round-off error, many FFT algorithms are more accurate than evaluating the DFT definition directly. Its legacy includes widespread application in engineering, music, science, and mathematics. Many FFT algorithms depend on the factorization of n, but there are FFTs with O(n log n) complexity for all n, including prime values. The inverse DFT is the same as the DFT with opposite sign in the exponent and a 1/n factor, so any FFT algorithm can be adapted for it.

Did You Know?

More in Algorithms And Data Structures 1-24

Elsewhere in the Algorithms And Data Structures universe

Spotted an error? Know more?

This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record

Comments

Loading…
Open in the interactive codex →