Completing the Square

Rewrites it so the turning point shows.

A square with a corner missing

Draw x² + 4x as an area. The x² is a square with sides x. Split the 4x into two equal strips, each 2 by x, and put one along the right side of the square and one along the bottom.

The shape is nearly a square with sides x + 2. Only one piece is missing: the small corner, which is 2 by 2. Adding that corner would complete the square.

x²2x2x?x2x2x² + 4x

x² + 4x arranged as a square with sides x + 2. The corner is missing, and its sides are both 2.

Add the corner, then take it away

The corner is 2 × 2 = 4. With it, the shape is a full square: x² + 4x + 4 = (x + 2)². But x² + 4x does not have that extra 4, so subtract it again: x² + 4x = (x + 2)² − 4.

Check by expanding: (x + 2)² − 4 = x² + 4x + 4 − 4 = x² + 4x.

The 2 is half of 4, the coefficient of x, and this is always so. (x + p)² = x² + 2px + p², so the middle term is 2p times x. To make a middle term of 4x, p must be 2, which is half of 4. The corner is then p², the square of that half.

x²2x2x(2)²x + 2

half of bx along each of two sides leaves a corner of side b/2 unfilled, which is why (b/2)² is added and then subtracted; the corner is 4

Make the missing corner 9

Drag the right edge to change b. The two strips are each half of bx, and the dashed corner is the square of that half. Set it up for x² + 6x.

With a number term

Complete the square on x² + 6x − 1. Half of 6 is 3, and (x + 3)² = x² + 6x + 9, so x² + 6x = (x + 3)² − 9. Put the −1 back: x² + 6x − 1 = (x + 3)² − 9 − 1 = (x + 3)² − 10.

The coefficient of x can be negative. For x² − 6x + 5, half of −6 is −3, and (x − 3)² = x² − 6x + 9. So x² − 6x + 5 = (x − 3)² − 9 + 5 = (x − 3)² − 4.

Reading the lowest point

The completed square shows the least value at a glance. In x² + 4x = (x + 2)² − 4, the square (x + 2)² is never below 0, because no square is negative. So (x + 2)² − 4 is never below −4.

It equals −4 when the square is 0, which happens when x + 2 = 0, at x = −2. So the least value of x² + 4x is −4, at x = −2, and the lowest point of the curve y = x² + 4x is (−2, −4). This lowest point is the turning point of the curve, also called its vertex.

-40(−2, −4)

The curve y = (x + 2)² − 4 turns at (−2, −4), where the square is 0. It meets the x-axis at −4 and 0.

Any completed square

Read (x − 2)² − 3 the same way. The bracket is 0 when x = 2, and the number after it is −3, so the lowest point is (2, −3).

Take care with the signs. The x-coordinate is the value that makes the bracket 0, so (x − 2) gives 2 and (x + 2) gives −2. The y-coordinate is the number after the bracket, with its own sign.

0.33.7(2, −3)

The curve y = (x − 2)² − 3 turns at (2, −3).

Solving an equation this way

A completed square also solves equations. Solve x² + 8x + 3 = 0. Half of 8 is 4, and (x + 4)² = x² + 8x + 16, so the equation is (x + 4)² − 16 + 3 = 0, which is (x + 4)² − 13 = 0.

Add 13 to both sides: (x + 4)² = 13. A number whose square is 13 is √13 or −√13, so x + 4 = √13 or x + 4 = −√13. Subtract 4: x = −4 + √13 or x = −4 − √13, written x = −4 ± √13. The quadratic formula gives the same answer.

The usual mistakes

Not halving. x² + 6x is not (x + 6)² minus something: (x + 6)² has 12x in the middle. The bracket takes half of 6, which is 3.

Forgetting to subtract the corner. (x + 3)² is x² + 6x + 9, so x² + 6x − 1 is (x + 3)² − 10, not (x + 3)² − 1.

Mixing up where and how low. In (x + 2)² − 4, the least value is −4, and it happens at x = −2. The number inside the bracket gives the x-coordinate, with its sign changed; the number outside gives the value.

When x² has a coefficient

Take out the coefficient of x² as a factor first, then complete the square inside the bracket. For −2x² + 12x, take out −2: −2x² + 12x = −2(x² − 6x). Half of −6 is −3, and x² − 6x = (x − 3)² − 9, so −2x² + 12x = −2[(x − 3)² − 9] = 18 − 2(x − 3)².

