Given two -degree polynomials:
, ...
, the polynomial multiplication is computed as follows:
, where
This operation of computing is also called the convolution of and , denoted as . The time complexity of this operation (i.e., the total number of multiplications between two numbers) is .
Another way of multiplying two polynomials is based on point-value representation. The point-value representation of an -degree (or lesser degree) polynomial is a set of coordinates , where each is a distinct coordinate (whereas each is not necessarily a distinct coordinate). Given a point-value representation of an -degree (or lesser degree) polynomial, we can use polynomial interpolation (§A-15) to derive the polynomial. Let’s denote the point-value representation of -degree (or lesser degree) polynomial and as follows:
:
:
Then, the point-value representation of the polynomial can be computed as a Hadamard product (Definition A-10.1 in §A-10.1) of the values of the point-value representation of and as follows:
: , where
However, we cannot derive polynomial based on these coordinates because the degree of is (or less than ). But if we regard all polynomials (including and ) to be in the polynomial ring (or ), then we can reduce the -degree polynomial to a congruent -degree (or lesser degree) polynomial in the ring. Then, the coordinates of are sufficient to derive .
However, the time complexity of this new method is still . The Hadamard product between two polynomials’ point-value representations takes , but evaluating a polynomial at distinct values takes (because each polynomial has terms, and we have to compute each term for distinct values). The polynomial interpolation for deriving also takes .
To solve this efficiency problem, this section will introduce an efficient technique for polynomial evaluation, which can evaluate a polynomial at distinct roots of unity in . This technique is classified into 2 types: Fast Fourier Transform (FFT) and Number-theoretic Transform(NTT). These two types are technically almost the same, with the only difference being that the FFT assumes a polynomial ring over complex numbers (§A-7), whereas the NTT assumes a polynomial ring over a finite field (e.g., integers modulo a prime) (§A-9). Polynomial multiplication based on FFT (or NTT) comprises 3 steps: (1) forward FFT (or NTT); (2) point-value multiplication; and (3) inverse FFT (or NTT).