Completing the Square

Category: Algebra   Level: 201

x2 + 6x = 16 ⇒ (x + 3)2 = 25 ⇒ x = 2

Draw x² + 6x as a square plus a strip, split the strip in half, and wrap it around the square. One small corner is missing; add it to both sides and you have a perfect square.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Draw x² + 6x as area

An x-by-x square plus an x-by-6 strip. Together they cover 16 square units.

x2 + 6x = 16

Step 1: Draw x² + 6x as area

Step 2: Cut the strip in half

Split the 6x strip into two strips of 3x each.

6x = 3x + 3x

Step 2: Cut the strip in half

Step 3: Wrap one half under the square

Move the right half below the square and turn it. Now the square has a strip on its right and a strip underneath.

x2 + 3x + 3x = 16

Step 3: Wrap one half under the square

Step 4: Fill in the missing corner

The corner is a 3-by-3 hole worth 9. Add 9 to both sides to keep the equation fair.

x2 + 6x + 9 = 16 + 9 = 25

Step 4: Fill in the missing corner

Step 5: Read the side of the big square

The square has side x + 3 and area 25, so the side is 5 and x = 5 − 3 = 2. Algebra also allows x + 3 = −5, so x = −8, a length no drawing can show.

(x + 3)2 = 25, x + 3 = 5, x = 2 (or x = -8)

Step 5: Read the side of the big square

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render completing-the-square --out /tmp/completing-the-square

Source: svgmath/diagrams/area_models.py