Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Difference of Squares a² − b²

aa
Speed




Visualizing a² − b² as a Cut-and-Rearrange Rectangle

This visualizer turns the factoring identity a2b2=(a+b)(ab)a^2 - b^2 = (a+b)(a-b) into a slice-and-rearrange proof. A small square of side bb is removed from a square of side aa, leaving an L-shape. The L is split horizontally into two rectangles; the upper strip lifts, rotates 90°, and drops next to the lower rectangle. The result is a rectangle of dimensions (a+b)(a+b) by (ab)(a-b), exactly the factored form.



The a² − b² Identity at a Glance

The difference of squares identity is a factoring rule:

a2b2=(a+b)(ab)a^2 - b^2 = (a+b)(a-b)


The left side is one square minus another. The right side is a product of two binomials — the sum and the difference of the two original quantities. Recognising a difference of squares immediately yields a factorisation, which is one of the most useful single moves in elementary algebra.

The visual proof works backwards from the geometry: instead of multiplying (a+b)(ab)(a+b)(a-b) by FOIL and watching the cross terms cancel, we start with the area a2b2a^2 - b^2 and physically rearrange it into a rectangle of dimensions (a+b)(a+b) by (ab)(a-b). The factorisation is then read directly off the rearranged shape.

Reading the Starting Square

Step 1 of the animation shows a square of side aa, with the central label a2a^2 and dimension labels along the top and left. This is the larger of the two squares whose difference we want to compute. Its area is the quantity a2a^2 that appears as the first term of the identity.

Nothing has been cut or removed. The starting state simply establishes the larger square. The proof's first move will be to mark a small square inside it that we plan to remove.

Marking the b² Removal

Step 2 marks an amber b2b^2 square in the upper-right corner of the larger square. The corner square has side bb, area b2b^2. Dimension labels update: the top edge now reads "aba-b" then "bb"; the right edge reads "bb" then "aba-b". The marked corner is the piece we intend to subtract.

Notice the corner square is fully drawn but visually distinct — it has its own colour and outline so it stands apart from the main square it sits inside. Once removed, the L-shape that remains will have area a2b2a^2 - b^2. That L-shape is the quantity we want to factor.

A small text label "(removed)" appears with the b2b^2 patch to make the operation unambiguous: this corner is being taken out, not added.

Splitting the L-Shape into Two Rectangles

Step 3 removes the b2b^2 corner. The L-shaped region that remains has total area a2b2a^2 - b^2 — the quantity we want to factor. A horizontal dashed line splits the L into two rectangles with dimensions we can compute:

• The top strip sits in the upper-left of the original square. Its width is aba - b (the remaining length of the top edge after removing bb), and its height is bb. Area: (ab)b(a-b) \cdot b.

• The bottom rectangle is wider — it spans the full width aa of the square — and its height is aba - b. Area: a(ab)a \cdot (a-b).

The two pieces are still in their original positions inside the L. Adding them gives (ab)b+a(ab)=(ab)(a+b)(a-b) \cdot b + a \cdot (a-b) = (a-b)(a+b) by direct factoring of (ab)(a-b) — but the visualizer takes the more striking route of physically combining the pieces into a single rectangle in the next step.

Lift, Rotate, and Place

Step 4 performs the rearrangement. The top strip lifts upward off the L, rotates 90° counterclockwise so its long side becomes vertical, and translates rightward to land snugly against the right edge of the bottom rectangle. The two pieces now sit side by side and merge into a single rectangle.

Reading the new rectangle's dimensions from the dimension marks:

Width (bottom edge): a+ba + b — the original full width aa of the bottom piece, plus the rotated strip's height bb added to its right.

Height (right edge): aba - b — both pieces have height aba - b in the new orientation, so the combined rectangle's height equals that.

The rectangle's area is (a+b)(ab)(a+b)(a-b). But total area was preserved through cutting and rotating — the only change was geometric arrangement, not size. So:

(a+b)(ab)=a2b2(a+b)(a-b) = a^2 - b^2


The factorisation is now a literal description of the rearranged rectangle's sides.

Why This Identity is So Useful

The difference of squares is the single most useful factoring identity in elementary algebra, for three reasons:

Recognition is fast. Any expression of the form X2Y2X^2 - Y^2 — where XX and YY can be variables, numbers, or compound expressions — factors instantly into (X+Y)(XY)(X+Y)(X-Y). Examples: x29=(x+3)(x3)x^2 - 9 = (x+3)(x-3); 4y225=(2y+5)(2y5)4y^2 - 25 = (2y+5)(2y-5); (p+q)2r2=(p+q+r)(p+qr)(p+q)^2 - r^2 = (p+q+r)(p+q-r).

It enables simplification. Many algebraic fractions and equations simplify dramatically when a difference of squares can be factored and a common factor cancelled.

It yields arithmetic shortcuts. Numerical computations such as 99×101=100212=999999 \times 101 = 100^2 - 1^2 = 9999 or 48×52=50222=25004=249648 \times 52 = 50^2 - 2^2 = 2500 - 4 = 2496 become trivial once the identity is recognised.

The geometric proof is what makes the identity memorable: the lift-rotate-place rearrangement is hard to forget, and the formula reads directly off the final rectangle.

Using the Controls

Five controls drive the animation:

Play runs the full proof from start to finish. The slowest single transition is the lift-rotate-place sequence in step 4, where the top strip's motion has three phases: lift, rotate, translate.

Pause stops the current animation in place, including mid-rotation if needed.

Step Forward and Step Back move through the four steps one at a time. Stepping forward from step 3 starts the lift-rotate motion; stepping back from step 4 reverses the motion through the rotation.

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

Speed ranges from 0.5× to 2×. Slower speeds (0.5× or 0.75×) are recommended for the first viewing, since the rotation animation in step 4 contains the most information per second.

The right panel lists the four written steps with the current step highlighted as the animation progresses.

Related Concepts and Tools

Algebraic Identities — Hub for all four identity visualizers.

Square of a Sum — Visual proof of (a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2. Companion identity in the same family.

Square of a Difference — Visual proof of (ab)2=a22ab+b2(a-b)^2 = a^2 - 2ab + b^2. The minus-sign companion to square of a sum.

Square of a Trinomial — Extension to three terms.

Factoring — Theory of polynomial factoring, where the difference of squares is one of the standard patterns to recognise.

Polynomials — Polynomial structure and operations.

Powers Table — Reference table of integer powers, useful for spotting perfect squares like 144=122144 = 12^2 or 625=252625 = 25^2 that make difference-of-squares factoring possible.