Expand and evaluate (a + b)² and (a − b)² step by step. See each term, verification, term-proportion bars, algebraic identity reference, and common examples.
The square of a binomial is one of the most fundamental algebraic identities: (a + b)² = a² + 2ab + b² and (a − b)² = a² − 2ab + b². These perfect-square trinomials appear in virtually every branch of mathematics—from simplifying expressions in algebra class to completing the square in calculus, deriving the quadratic formula, and expanding expressions in physics and engineering.
This Square of a Binomial Calculator lets you input any values for a and b, choose the sum or difference form, and instantly see the expansion broken into three terms. Each term—a², 2ab, and b²—is displayed individually so you can follow the algebra step by step. A verification check confirms the expanded form matches direct computation, catching any conceptual mistakes.
Visual bars compare the magnitude of each term, giving you an intuitive feel for which part dominates the result. A stacked proportion bar shows what fraction of the total each term contributes. The step-by-step table walks through the full process, making this tool ideal for homework help, exam prep, and teaching. An algebraic identities reference table lists related expansions—cube of a sum, difference of squares, and more—while a quick-reference table shows common squared binomials in both symbolic and numeric form.
This calculator is useful because squaring a binomial is more about seeing structure than just getting the final number. It separates the first-square term, the middle 2ab term, and the last-square term, then verifies the result against direct squaring. That makes it helpful for students learning perfect-square trinomials, teachers demonstrating why the middle term changes sign in (a − b)², and anyone checking algebra work before moving on to factoring or completing the square.
(a + b)² = a² + 2ab + b². (a − b)² = a² − 2ab + b². The middle term's sign matches the binomial's sign.
Result: (12 − 7)² = 25.
Using minus mode with a = 12 and b = 7 gives a² = 144, 2ab = 168, and b² = 49. The expansion is 144 − 168 + 49 = 25, which matches the direct check (12 − 7)² = 5² = 25.
When you square (a + b), you multiply the binomial by itself: (a + b)(a + b). Applying the distributive property gives a·a + a·b + b·a + b·b = a² + 2ab + b². The middle term 2ab is critical—it arises because the cross-product ab appears twice from both orderings. Writing (a + b)² = a² + b² is one of the most widespread algebra mistakes ("the freshman's dream"), omitting the 2ab term entirely. The correct expansion always has three terms, not two.
The identity has a vivid visual proof. Draw a square with side length (a + b). Partition each side at a distance a from one corner, leaving a remainder b. The large square divides into four pieces: a small square of area a², a small square of area b², and two identical rectangles each of area a × b. Total area = a² + 2ab + b², which must equal (a + b)² by construction—making the three-term result geometrically unavoidable and unforgettable.
The binomial square identity is the engine behind several important algebraic techniques:
- **Completing the square:** To solve x² + 6x − 7 = 0, rewrite as (x + 3)² − 9 − 7 = 0 → (x + 3)² = 16, applying the identity with a = x, b = 3. - **The quadratic formula:** Its derivation begins by completing the square on ax² + bx + c = 0, applying the binomial identity at each step until x is isolated. - **Perfect square recognition:** Recognizing x² + 14x + 49 = (x + 7)² allows instant factoring in inequalities and optimization problems. - **Connection to difference of squares:** The identity (a + b)(a − b) = a² − b² is closely related; products of sum and difference binomials eliminate the middle term entirely.
For subtraction: (a − b)² = a² − 2ab + b². The only difference is the sign of the middle term. A key sanity check: (a − b)² ≥ 0 always, since squaring any real number is non-negative. For (5 + 3)²: 25 + 30 + 9 = 64. Direct check: (5 + 3) = 8, and 8² = 64. ✓ Always verify your expanded form by computing (a ± b) directly and comparing.
It is the product of a binomial with itself. (a + b)² expands to a² + 2ab + b², and (a − b)² expands to a² − 2ab + b².
Because when you multiply (a + b)(a + b), you also get two cross terms: a × b + b × a = 2ab. Omitting this middle term is a common algebra mistake.
FOIL (First, Outer, Inner, Last) multiplies two binomials generally. For (a + b)², FOIL gives a² + ab + ab + b² = a² + 2ab + b², which is the same identity.
Yes. Enter negative values and the calculator handles signs correctly. For example, a = −3, b = 2 with plus gives (−3 + 2)² = 1.
It is a technique that rewrites ax² + bx + c in the form a(x − h)² + k using the binomial-square identity. It's used to derive the quadratic formula and find vertex form.
The identity applies to any a and b—numbers or expressions. This calculator evaluates numeric values; for symbolic expansion, apply the formula directly.