Category: Algebra Level: 201
a2 - b2 = (a + b)(a - b)
Cut a small square out of a big one, then slide one leftover strip to the end. The L-shape becomes a rectangle with sides a + b and a − b.
Take a = 7. The square holds 7² = 49 unit squares.
a2 = 72 = 49
Remove a corner square with b = 3. That takes away 3² = 9, leaving an L-shape.
a2 - b2 = 49 - 9 = 40
The top strip is 7 by 4. The bottom-left piece is 4 by 3. Together they still hold 40 squares.
7 · 4 + 4 · 3 = 28 + 12 = 40
Stand the 4-by-3 piece on its end and attach it to the right of the top strip. Its 4-long side matches the strip's height.
4 × 3 → 3 × 4
The new rectangle is a + b = 10 long and a − b = 4 tall. Its area is 10 × 4 = 40, the same as 49 − 9.
a2 - b2 = (a + b)(a - b): 49 - 9 = 10 · 4 = 40
cd svg-generator python3 -m svgmath render difference-of-squares --out /tmp/difference-of-squares
Source: svgmath/diagrams/area_models.py