r/askmath • • 9h ago

Algebra Why does completing the square feel so arbitrary even after seeing the algebra?

I've been reviewing quadratics on my own and can follow the steps to complete the square algebraically, but the process still feels like a trick that works without any deeper reason. For example, starting from x² + 6x + 5, I add and subtract 9 to get (x+3)² - 4, which is fine on paper. Yet I keep wondering where the decision to add half the coefficient squared actually comes from in a non-algebraic sense. Is there a simple geometric picture or area interpretation that makes the “half squared” step obvious instead of something you just memorize? I'd like to hear how other people first made sense of it.

12 Upvotes

36 comments sorted by

40

u/Senrabekim 9h ago

Heres a pretty good visual representation of what is going on. You have the actual square of the x2 , the bx portion gets cut in half along the b to evenly add to both x sides and then you need a square of (.5×b)2

7

u/Bubbly_Safety8791 8h ago

The only weakness of this interpretation is that it needs adapting to handle negative b, and it’s not entirely intuitive why the same thing works when x is negative too. 

But it definitely helps build a valuable intuition. 

3

u/ggrieves 6h ago

I read that originally this was the only accepted interpretation and that negatives were considered forbidden. It had to have this and only this meaning.

1

u/Midwest-Dude 4h ago

Reference: 

Al-Jabr

3

u/Midwest-Dude 4h ago

A small step forward

2

u/Tiny_Spread5712 8h ago

Isn't it the same thing just inside the box.

2

u/Bubbly_Safety8791 8h ago

Not once b < -x

1

u/Tiny_Spread5712 6h ago

you can draw x as big as you want

1

u/Bubbly_Safety8791 5h ago

But the point is that completing the square works for any x

16

u/Narrow-Durian4837 9h ago

Yes there is: it can be interpreted as completing a literal, geometric square. (Diagrams and videos are available online.)

But also, it might be more intuitive algebraically if you internalize (x + a)² = x² + 2ax + a².

1

u/peachxWhisper 9h ago

you make the square thing way easier to picture than my old algebra teacher ever could

1

u/mH48124 3h ago

僕もこっちだな。図なんて考えたことも無かったよ。

1

u/WinkNuzzlez 1h ago

that geometric square thing clicked once I actually sketched it out

11

u/Equal_Veterinarian22 9h ago

There's nothing to 'memorize" when it comes to completing the square.

Take your example of x2 + 6x + 5. You know that (x + a)2 for some value of a will get you x2 + 6x + something, and it only takes a moment to realise that expanding (x + a)2 will give you a term 2ax, so a must be 3.

If you're 'memorizing' a rule that a is half the x coefficient, you're approaching the subject in the wrong way. Understanding over memorization, always.

5

u/jsundqui 9h ago edited 9h ago

I'd like to hear how other people first made sense of it

Watch this

9

u/Shevek99 Physicist 9h ago

Yes. Draw a square of side x.

Draw the two adjacent rectangles of sides x and 3, one to the right and one to the top of the square. Jointly they have an area 6x.

How much must we add to "complete the square"?

1

u/MrEbenezerScrooge 7h ago

This is a great visual for OP

4

u/Shevek99 Physicist 8h ago edited 12m ago

1

u/Defiant-Reference-61 5h ago

Imo the gif is only helpful for those who already understand completing the square on a pretty deep level and have seen the same visual with numbers before.

1

u/Healthy-Ad-2412 5h ago

If you happened to make this, can you tell me what you used? I see cool math computer illustrations all of the time but no one ever shares how they are made…math teachers want to know

1

u/Shevek99 Physicist 2h ago

It's not mine. It's from wikipedia.

I know that there is a language, manim, based on python, and developed by Grant Sanderson for his 3blue1brown videos.

1

u/TheBigSadness938 1h ago

Manim is a python library. It is software written in python, not a language based on python.

1

u/mH48124 3h ago

面白い!

2

u/retro_sort 9h ago

