Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Square of a Sum (a+b)²

Speed




Visualizing (a+b)² as Four Pieces of a Square

This visualizer turns the identity (a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2 into a geometric proof you can step through. A square of side a+ba+b is built, its sides split into aa and bb, internal lines extend the splits across the square, and the resulting four rectangles colour in to show exactly where each term comes from. The two abab rectangles are visibly identical pieces — the source of the 2ab2ab middle term that students often memorize without ever seeing.



The (a+b)² Identity at a Glance

The square of a sum identity is one of the foundational results of algebra:

(a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2


Squaring a sum produces a square term for each part plus a cross term that captures their interaction. The cross term is 2ab2ab, not just abab — and that doubling is exactly what the geometric proof makes visible.

The identity appears constantly: expanding binomials, completing the square, simplifying calculus expressions, and shortcuts for mental arithmetic. Memorising the formula is one path; seeing why it must hold turns it into something you can reconstruct anytime.

Reading the Starting Square

Step 1 of the animation shows the object whose area we want to understand: a square with side length a+ba+b. Inside the square the label (a+b)2(a+b)^2 floats in the centre, and dimension marks along the top and left edges read "a+ba+b". Both edges are the same length because the figure is a square — that is the only fact we will use throughout the proof.

The square's area is (a+b)×(a+b)=(a+b)2(a+b) \times (a+b) = (a+b)^2. That is one expression for the area. The proof's whole task is to find a second expression for the same area, broken into pieces, and conclude that the two expressions must be equal.

Nothing has been cut, marked, or rearranged yet. The starting state is the cleanest possible illustration of the identity's left-hand side.

Splitting Each Side into a and b

Step 2 marks the split point on each side. Two amber tick marks appear on the top edge and the left edge, dividing each side into a segment of length aa followed by a segment of length bb. The dimension labels reorganise: the original "a+ba+b" stays, but new labels "aa" and "bb" appear closer to the edge to show the split clearly.

This step is purely organisational. No area has been added, removed, or moved — the square is identical to step 1. What has changed is how we describe its boundary. Each edge is now seen as two segments of known length rather than one segment of length a+ba+b.

The split is the only setup the proof needs. From here, dropping perpendiculars from the tick marks will partition the interior into pieces with sides we can compute.

Drawing the Grid Cuts

Step 3 extends the splits across the square. A vertical line drops from the top tick mark, and a horizontal line extends from the left tick mark. The two cuts meet inside the square and divide it into exactly four rectangles arranged as a 2×2 grid.

The four pieces are not yet coloured — they exist only as outlines. This emphasises that the dissection itself, not the final colours, is what proves the identity. Total area is unchanged: the four rectangles together still make up the original (a+b)2(a+b)^2 square.

Now each piece has known side lengths. The top-left piece has dimensions a×aa \times a. The bottom-right piece has dimensions b×bb \times b. The top-right and bottom-left pieces each have dimensions a×ba \times b — and they are the same dimensions, just in different orientations.

Colouring the Four Pieces in Sequence

Step 4 fills the four rectangles with colour and labels in a deliberate order, so each term of the right-hand side enters the picture one at a time:

• The top-left rectangle fills blue and is labelled a2a^2 — its sides are both aa, so its area is a×a=a2a \times a = a^2.

• The bottom-right rectangle fills pink and is labelled b2b^2 — its sides are both bb, area b2b^2.

• The top-right and bottom-left rectangles fill amber simultaneously and are both labelled abab — each has sides aa and bb, area abab. Two identical pieces, each contributing abab, are added at the same time on purpose: this is where the 2ab2ab comes from.

Adding the four areas: a2+ab+ab+b2=a2+2ab+b2a^2 + ab + ab + b^2 = a^2 + 2ab + b^2. The same square that has area (a+b)2(a+b)^2 also has area a2+2ab+b2a^2 + 2ab + b^2. The identity follows by area conservation.

Why the Middle Term is 2ab, Not ab

The most common error in expanding (a+b)2(a+b)^2 is writing a2+b2a^2 + b^2 — dropping the 2ab2ab middle term entirely. The visualizer prevents this error by making the source of the doubling spatially obvious. Two amber rectangles, identical in shape and size, sit at diagonally opposite corners of the dissected square. Their areas are added together to produce 2ab2ab.

The same fact emerges from algebraic expansion. Multiplying (a+b)(a+b)(a+b)(a+b) via FOIL gives aa+ab+ba+bba \cdot a + a \cdot b + b \cdot a + b \cdot b. The middle two products abab and baba are equal, so they combine into 2ab2ab. The geometry corresponds exactly: each FOIL cross product matches one of the two amber rectangles.

Whichever path you take — area dissection or symbol expansion — the doubling is unavoidable. The 22 is not a memorisation trick; it is the count of identical pieces.

Using the Controls

Five controls drive the animation:

Play runs the full proof end-to-end. Each step animates, then briefly pauses before the next begins. When the final step finishes the playback stops automatically.

Pause halts whatever animation is currently in progress without losing position.

Step Forward and Step Back advance or reverse one step at a time, useful for studying a specific transition closely or pointing out details in a classroom setting.

Reset returns to step 1 and replays the intro fade-in.

Speed controls animation speed across all transitions, from 0.5× (slow, good for first viewing) to 2× (fast, good for review). The default 1× is calibrated so the algebra and the geometry move at a comfortable reading pace.

The right panel shows the four written steps. Each step is greyed out until reached and highlighted as the animation enters it.

Related Concepts and Tools

Algebraic Identities — Hub for all four identity visualizers including this one.

Square of a Difference — Visual proof of (ab)2=a22ab+b2(a-b)^2 = a^2 - 2ab + b^2. Same identity family with a sign flip.

Square of a Trinomial — Extension to three terms: (a+b+c)2(a+b+c)^2 as a 3×3 grid.

Difference of Squares — Factors a2b2a^2 - b^2 into (a+b)(ab)(a+b)(a-b) via slice and rearrange.

Powers Table — Reference table of integer powers, useful for computing (a+b)2(a+b)^2 at specific values.

Polynomials — Theory of polynomial expansion and standard form, in which the square of a sum identity plays a constant role.