What is the Square of a Binomial?
A binomial is an algebraic expression with two terms, such as a + b. "Squaring" it means multiplying the expression by itself: \((a + b)^2\). The two classic special products are $$(a + b)^2 = a^2 + 2ab + b^2$$ and $$(a - b)^2 = a^2 - 2ab + b^2.$$ This calculator expands either form numerically, showing each component so you can check your own work step by step.
How to Use the Calculator
Enter a value for the first term a, choose whether the binomial uses a plus or minus sign, and enter the second term b. The calculator returns the total expanded value along with the three building blocks: \(a^2\), the middle term \(2ab\) (positive for a sum, negative for a difference), and \(b^2\). Decimals and negative numbers are fully supported.
The Formula Explained
When you multiply \((a + b)(a + b)\) using the distributive property (FOIL), you get \(a\cdot a + a\cdot b + b\cdot a + b\cdot b = a^2 + 2ab + b^2\). The cross terms \(ab\) and \(ba\) combine into \(2ab\). For a difference, the sign of the middle term flips because \((a - b)(a - b)\) produces \(-ab - ba = -2ab\), leaving \(a^2 - 2ab + b^2\). Note the first and last terms are always positive squares.
Worked Example
Expand \((3 + 2)^2\). Here \(a = 3\) and \(b = 2\). Compute \(a^2 = 9\), the middle term \(2ab = 2 \times 3 \times 2 = 12\), and \(b^2 = 4\). Adding them gives $$9 + 12 + 4 = 25$$ — which matches \((3 + 2)^2 = 5^2 = 25\). For \((5 - 3)^2\): \(a^2 = 25\), \(-2ab = -30\), \(b^2 = 9\), so \(25 - 30 + 9 = 4 = 2^2\).
FAQ
Does this work with negative numbers? Yes. You can enter negative values for a or b and the formula still applies correctly.
Why is the middle term sometimes negative? Because \((a - b)^2\) produces \(-2ab\). Choosing the "Minus" operation flips the sign of that middle term.
Can I use decimals? Yes, the calculator accepts any decimal value for both terms.