Polynomial Expander
Multiply out factored polynomials, binomial products, and powers with complete step-by-step mathematical precision. Apply the FOIL method, distribute multinomials, utilize Pascal's Triangle, and express results in standard descending form.
The Principle of Polynomial Expansion
Expanding a polynomial is the algebraic process of converting a product of factors into an equivalent standard polynomial sum without grouping parentheses. By applying the Distributive Law a(b + c) = ab + ac iteratively across all factor terms and summing like powers of x, expressions transform into standard descending canonical form aₙxⁿ + ... + a₁x + a₀.
Epistemology & Foundations of Polynomial Expansion
In abstract algebra and ring theory, polynomials $R[x]$ over a commutative ring $R$ form an algebraic structure where addition and multiplication are rigorously defined. A polynomial expressed in factored form explicitly communicates its algebraic roots and geometric zero-crossings. However, for many advanced mathematical procedures—including polynomial differentiation, integration, Taylor series analysis, and numerical coefficient matrix construction—the polynomial must be presented in its expanded standard form:
To expand a polynomial is to perform the forward multiplication of all factor terms, systematically eliminating all grouping parentheses via the distributive axiom. To reverse this transformation and decompose an expanded sum back into its constituent factors, explore our companion Polynomial Factoring Calculator. For fast computation of specific binomial multipliers, see our Binomial Coefficient Calculator.
The Distributive Law, FOIL Method, and Multinomial Multiplication
The mathematical engine powering all polynomial expansion is the Distributive Property of Multiplication over Addition:
When multiplying two binomials $(a + b)(c + d)$, the distributive law applies twice: $a(c + d) + b(c + d) = ac + ad + bc + bd$. In secondary mathematics education, this is taught via the universal mnemonic FOIL:
Product of the leading terms in each binomial.
Product of the outermost terms in the expression.
Product of the innermost adjacent terms.
Product of the final constant terms.
For products involving polynomials with three or more terms (multinomials), the FOIL acronym no longer suffices. Instead, the generalized distributive rule dictates that every term of the left polynomial must be multiplied by every term of the right polynomial, creating an $m \times n$ cross-product grid before combining like terms.
Special Product Patterns: Binomial Squares, Conjugates, and Cubics
Recognizing algebraic symmetry allows instantaneous expansion without executing manual term-by-term multiplications. For factoring conjugate binomials, inspect our Difference of Squares Factorization Tool.
| Special Product Type | Factored Template | Canonical Expanded Identity | Algebraic Behavior |
|---|---|---|---|
| Difference of Squares | (a + b)(a - b) | a² - b² | Middle cross-terms (+ab - ab = 0) cancel completely. |
| Square of a Sum | (a + b)² | a² + 2ab + b² | Middle cross-term doubles; never omit +2ab. |
| Square of a Difference | (a - b)² | a² - 2ab + b² | Last term is positive (+b²) because (-b)² = +b². |
| Cube of a Sum | (a + b)³ | a³ + 3a²b + 3ab² + b³ | Coefficients follow row 3 of Pascal's Triangle: 1, 3, 3, 1. |
| Cube of a Difference | (a - b)³ | a³ - 3a²b + 3ab² - b³ | Alternating signs (+ - + -) with binomial coefficients. |
The Binomial Theorem and Pascal's Triangle Matrix
For expanding arbitrary positive integer powers of binomials $(a + b)^n$, Sir Isaac Newton formalized the Binomial Theorem:
Where the binomial coefficient $\binom{n}{k} = \frac{n!}{k!(n - k)!}$ represents the number of combinations of $n$ elements taken $k$ at a time. The triangular array below summarizes the combinatorial coefficients across powers $n = 0$ through $n = 5$:
Comprehensive Step-by-Step Expansion Worked Examples
Examine these seven practical worked examples illustrating complete FOIL execution, polynomial products, and powers. Once expanded, evaluate your polynomial for concrete numerical values using our Algebraic Expression Evaluator.
Problem: Expand (3x + 4)(2x - 5).
First (F): (3x)(2x) = 6x²
Outside (O): (3x)(-5) = -15x
Inside (I): (4)(2x) = 8x
Last (L): (4)(-5) = -20
Sum & Combine: 6x² - 15x + 8x - 20 = 6x² - 7x - 20
Problem: Expand (4x - 7)².
Step 1: Identify pattern: (a - b)² = a² - 2ab + b² where a = 4x and b = 7.
Step 2: Square first term: (4x)² = 16x²
Step 3: Compute middle term: -2(4x)(7) = -56x
Step 4: Square last term: (7)² = 49
Expanded Form: 16x² - 56x + 49
Problem: Expand (2x + 3)(x² - 4x + 5).
Step 1 (Distribute 2x): 2x(x² - 4x + 5) = 2x³ - 8x² + 10x
Step 2 (Distribute 3): 3(x² - 4x + 5) = 3x² - 12x + 15
Step 3 (Group Like Powers):
Cubic term: 2x³
Quadratic terms: -8x² + 3x² = -5x²
Linear terms: 10x - 12x = -2x
Constant: +15
Result: 2x³ - 5x² - 2x + 15
Problem: Expand (x + 2)(x - 3)(x + 5).
Step 1: Multiply first two binomials via FOIL:
(x + 2)(x - 3) = x² - 3x + 2x - 6 = x² - x - 6
Step 2: Multiply quadratic factor by (x + 5):
(x² - x - 6)(x + 5) = x(x² - x - 6) + 5(x² - x - 6)
= x³ - x² - 6x + 5x² - 5x - 30
Step 3: Combine like terms: x³ + 4x² - 11x - 30
Problem: Expand (x - 2)⁴.
Step 1: Row 4 of Pascal's Triangle: coefficients are 1, 4, 6, 4, 1.
Step 2: Apply theorem terms:
Term 0: 1 · x⁴ · (-2)⁰ = x⁴
Term 1: 4 · x³ · (-2)¹ = -8x³
Term 2: 6 · x² · (-2)² = 6 · 4 · x² = 24x²
Term 3: 4 · x¹ · (-2)³ = 4 · (-8) · x = -32x
Term 4: 1 · x⁰ · (-2)⁴ = +16
Final Expansion: x⁴ - 8x³ + 24x² - 32x + 16
Computational, Geometric, and Combinatorial Applications
Polynomial expansion is a cornerstone algorithmic operation utilized across mathematics, physics, and computational science.
Signal Processing: Fast Fourier Transform (FFT)
Multiplying polynomials of degree $n$ directly takes $O(n^2)$ operations. Modern FFT algorithms convert polynomial coefficients into frequency point values, perform pointwise multiplication in $O(n)$, and invert back in $O(n \log n)$ time.
Geometry: Volume & Surface Area Scaling
Expanding $(x + \Delta x)^3 = x^3 + 3x^2 \Delta x + 3x(\Delta x)^2 + (\Delta x)^3$ demonstrates how physical volume expands when dimensions undergo linear thermal expansion $\Delta x$.
Probability: Generating Functions
Expanding the probability generating polynomial $(p_1 x + p_2 x^2 + \dots + p_6 x^6)^k$ computes the exact discrete probability distribution for the sum of $k$ independent dice rolls.
Calculus: Taylor & Maclaurin Series
Expanding polynomials centered at $x = c$ creates power series expansions that approximate complex transcendental functions ($e^x, \sin(x), \ln(1+x)$) for scientific computing and numerical integration.
Common Student Traps & Diagnostic Error Matrix
The matrix below catalogs the most notorious polynomial expansion errors and outlines correct protocols.
| Factored Form | The "Freshman's Dream" Fallacy | Correct Mathematical Expansion |
|---|---|---|
| (x + y)² | x² + y² (Omitting middle term) | x² + 2xy + y² (Middle cross-term mandatory) |
| (x - 4)² | x² - 16 | x² - 8x + 16 (Notice +16, since (-4)² = +16) |
| -(x - 3)(x + 2) | Distributing negative to BOTH factors: (-x + 3)(-x - 2) | Multiply binomials first: -(x² - x - 6) = -x² + x + 6 |
| (2x + 3)³ | 8x³ + 27 | 8x³ + 36x² + 54x + 27 (Apply Binomial Theorem) |
Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.
Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.