Multiplying Polynomials

Algebra

Multiplying polynomials means applying the distributive property to multiply every term of one polynomial by every term of the other, then combining like terms.

Definition

Multiplying polynomials means multiplying every term of the first polynomial by every term of the second, then combining like terms. Use the distributive property repeatedly.

Example

$(x + 2)(x + 5) = x \cdot x + x \cdot 5 + 2 \cdot x + 2 \cdot 5 = x^2 + 5x + 2x + 10 = x^2 + 7x + 10$.

Key Insight

Think of it like multiplying large numbers: every digit in one number multiplies every digit in the other. For polynomials, every term in one multiplies every term in the other.

Definition

To multiply two polynomials, distribute each term of the first polynomial across all terms of the second. The result has degree equal to the sum of the degrees of the two factors. Special patterns (difference of squares, perfect square trinomial) speed up common cases.

Example

$(2x - 3)(x^2 + x - 4) = 2x \cdot x^2 + 2x \cdot x + 2x \cdot (-4) + (-3) \cdot x^2 + (-3) \cdot x + (-3) \cdot (-4) = 2x^3 + 2x^2 - 8x - 3x^2 - 3x + 12 = 2x^3 - x^2 - 11x + 12$.

Key Insight

The number of multiplication steps is (terms in first) times (terms in second). A $3$-term times a $3$-term requires $9$ multiplications before combining like terms.

Definition

Polynomial multiplication in $F[x]$ is defined by $(fg)(x) = \sum_{k} \left(\sum_{i+j=k} a_ib_j\right) x^k$, where $f = \sum a_ix^i$ and $g = \sum b_jx^j$. This is the Cauchy product (convolution) of the coefficient sequences. Fast polynomial multiplication can be done in $O(n \log n)$ time using the Fast Fourier Transform (FFT), which is the basis for fast integer multiplication algorithms.

Example

The coefficient of $x^3$ in $(a_0+a_1x+a_2x^2)(b_0+b_1x+b_2x^2)$ is $a_0b_3 + a_1b_2 + a_2b_1 + a_3b_0$ (convolution at index $3$).

Key Insight

Polynomial multiplication as convolution connects to signal processing: multiplying polynomials (or power series) corresponds to convolving their coefficient sequences. FFT-based polynomial multiplication underlies modern computer arithmetic.