The Summing of Squares

Caco Peguero
7 min readApr 26, 2022

Insights from the number line

*******************************************************************If you’ve found yourself here, Hello!👋🏾 This article is a part of an ongoing series where I track my progress as I build an understanding of contemporary mathematics. Disclaimer, I’m a designer without a background in maths or physics but like to learn for fun . You can find the previous articles below.
*******************************************************************

📝🖼
Papers & Pictures Season : 1

Episode : 1 : The Difference Between Squares
Episode : 2 : The Summing Squares
Episode : 3 : Find π For Yourself
Episode : 4 : …Another Slice of π : Pi Part-2

******************************************************************
😴 TL;DR 🥱

The sum of two squares is a² + b². We can define a=n and b=n+m giving us
(n)² + (n + m)². Expanding and rearranging we get 2n(n + m) + m² ; written with our initial variables we get 2ab+(b-a)² . We’ll keep b - a = m getting us :
2ab+m²

We can use this and substitute a portion of The Law of Cosines
c² = a² + b² - 2ab (cos θ).

We replace a²+b² with 2ab + m² and get :
2ab - 2ab(cos θ) + m²

Factoring out 2ab we arrive at an alternative equation for The Law of Cosines :
😉 2ab(1 - cos θ) + m²

😪 TL;DR 🙄
*******************************************************************

PREVIOUSLY ON INSIGHTS FROM THE NUMBER LINE
If we have variables a and b
We can make them equal to other variables.
Like having other names for the same thing, soda, pop, coke, fizzy drink drink etc…🥤
We can set a = n & b=n+m. This means that m=b - n
We can take the formula b² - a² and substitute variables to get (n+m)² - n²
With a little algebra we find the equation m(2n+m)

🎉 So we can equate b² - a² = m(2n+m) 🎉
If you find this a little confusing it might be worth going back to
The Difference of Squares

So then what happens if we flip the sign from minus to plus?
👽 This gives us a formula that we’re probably aquainted with. 🤖
b²+a²

Humans have known about this relationship for a while 😎. The formula a²+b² = c² was known to the babylonians and recorded on clay tablets in cuneiform around 2000–1900 BCE. ◣ It feels kind of fun to be playing around with an equation that has this much history.📜

The Plimpton 322 clay tablet, with numbers written in cuneiform script.
The Plimpton Tablet

If we take a²+b² and replace the variables a and b with n and m, like we’ve done before 🥤, we get the equation n²+(n+m)²

Expand (n+m)² we find n²+2nm+m²

Plugging this back in we get that :
n²+n²+2nm+m²
to simplify we add the n² together and we get:
2n(n+m)+m²
🤪 To be quite honest it looks more complicated than before, lol 😄. Since changing variables got us here let’s change back and see what we get.

So now 2n(n+m)+m² turns into 2ab+(b-a)² . 💪 Since the equations are made up of the same variables we’re going to write it where we remove the parenthesis since they make things messy. That leaves us with b²+a²=2ab+m²

But before we celebrate our accomplishment let’s test this out to see if

Nice! so it does work after all! Now we can celebrate! 🥳

At this point I have to remind the reader, that when I took maths in high school I only did ok 🙃. I remember having to learn the trigonometry and the Pythagorean theorem but we never got to the part of the book 📕that talked about tHe LAw Of CoSinEs. I say this as a reminder to go back to things, because maybe the first time around I might not have gotten to that part of the book!📚

So what is The Law of Cosines? Generally speaking it’s another formula about triangles. If you take b²+a² and made it work with all triangles. Not just 90 degree triangles.

This is the formula : b² + a² - 2abcosθ 👈🏾 . It looks complicated because of the cosθ but if we remember that what we’re doing is adding, subtracting and multiplying numbers in a 🍲 recipe and formulas are like recipes .(🔥I’ve been watching that new Julia Childs show, lol🔥). Cos stands for Cosine and is a recipe that takes in a number θ, pronounced theta, and spits out a value between -1 and 1. The number θ defines how far you have walked on the outside of a circle. It can go from 0 to 2π and can also be represented in degrees.

What’s cool about cosine is that it can spit out a number for all possible values of θ , and the number it spits out is related to where we could be if we projected down to the x-axis. So now that we have a better understanding let’s see how to use the formula for The Law of Cosines.

The only way to get better at this stuff is to practice it. We can make it a bit easy for ourselves at first thought. We’re going to say that a=b=1 and that θ=π/3. We’re also going to solve part of the equation at a time.
: We know that 1²=1
: So b² + a² = 1² + 1² = 1 + 1 = 2.
: We also know that 1x1=1 and anything multiplied by 1 is just itself.
: So 2ab=2x1x1=2.
: A quick search on the internet for cos(π/3) tells us that it is equal to 1/2.
: Putting everything together we get 2 - 2(1/2) = 1

Let’s see what happens if we compare our equation: 2ab+m² with The Law of Cosines: b²+a²-2abcosθ.
: 2ab+m² = b²+a² so we can substitute those.
: 2ab+m-2abcosθ
: 2ab and 2abcosθ have similar factors so we can factor out 2ab
: 2ab(1-cosθ) + m²

So it looks like we’ve found an alternative equation! Let’s test it out using the same numbers as before to see if it works. a=b=1 , θ = π/3.
Solving the equation 2ab(1-cosθ) + m² in parts.
: 2ab = 2 x 1 x 1 = 2
: cos(π/3) = 1/2
: 1 - 1/2 = 1/2
: m = b - a = 1 - 1 = 0
: If we plug everything we get
: 2 x 1/2 + 0² = 1

It does in fact work! So we can now say with confidence that :

2ab(1-cosθ) + m² = b²+a²-2abcosθ

DRAWING OF THE RELATIONSHIP BETWEEN

If you’ve made it this far GREAT JOB! You might be thinking to yourself “What’s the point of playing around with all these symbols.” Formulas have shapes and shapes have formulas. It’s kind of like trying to look at something from a different angle.

And really, The Law of Cosines sounds way heavier than it should. If we draw an angle down we can create another 90 degree triangle and solve for the long side with our equation 2ab+m² . Really all of these Laws and Theorems and Proofs Oh My 😱 are just recipes for answering specific questions.

It’s helpful to remember that formulas have forms and visa versa. Another way to say this is that shapes have equations and equations have shapes. Drawing the triangles ▲ created by these equations helps us see the whole picture.

We can recognize our friend, the right angle triangle, was hiding there the whole time! 😎 .

I’m new to writing about maths so any feedback would be appreciated! If you’ve managed to get to this far the next article will be a bit of a pay off to all of these triangles.

Till next time.

*******************************************************************

Previous Article
👈🏾 The Difference Between Squares

Next Article
Find π For Yourself 👉🏾

*******************************************************************🔗 Links to Stuff 🔗

Babylonian Square Root of 2 Tablet|
Babylonian Mud Wall Tablet
Plimpton Table
Law of Cosines
Sine and Cosine

--

--