Check by expanding: 18 − 2(x² − 6x + 9) = 18 − 2x² + 12x − 18 = −2x² + 12x. Now read it. The square (x − 3)² is never negative, so 18 − 2(x − 3)² is never more than 18. The greatest value is 18, at x = 3. With a negative coefficient of x², the completed square gives a highest point instead of a lowest one.

Worked example: A Ball Thrown Straight Up: When It Lands and How High It Goes

Question A ball is thrown straight up from the ground. After m seconds its height is h meters, where h = 20m − 5m2. (a) After how many seconds does the ball land? (b) What is the greatest height that the ball reaches, and when does it reach it?

  1. 1.The ball is on the ground when h = 0, so 20m − 5m2 = 0. Both terms have the factor 5m: 5m(4 − m) = 0.

    0510152025012345seconds, mheight in meters, hon the ground: 20m − 5m2= 05m(4 − m) = 0
    0510152025012345seconds, mheight in meters, hon the ground: 20m − 5m2= 05m(4 − m) = 0
    The ball is on the ground when h = 0: 20m − 5m2 = 0, which factorizes as 5m(4 − m) = 0.
  2. 2.One of the factors is zero, so m = 0 or m = 4. The root m = 0 is the moment the ball is thrown. (a) The ball lands after 4 seconds. Check: 20 × 4 − 5 × 42 = 80 − 80 = 0.

    0510152025012345seconds, mheight in meters, hm = 4m = 0 is the moment of the throwm = 4: the ball lands after 4 seconds
    0510152025012345seconds, mheight in meters, hm = 4m = 0 is the moment of the throwm = 4: the ball lands after 4 seconds
    (a) m = 0 is the moment of the throw, so the ball lands at m = 4, after 4 seconds.
  3. 3.Take out the factor −5: h = −5(m2 − 4m). Half of 4 is 2, and (m − 2)2 = m2 − 4m + 4, so m2 − 4m = (m − 2)2 − 4.

    0510152025012345seconds, mheight in meters, hm = 4h = −5(m2− 4m)m2− 4m = (m − 2)2− 4
    0510152025012345seconds, mheight in meters, hm = 4h = −5(m2− 4m)m2− 4m = (m − 2)2− 4
    Take out the factor −5, then complete the square inside the bracket: m2 − 4m = (m − 2)2 − 4.
  4. 4.Substitute this into the bracket: h = −5[(m − 2)2 − 4] = 20 − 5(m − 2)2.

    0510152025012345seconds, mheight in meters, hm = 4h = −5[(m − 2)2− 4]h = 20 − 5(m − 2)2
    0510152025012345seconds, mheight in meters, hm = 4h = −5[(m − 2)2− 4]h = 20 − 5(m − 2)2
    Substitute it into the bracket: h = −5[(m − 2)2 − 4] = 20 − 5(m − 2)2.
  5. 5.The square (m − 2)2 is never negative, so h is never more than 20, and h = 20 when m = 2. (b) The greatest height is 20 meters, reached 2 seconds after the ball is thrown. Check: at m = 1 and at m = 3 the height is 15 meters, which is lower.

    0510152025012345seconds, mheight in meters, hm = 4(2, 20)h = 20 − 5(m − 2)2is greatest when m = 2greatest height: 20 meters, after 2 seconds
    0510152025012345seconds, mheight in meters, hm = 4(2, 20)h = 20 − 5(m − 2)2is greatest when m = 2greatest height: 20 meters, after 2 seconds
    (b) The square is never negative, so the greatest height is 20 meters, at m = 2. One second before and one second after, the height is 15 meters.

Answer: (a) After 4 seconds; (b) 20 meters, reached 2 seconds after the ball is thrown

Common mistakes

  • Dividing both sides of 20m − 5m2 = 0 by m and keeping only m = 4 without a reason. Dividing by m loses the root m = 0. It is better to factorize, find both roots, and then say that m = 0 is the moment of the throw.
  • Giving the landing time, 4 seconds, as the time of the greatest height. The ball is highest halfway through its flight, at m = 2, which is the value that makes the squared bracket zero.

More quadratic equations problems, worked step by step →

Practice Completing the Square in the app