(a + b)² Formula — a²+2ab+b², Proof, Examples

#Math Formula
TL;DR
The a plus b whole square formula is $(a + b)^2 = a^2 + 2ab + b^2$ — the square of a binomial expands to the two squares plus twice their product. This article gives the formula, both an algebraic and a geometric (area) proof of where the $2ab$ comes from, six worked examples, the sharp difference between $(a+b)^2$ and $a^2+b^2$, and the mistakes that cost the most marks.
BT
Bhanzu TeamLast updated on June 22, 20268 min read

What Is the (a + b)² Formula?

The a plus b whole square formula expands the square of a binomial $(a + b)$ into a trinomial. For any real (or even complex) numbers $a$ and $b$:

$$(a + b)^2 = a^2 + 2ab + b^2.$$

Each term has a name worth knowing:

  • $a^2$ — the first square term, the square of the first quantity.

  • $2ab$ — the middle term (or cross term), twice the product of the two quantities.

  • $b^2$ — the second square term, the square of the second quantity.

The companion identity is $(a - b)^2 = a^2 - 2ab + b^2$ — same shape, with the middle term flipped to minus. The two are mirror images, and confusing them is a common slip.

How Is the (a + b)² Formula Derived?

Two proofs are worth seeing — one algebraic, one geometric. They explain the same fact from different directions, and together they make the $2ab$ impossible to forget.

Algebraic proof — just multiply it out. A square means "times itself," so $(a + b)^2 = (a + b)(a + b)$. Expand using the distributive property (the same move as FOIL):

$$(a + b)(a + b) = a\cdot a + a\cdot b + b\cdot a + b\cdot b = a^2 + ab + ba + b^2.$$

Since $ab = ba$, the two middle terms combine:

$$= a^2 + 2ab + b^2.$$

The $2ab$ is not an extra rule — it is the two cross-products $ab$ and $ba$ that the distribution always produces.

Geometric proof — the area of a square. Draw a square whose side is $(a + b)$. Its total area is $(a + b)^2$. Now cut it with one horizontal and one vertical line at the point that splits each side into a length $a$ and a length $b$. The square falls into four pieces:

  • one $a \times a$ square, area $a^2$,

  • one $b \times b$ square, area $b^2$,

  • two $a \times b$ rectangles, area $ab$ each, totaling $2ab$.

The pieces must add up to the whole:

$$(a + b)^2 = a^2 + 2ab + b^2.$$

The two $ab$ rectangles are the middle term. Once a student has seen the square cut into four pieces, the dropped-$2ab$ mistake tends to disappear — the term has a shape, not just a position in a formula.

How Is (a + b)² Different from a² + b²?

This is the distinction the whole topic turns on. They are not equal:

$$(a + b)^2 = a^2 + 2ab + b^2, \qquad a^2 + b^2 = (a + b)^2 - 2ab.$$

$(a + b)^2$ means "add first, then square." $a^2 + b^2$ means "square each, then add." The gap between them is exactly $2ab$. A quick numeric check settles it: with $a = 3$, $b = 4$, $(3 + 4)^2 = 49$ but $3^2 + 4^2 = 25$ — a difference of $24 = 2(3)(4)$. The relationship $a^2 + b^2 = (a+b)^2 - 2ab$ is itself a useful tool — see our a² + b² formula page for how it solves problems where only the sum and product are known.

Examples of the (a + b)² Formula

Example 1

Expand $(x + 5)^2$.

Apply the formula with $a = x$, $b = 5$:

$$(x + 5)^2 = x^2 + 2(x)(5) + 5^2 = x^2 + 10x + 25.$$

Final answer: $x^2 + 10x + 25$.

Example 2

Expand $(3x + 4)^2$.

A tempting shortcut is to square each term and add — to write $(3x)^2 + 4^2 = 9x^2 + 16$.