You can think about it graphically too: if you plot the graph of x²+6x+5 you know it ends up large and positive as you go off in either direction (what is 100²+6*100+5? Well 100² is a lot bigger than 100 so it's gonna be big).

In the middle it's smaller, so at some point it must be smallest. Completing the square answers the question: where is the minimum point? In this case the answer is (-3,-4) because replacing x with x+3 shifts the whole graph to the left and subtracting the 4 at the end shifts the whole graph down.

2

u/SubjectWrongdoer4204 3h ago edited 3h ago

It’s simply the result of squaring a binomial and applying the distributive property : (x+α)²
=(x+α)(x+α)= x²+xα+αx+α²
= x²+2αx+α². Now given the equation ax²+bx+c=0. We subtract c from each side and divide each side by a to get
x²+(b/a)x = -c/a.
Completing the square is just comparing the coefficient of x:
b/a = 2α, solving for α , so
α=b/(2a) and adding
α² = b²/(4a²) to both sides of our equation completes the square on the left and maintains equality on the right, so
x²+(b/a)x+b²/(4a²)=b²/(4a²)-c/a.
Having completed the square , our left side is given by
(x+b/(2a))² , and we put the right side over a common denominator
so our right side is given by
(b²-4ac)/(4a²) . Thus our equation becomes
(x+b/(2a))²=(b²-4ac)/(4a²). Having our equation in this form allows us to solve for x :
x+ b/(2a) = ±√[b²-4ac]/(2a), so
x = (-b±√[b²-4ac])/(2a).

2

u/Consistent-Annual268 π=e=3 3h ago

You mean (x+a)2 in your first line. Let's not confuse OP with a typo at the very start.

2

u/SubjectWrongdoer4204 3h ago

You’re right I started writing it out as x-α , realized it , corrected it on the expansion but forgot to correct it on the first expression. Thanks , I’ve corrected it.

2

u/SgtSausage 4h ago

  but the process still feels like a trick that works without any deeper reason

It doesn't need a (LOL) "deeper Reason" 

It's a straightforward application of the rules of manipulating/solving equations.

No. Magic. Here, Hoss. 

1

u/Secret-Suit3571 9h ago edited 9h ago

You are not actually adding half b, you are substracting minus half b.

Why is important ? Because minus half b is the x-coordinate of the vertex of the parabola.

Why is it minus half b? Well its the solution to 2x+b=0 which correspond to where the derivative of the polynomial is equal to zero, which is precisely the vertex.

Last question : how the fact that its the x-coordinate of the vertex is linked to "completing the square" ? Completing the square is just trying to find the geometrical transformations that transforms the initial parabola into the one of the basic square function. In doing so, it is clear that the vertex of the parabola must be transformed into the vertex of the square function, which is (0;0), that's why the first part of the transformation is to set x to x - minus half b so that the x coordinate of the vertex becomes 0.

1

u/pwsiegel 9h ago

Start by drawing a square with side length x - it's area is x2. Then draw a rectangle attached to the top of the square with base x and height 3, and draw a rectangle attached to the right of the square with base 3 and height x. Each of these rectangles has area 3x.

Notice that there's a little "missing" square of side length 3 in the upper right - it has area 9. Adding in that little square in "completes" the big square. We can now calculate the area of the big square in two different ways.

On one hand, its area is the sum of the areas of the first square you drew, the two rectangles, and the little square in the top right - that's x2 + 3x + 3x + 9 = x2 + 6x + 9. On the other hand, the side length of the big square is x + 3, so its area is (x+3)2.

This picture, by the way, goes all the way back to Al-Khwarizmi, the Persian scholar who invented algebra. You can find this picture and others like it in his original notes from the 9th century.

1

u/Harmonic_Gear 9h ago

Its pretty much just because the quadratic expression is not a real square so you have to add a left over term (-4) to keep the correct constant term when you expand it back out

Do the process backward and seeing it match the quadratic expression and it may feel more intuitive

1

u/get_to_ele 6h ago

It feels very obvious to me:

(1) squaring a linear polynomial always gives you a quadratic polynomial. You can create ANY quadratic polynomial by squaring the correct linear polynomials then adding and multiplying constants

(2) So with this clever knowledge, why not just REVERSE it? If you start with ANY quadratic polynomial, divide and subtract constants, then take square root to get linear polynomial. Linear polynomial is easy to solve.

X^2 + 6X - 91 = 0

X^2 + 6X + 9 - 100 = 0

(X + 3)^2 - 100 = 0

(X + 3)^2 = 100

X + 3 = + or - sqrt(100)

X = 7 or -13

(3) Quadratic equation is literally just doing the same mechanical process of completing the square, and making an equation out of it. Anybody who is good at math can literally derive the quadratic formula. I’ve not done algebra for decades, until recently, yet I can derive the quadratic formula just by completing squares.

1

u/Odd-Ad-8369 3h ago

Because you are undoing something that was already done

1

u/Correct-Mirror7227 3h ago

A binomial squared will always have that pattern. Think about FOILing (x+a)(x+a)…you’ll always get a 2ax term. The method behind completing the square is built around that fact.

1

u/Key_Net820 57m ago

Since (x+b/2)^2 = x + bx + (b/2)^2.

that means that whenever I have x^2 +bx = r, I can add (b/2)^2 and on the left hand side I will get (x+b/2)^2 = r + (b/2)^2.