A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Fast Fourier Transform and Polynomial Multiplication

Research Depth 92 in the knowledge graph ☐ I know this ☆ Set as goal
512prerequisites beneath it
See this on the map →
Complex Numbers IntroductionDivide and Conquer+2 more→
fast-fourier-transform fft discrete-fourier-transform polynomial-multiplication convolution schonhage-strassen

Core Idea

The Fast Fourier Transform (FFT) computes the Discrete Fourier Transform (DFT) of a sequence of n values in O(n log n) time, down from the naive O(n2). Its primary algorithmic application is O(n log n) polynomial multiplication: evaluate two degree-n polynomials at the n-th roots of unity (via FFT), multiply the values pointwise in O(n), then interpolate back (via inverse FFT). The Cooley-Tukey algorithm achieves this through a divide-and-conquer decomposition that splits even- and odd-indexed coefficients, exploiting the symmetry properties of roots of unity (the "butterfly" structure). The FFT is the foundation for Schonhage-Strassen integer multiplication (O(n log n log log n)) and has applications throughout signal processing, string matching, and computational algebra. It is frequently cited as one of the ten most important algorithms of the 20th century.

Explainer

The Fast Fourier Transform is one of the most consequential algorithms in all of computer science and applied mathematics. Its core contribution is reducing the Discrete Fourier Transform (DFT) — a linear transformation that converts between the coefficient representation and the frequency representation of a sequence — from O(n2) to O(n log n). This speedup has had immense practical impact in signal processing, image compression, telecommunications, and scientific computing, but its role in algorithm design centers on polynomial multiplication: the FFT makes it possible to multiply two polynomials of degree n in O(n log n) time, a fundamental operation with consequences throughout theoretical computer science.

The algorithm exploits the algebraic structure of roots of unity. Let omega = e2*pi*i/n be a primitive n-th root of unity. The DFT evaluates a polynomial A(x) = a_0 + a_1*x + ... + a_{n-1}*xn-1 at the points 1, omega, omega2, ..., omegan-1. The Cooley-Tukey FFT splits A into even-indexed and odd-indexed coefficients: A(x) = A_even(x2) + x*A_odd(x2). The magic is that evaluating A_even and A_odd at the squares of the n-th roots of unity is exactly evaluating them at the (n/2)-th roots of unity — because squaring the n-th roots collapses them to the (n/2)-th roots. This gives a perfect divide-and-conquer: two recursive FFTs of size n/2, plus O(n) "butterfly" operations to combine. The recurrence T(n) = 2T(n/2) + O(n) gives T(n) = O(n log n).

Polynomial multiplication follows a three-step pipeline. To multiply A(x) and B(x), both of degree n: (1) evaluate A and B at 2n roots of unity using two FFTs (O(n log n) each), (2) multiply the values pointwise to get the values of C = AB at the 2n roots of unity (O(n)), (3) apply the inverse FFT to recover the coefficients of C (O(n log n)). The correctness relies on the fundamental fact that a polynomial of degree d is uniquely determined by its values at d+1 points, and that pointwise multiplication of values corresponds to polynomial multiplication. The total cost is O(n log n), an exponential improvement over the O(n2) of naive coefficient-by-coefficient convolution.

The connection to integer multiplication runs through the observation that multiplying two n-bit integers is essentially multiplying two polynomials (with base-B "coefficients") followed by carry propagation. The Schonhage-Strassen algorithm (1971) made this practical by performing the FFT over the ring Z/(2m + 1)Z rather than over the complex numbers. In this ring, 2 is a root of unity of order 2m, so all arithmetic is exact (no floating-point roundoff) and each operation takes O(m) bit operations. The recursive structure (use the FFT to multiply large integers, but the FFT itself requires integer multiplications for the butterfly operations) is handled by recursing until the integers are small enough for schoolbook multiplication. The resulting O(n log n log log n) complexity was the best known for 36 years, until Furer improved the log log n factor in 2007, and Harvey and van der Hoeven achieved the conjectured optimal O(n log n) in 2021.

Beyond multiplication, the FFT appears throughout algorithm design. Fast string matching can be reduced to polynomial multiplication (represent text and pattern as polynomials, compute their convolution). The FFT is essential for fast algorithms in computational geometry (polygon area, point-set diameter), coding theory (Reed-Solomon encoding/decoding), and combinatorics (computing convolutions that arise in counting problems). The Number Theoretic Transform (NTT) — the FFT over finite fields — is the basis for fast modular arithmetic in cryptography and for efficient implementations of operations in lattice-based cryptographic schemes. The FFT's combination of theoretical elegance (a single divide-and-conquer idea, enabled by the algebraic structure of roots of unity) and extraordinary practical impact places it among the greatest algorithmic achievements of the 20th century.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Proof by Cases → Proving by Cases and Exhaustion → Vacuous Truth and Trivial Cases → Proof by Cases (Proof by Exhaustion) → Mathematical Induction → Binary Operations and Algebraic Structures → Group Definition and Examples → Basic Properties of Groups → Group Homomorphisms → Group Isomorphisms → Cayley's Theorem → Cosets and Lagrange's Theorem → Normal Subgroups → Quotient Groups → First Isomorphism Theorem for Groups → First Isomorphism Theorem for Rings → First Isomorphism Theorem for Groups → Third Isomorphism Theorem for Groups → First Isomorphism Theorem for Rings → Integral Domains → Principal Ideal Domains → Unique Factorization Domains → Polynomial Rings → Fast Fourier Transform and Polynomial Multiplication

Longest path: 93 steps · 512 total prerequisite topics

Prerequisites (4)

Leads To (0)

No topics depend on this one yet.