How reverse FOIL factoring works
FOIL — First, Outer, Inner, Last — is the shortcut for multiplying two binomials: (px + q)(rx + s) = pr·x² + (ps + qr)x + qs. Reverse FOIL runs that process backward: starting from a quadratic trinomial ax² + bx + c, it finds the two binomials that multiply together to produce it. This calculator uses the AC method, the standard technique for reverse-FOILing a trinomial whose leading coefficient a isn't necessarily 1.
The AC method, step by step
To factor ax² + bx + c: (1) multiply a and c together; (2) find two numbers m and n whose product equals a·c and whose sum equals b; (3) rewrite the middle term bx as mx + nx, giving ax² + mx + nx + c; (4) group the four terms into two pairs and factor out the greatest common factor of each pair; (5) if both pairs share a common binomial factor, pull it out to get the final answer (px + q)(rx + s). When a = 1, this reduces to the simpler classic case: find two numbers that multiply to c and add to b, which gives (x + p)(x + q) directly.
Reading the discriminant
The discriminant Δ = b² − 4ac tells you what kind of factors to expect before you even factor. If Δ is negative, the trinomial has no real roots and cannot be factored into real binomials. If Δ is zero, the trinomial is a perfect square and factors into two identical binomials. If Δ is positive and a perfect square (with a, b, and c all integers), the trinomial factors neatly into binomials with integer coefficients — exactly the case the AC method is built for. If Δ is positive but not a perfect square, the roots are irrational, so the "reverse FOIL" only works with decimal or irrational coefficients: a(x − x₁)(x − x₂).
Checking your factorization
Always verify by FOILing back out: multiply the two binomials you found and confirm you recover the original a, b, and c. This calculator performs that search internally — if the AC method can't find an integer pair (m, n), it falls back to the quadratic formula and reports the exact roots so you can still write the factorization, just with decimal or irrational numbers instead of small integers.