Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Square of the Binomial
25
expanded value
9
2ab term 12
4

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.

Square divided into four regions representing a-squared, two ab rectangles, and b-squared
The geometric meaning of \((a+b)^2\): a large square split into \(a^2\), two \(ab\) rectangles and \(b^2\).

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.

Three colored terms a-squared plus two ab plus b-squared shown as the expansion of a binomial square
Each term of the expansion mapped to its source: \(a^2\), the middle \(2ab\) term, and \(b^2\).

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.

Last updated: