Square of a Binomial Calculator

Enter the coefficient and constant of a binomial to expand its square — (ax + b)² or (ax − b)² — into a²x² ± 2abx + b², with an optional evaluation at a chosen x value.

Quick Facts

Square of a sum
(a + b)² = a² + 2ab + b²
The middle term is twice the product of the two terms.
Square of a difference
(a − b)² = a² − 2ab + b²
Same expansion, but the middle term is negative.
Common mistake
(a + b)² ≠ a² + b²
Forgetting the middle cross term 2ab is the most frequent algebra error.

Your Results

Calculated
x² Coefficient
-
a², coefficient of the squared term
x Coefficient
-
±2ab, the middle (cross) term
Constant Term
-
b², always positive
Expanded Trinomial
-
Full expanded expression

Ready

Enter a, b, and a sign, then press Calculate.

Formula and Method for the Square of a Binomial

A binomial is an expression with two terms, such as ax + b. Squaring it means multiplying it by itself: (ax + b)(ax + b). Using the distributive property (FOIL), this expands to a²x² + 2abx + b² for a sum, or a²x² − 2abx + b² for a difference (ax − b)². These are the two "perfect square trinomial" identities that show up constantly in algebra.

How the calculation works

Enter the coefficient a of the x-term and the constant b, then choose whether the binomial is a sum (ax + b) or a difference (ax − b). The calculator squares each term and doubles their product to build the three coefficients of the expanded trinomial: a² (the x² coefficient), ±2ab (the x coefficient, with sign matching the binomial), and b² (the constant term, always positive). If you also enter a value for x, it evaluates both the original binomial and the expanded trinomial at that x to confirm they match.

Common mistakes

  • Dropping the middle term: (a + b)² is not a² + b² — this shortcut (the "freshman's dream") ignores the cross term 2ab and is wrong whenever a and b are both nonzero.
  • Sign errors with a difference: in (a − b)², the middle term −2ab is negative, but the constant term b² is still positive because a negative number squared is positive.
  • Mixing up ab and 2ab: the cross term appears twice when you multiply (a + b)(a + b) — once as a·b and once as b·a — so the coefficient is always twice the product, never just ab.

Applications

  • Completing the square: recognizing a²x² + 2abx + b² as (ax + b)² lets you rewrite and solve quadratic equations by isolating a squared expression.
  • Factoring: spotting a perfect-square trinomial instantly gives you its two (identical) binomial factors, without trial and error.
  • Geometry: the identity (a + b)² = a² + 2ab + b² has a visual proof as the area of a square with side (a + b), split into two smaller squares (a² and b²) and two equal rectangles (ab each).
  • Mental math shortcuts: the identity makes squaring numbers near a round base easy — e.g., 53² = (50 + 3)² = 2500 + 300 + 9 = 2809.

Frequently Asked Questions

What is the formula for squaring a binomial?
(a + b)² = a² + 2ab + b², and (a − b)² = a² − 2ab + b². The middle term is twice the product of the two terms, with a sign that matches the sign inside the binomial.
Why isn't (a + b)² equal to a² + b²?
Squaring a binomial means multiplying it by itself: (a + b)(a + b) = a² + ab + ba + b² = a² + 2ab + b². Dropping the middle cross term 2ab — sometimes called the "freshman's dream" mistake — gives an incorrect result unless a or b is 0.
Is the constant term always positive?
Yes. Because b² is a square, it is always positive (or zero) for any real b, regardless of whether the binomial uses + or −. Only the sign of the middle term changes between (a + b)² and (a − b)².
How does squaring a binomial help solve quadratic equations?
Recognizing a trinomial as a perfect square, such as a²x² + 2abx + b² = (ax + b)², lets you solve equations by completing the square: rewrite the equation as (expression)² = constant, then solve by taking a square root.