Why This Matters
Multiplication puts things together; factoring takes them apart. When you factor the polynomial x^2 + 5x + 6 into (x + 2)(x + 3), you reveal the building blocks that were multiplied to create it. This is not just an algebraic exercise -- factoring is the primary way to find where a polynomial equals zero, which means finding where a graph crosses the x-axis, where a profit function breaks even, or where a physical system reaches equilibrium.
The simplest factoring technique is pulling out a common factor. In 6x^2 + 9x, every term is divisible by 3x, so you factor it as 3x(2x + 3). Recognizing the difference of squares pattern lets you instantly factor x^2 - 25 as (x + 5)(x - 5). These patterns save enormous amounts of computation once you learn to spot them.
For general quadratics ax^2 + bx + c, the strategy is to find two numbers that multiply to a*c and add to b, then split the middle term and factor by grouping. This systematic approach works every time the quadratic has rational roots, and it builds the intuition you need for the quadratic formula and higher-degree factoring.
Define Terms
Visual Model
The full process at a glance. Click Start tour to walk through each step.
Factoring reverses multiplication. The ac method systematically finds factors of any quadratic.
Code Example
// Factor a quadratic ax^2 + bx + c
// Find two numbers that multiply to a*c and add to b
function findFactorPair(a, b, c) {
const product = a * c;
const sum = b;
// Search for integer pairs
for (let i = -Math.abs(product); i <= Math.abs(product); i++) {
if (i === 0) continue;
if (product % i === 0) {
const j = product / i;
if (i + j === sum) {
return [i, j];
}
}
}
return null; // No integer factors found
}
// x^2 + 5x + 6: a=1, b=5, c=6
console.log("x^2+5x+6 factors:", findFactorPair(1, 5, 6)); // [2, 3]
// x^2 - x - 12: a=1, b=-1, c=-12
console.log("x^2-x-12 factors:", findFactorPair(1, -1, -12)); // [3, -4]
// Difference of squares: a^2 - b^2 = (a+b)(a-b)
function diffOfSquares(n) {
// Check if n = a^2 - b^2 for integers a, b
const a = Math.sqrt(n);
// x^2 - n = (x + sqrt(n))(x - sqrt(n))
if (Number.isInteger(Math.sqrt(n))) {
const root = Math.sqrt(n);
console.log(`x^2 - ${n} = (x + ${root})(x - ${root})`);
}
}
diffOfSquares(25); // x^2 - 25 = (x + 5)(x - 5)
diffOfSquares(49); // x^2 - 49 = (x + 7)(x - 7)
// GCF extraction
function gcd(a, b) {
a = Math.abs(a); b = Math.abs(b);
while (b) { [a, b] = [b, a % b]; }
return a;
}
function extractGCF(coefficients) {
let g = Math.abs(coefficients[0]);
for (let i = 1; i < coefficients.length; i++) {
g = gcd(g, Math.abs(coefficients[i]));
}
const reduced = coefficients.map(c => c / g);
console.log(`GCF = ${g}, factored: ${g} * [${reduced}]`);
return { gcf: g, reduced };
}
extractGCF([6, 9, 15]); // GCF = 3, factored: 3 * [2, 3, 5]Interactive Experiment
Try these exercises:
- Factor x^2 + 7x + 12 by finding two numbers that multiply to 12 and add to 7. Verify by expanding.
- Factor x^2 - 9 using the difference of squares pattern. What are the roots?
- Try to factor x^2 + x + 1. What happens? Not all quadratics factor over the integers.
- Factor 2x^2 + 7x + 3 using the ac method (find numbers that multiply to 6 and add to 7).
- Extract the GCF from 12x^3 + 8x^2 + 4x. What remains after factoring out the GCF?
Quick Quiz
Coding Challenge
Write a function called `factorQuadratic` that takes coefficients a, b, c of ax^2 + bx + c and returns an array [p, q] where the quadratic factors as a*(x - p)(x - q) = 0, meaning p and q are the roots. Use the ac method: find two numbers m and n such that m * n = a * c and m + n = b. Then the roots are the solutions to ax^2 + bx + c = 0. For simplicity, use the formula: p = m/a and q = n/a (after adjusting signs). If no integer factor pair exists, return null.
Real-World Usage
Factoring is a core technique in mathematics and computing:
- Finding zeros: Factoring a polynomial reveals its roots, which tell you where functions cross zero -- critical for optimization and control systems.
- Simplifying fractions: Algebraic fractions reduce by canceling common factors, just like numeric fractions (12/18 = 2/3).
- Cryptography: RSA encryption relies on the difficulty of factoring large numbers into their prime factors.
- Partial fractions: Integration in calculus requires factoring denominators to decompose rational expressions.
- Signal processing: Z-transform analysis in digital signal processing factors polynomials to find system poles and zeros.