← LibraryPolynomial Multiplication StrategiesEngineering · MathematicsLesson 258/385← PrevNext →
ArticlePublished 7 Aug 20262 min readBy Kevin Joginpolynomial multiplicationKaratsubaToom-CookFFT

Polynomial Arithmetic and GCD

Polynomial Multiplication Strategies

Schoolbook, Karatsuba and evaluation-interpolation methods for polynomial multiplication, and where the crossovers lie.

Engineering / MathematicsPolynomial Arithmetic and GCD2 min readKV-MATH-0555

Polynomial multiplication follows the integer case almost exactly, with one simplification and one complication: there are no carries, but the coefficients can grow.

Schoolbook

Accumulate every pairwise product of coefficients into the appropriate output position. Cost is the product of the degrees.

Karatsuba for polynomials

The same three-product identity applies. Split each polynomial at the midpoint of its degree, form three half-size products, and recombine.

f = f1 X^m + f0, g = g1 X^m + g0Three products instead of four, exactly as in the integer case.
Polynomial multiplication methods
MethodCostRange
SchoolbookO(d^2)Low degree, the usual case here
KaratsubaO(d^1.585)Moderate degree
Toom-CookBetter exponentHigh degree
FFT-basedNear linearVery high degree

Evaluation and interpolation

A product of degree d is determined by its values at d + 1 points. Evaluate both factors at enough points, multiply pointwise, and interpolate.

Evaluation-interpolation multiplication

  1. Choose pointsPick more evaluation points than the output degree.
  2. EvaluateEvaluate both operands at each point.
  3. Multiply pointwiseOne coefficient multiplication per point.
  4. InterpolateRecover the product coefficients.

Coefficient growth

Modular reduction after multiplication

In a finite field extension, multiplication is followed by reduction modulo the defining polynomial. Choosing a sparse modulus makes that reduction linear rather than quadratic — see finite field multiplication.

Source. Henri Cohen, A Course in Computational Algebraic Number Theory, Springer GTM 138 — 3.1.2. Structural reference unverified: the source file was not available during authoring; chapter and section numbers are taken from the published edition and have not been checked against a physical copy.

Continue learning

Polynomial Representation and StorageArticle · MathematicsNEXT LESSON →Polynomial Division with RemainderArticle · MathematicsFinding Short Vectors in LatticesArticle · MathematicsThe Polynomial Euclidean Algorithm over a FieldArticle · Mathematics