Wrong path. Writing $(3x + 4)^2 = 9x^2 + 16$. Check it at $x = 1$: the real value is $(3 + 4)^2 = 49$, but $9 + 16 = 25$. The shortcut is off by $24$ — and $24 = 2(3)(4)$, the exact middle term that was dropped. Squaring a sum is not the same as summing the squares.

The break. The error treats squaring as if it distributed over addition: $(p + q)^2 \neq p^2 + q^2$. The distribution produces two cross-terms, and they don't vanish.

The rescue. Use the full formula with $a = 3x$, $b = 4$:

$$(3x + 4)^2 = (3x)^2 + 2(3x)(4) + 4^2 = 9x^2 + 24x + 16.$$

Final answer: $9x^2 + 24x + 16$. (Check at $x = 1$: $9 + 24 + 16 = 49 = 7^2$. ✓)

Example 3

Use the formula to compute $52^2$ mentally.

Write $52 = 50 + 2$ and apply the identity with $a = 50$, $b = 2$:

$$52^2 = (50 + 2)^2 = 50^2 + 2(50)(2) + 2^2 = 2500 + 200 + 4 = 2704.$$

Final answer: $52^2 = 2704$ — no long multiplication needed.

Example 4

Expand $(2x + 3y)^2$.

With $a = 2x$, $b = 3y$:

$$(2x + 3y)^2 = (2x)^2 + 2(2x)(3y) + (3y)^2 = 4x^2 + 12xy + 9y^2.$$

Final answer: $4x^2 + 12xy + 9y^2$.

Example 5

Given $a + b = 7$ and $ab = 10$, find $a^2 + b^2$.

Rearrange the identity to isolate the sum of squares:

$$a^2 + b^2 = (a + b)^2 - 2ab = 7^2 - 2(10) = 49 - 20 = 29.$$

Final answer: $a^2 + b^2 = 29$ — found without ever solving for $a$ or $b$ individually.

Example 6

Factor $x^2 + 14x + 49$ back into a whole square.

Recognise the pattern $a^2 + 2ab + b^2$. Here $a^2 = x^2$ so $a = x$; $b^2 = 49$ so $b = 7$; and the middle term should be $2ab = 2(x)(7) = 14x$ — which matches. So it is a perfect square:

$$x^2 + 14x + 49 = (x + 7)^2.$$

Final answer: $(x + 7)^2$. (The middle-term check is what confirms the factoring; without it, $x^2 + 14x + 49$ might be mistaken for a non-square trinomial.)

Where the (a + b)² Formula Shows Up

This identity is one of the first algebraic tools that keeps paying off long after Class 8.

  • Completing the square. Solving any quadratic $ax^2 + bx + c = 0$ by completing the square rebuilds a perfect-square trinomial — running Example 6 in reverse. The quadratic formula itself is derived this way.

  • Mental arithmetic. Squaring numbers near a round figure ($52^2$, $98^2 = (100 - 2)^2$) is instant with the identity, a trick rooted in Vedic mathematics and still taught for fast computation.

  • Statistics — variance. The shortcut formula for variance, $\text{Var}(X) = E[X^2] - (E[X])^2$, is a direct cousin of the $a^2 + b^2 = (a+b)^2 - 2ab$ rearrangement; the cross-term is what separates "mean of the squares" from "square of the mean."

  • Geometry and physics. Any area, energy, or distance expression involving a squared sum — kinetic-energy terms, the expansion of $(\vec{u} + \vec{v})\cdot(\vec{u} + \vec{v})$ — carries the $2ab$ cross term, which in vectors becomes the dot-product interaction term.

For Class 8 to Class 10 students, the immediate use is expansion and factoring — but completing the square and the variance shortcut mean this one identity reappears in algebra, calculus prep, and statistics.

Tripping Points to Avoid

Mistake 1: Dropping the middle term

Where it slips in: Writing $(a + b)^2 = a^2 + b^2$, treating squaring as if it distributed over addition.

