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.
(a+b)²a + ba + b
Step 1: the (a+b) square, frozen

One square, one label, two identical edges — the left-hand side of the identity, drawn at a = 5, b = 3.

The frozen frame shows the visualizer's concrete choice of numbers: the square is drawn with a=5a = 5 and b=3b = 3 grid units, so every later piece will have honest proportions — the a2a^2 block really will be about three times the area of b2b^2. Working with a specific-but-unlabeled scale is the quiet trick of all dissection proofs: the picture is one example, but nothing in the argument uses the numbers, so the conclusion holds for every aa and bb.

From here the proof is three moves long: split the sides, cut, and add up the pieces.

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.
a + ba + babab
Step 2: the side split, frozen

Amber ticks divide each edge into a then b; the combined a + b label slides outward. Two descriptions of one boundary.

Note the deliberate bookkeeping in the frozen frame: the combined "a+ba + b" dimension slides outward rather than disappearing, so both descriptions of each edge — one segment or two — stay on screen simultaneously. That redundancy is the proof's engine: the left-hand side of the identity lives in the outer label, the right-hand side will live in the inner ones.

The amber tick marks are the only new geometry. Everything else in the next step is determined by them.

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.
a + ba + babab
Step 3: the grid cuts, frozen

Two perpendiculars from the ticks make four outlined rectangles — the multiplication grid of (a+b)(a+b), uncolored.

The uncolored outlines in the frozen frame are the proof at its most honest: four rectangles whose dimensions can be read off the edge labels, and nothing else. This is also the frame that connects the geometry to FOIL — each of the four cells is one of the four products in (a+b)(a+b)(a+b)(a+b), laid out as a multiplication grid.

The colours arrive in the final step, but the identity is already decided here; colouring only announces it.

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.
ababa + ba + babab
Step 4: the four pieces, frozen

Blue a², pink b², and the two amber ab twins at opposite corners — the 2ab made of two visible pieces.

The frozen frame is the completed proof and the page's best answer to the classic error of writing a2+b2a^2 + b^2: the two amber rectangles are simply there, occupying real area that any expansion must account for. Cover them with a thumb and you are looking at the wrong identity.

The simultaneous colouring of the two abab pieces — deliberately staged as one event in the animation — is what earns the coefficient: they are one term because they are one kind of piece, counted twice.

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.