Don't do this: Square each term separately and stop. The two cross-products $ab + ba = 2ab$ are part of the expansion, not optional.

The correct way: Always write all three terms, $a^2 + 2ab + b^2$. In the McKinney TX Grade 8 cohort, this is the single most-repeated error on the first identities worksheet — it appears in close to half of first attempts, and it is the rusher archetype's signature: straight to "square both," no middle step.

Mistake 2: Confusing (a + b)² with (a − b)²

Where it slips in: Putting a minus on the middle term of a sum, or a plus on the middle term of a difference.

Don't do this: Assume the middle sign is always positive (or always negative). It tracks the sign inside the bracket.

The correct way: $(a + b)^2 = a^2 + 2ab + b^2$ (plus middle); $(a - b)^2 = a^2 - 2ab + b^2$ (minus middle). The first and last terms are positive either way — only the middle term carries the sign.

Mistake 3: Misreading the cross term when terms have coefficients

Where it slips in: Expanding $(3x + 4)^2$ and writing the middle term as $2(3)(4) = 24$ instead of $2(3x)(4) = 24x$ — forgetting the variable.

Don't do this: Take $2ab$ from the bare coefficients and lose the variable that belongs in $a$.

The correct way: Treat the whole term as $a$. For $(3x + 4)^2$, $a = 3x$, so $2ab = 2(3x)(4) = 24x$. The second-guesser archetype gets the structure right, then "simplifies away" the variable because the all-numbers version felt cleaner.

Conclusion

  • The a plus b whole square formula is $(a + b)^2 = a^2 + 2ab + b^2$ — two squares plus twice the product.

  • The $2ab$ middle term comes from the two cross-products of the distribution, shown geometrically as two equal rectangles in a square of side $a + b$.

  • $(a + b)^2$ is not $a^2 + b^2$; they differ by exactly $2ab$.

  • The most common errors are dropping the middle term, confusing it with $(a - b)^2$, and losing the variable in the cross term.

  • The identity powers completing the square, fast mental arithmetic, the variance shortcut, and vector dot-product expansions.

Practice These Before Moving On

  1. Expand $(2x + 7)^2$.

  2. Compute $103^2$ using the formula.

  3. Given $a + b = 9$ and $ab = 14$, find $a^2 + b^2$.

If Problem 1 gave you $4x^2 + 49$, return to Mistake 1 — the $28x$ middle term is missing. For the related cube identities, see a³ + b³ formula.

Want a live Bhanzu trainer to walk your child through algebraic identities and the Class 8 polynomials chapter? Book a free demo class — online globally.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the a plus b whole square formula?
It is the algebraic identity $(a + b)^2 = a^2 + 2ab + b^2$ — the square of a binomial equals the sum of the squares plus twice the product.
Is (a + b)² the same as a² + b²?
No. $(a + b)^2 = a^2 + 2ab + b^2$, while $a^2 + b^2$ is missing the $2ab$ middle term. They differ by exactly $2ab$: $a^2 + b^2 = (a + b)^2 - 2ab$.
Why is there a 2ab term?
Because $(a + b)^2 = (a + b)(a + b)$ produces two cross-products, $ab$ and $ba$, which add to $2ab$. Geometrically, they are the two equal rectangles inside a square of side $a + b$.
What is the difference between (a + b)² and (a − b)²?
Only the sign of the middle term. $(a + b)^2 = a^2 + 2ab + b^2$; $(a - b)^2 = a^2 - 2ab + b^2$. The squared terms stay positive in both.
How do I use the formula to square a number like 98?
Write $98 = 100 - 2$ and use $(a - b)^2$: $98^2 = 100^2 - 2(100)(2) + 2^2 = 10000 - 400 + 4 = 9604$.
Can the formula extend to three terms?
Yes. $(a + b + c)^2 = a^2 + b^2 + c^2 + 2ab + 2bc + 2ca$ — every pair of terms contributes a cross-product, so three terms give three cross-terms.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →