Skip to content

Instantly share code, notes, and snippets.

@eeriemyxi
Last active February 1, 2024 20:57
Show Gist options
  • Save eeriemyxi/b4d70013045f0e448310ff5a2fb33398 to your computer and use it in GitHub Desktop.
Save eeriemyxi/b4d70013045f0e448310ff5a2fb33398 to your computer and use it in GitHub Desktop.
Math is Really Cool

Math is Really Cool

I've recently begun reading a book. It's about number theory and the title is "A Friendly Introduction to Number Theory" by Joseph H. Silverman. I have only begun reading the first few pages and I already think differently about mathematics!

I think my background is of importance if I'd want to explain how this sudden change happened, as the issue was nothing very personal. I am from a third world country, and my school life has never been great, but I guess that's true for most people considering how schools nowadays are. Mathematics, to me always felt like something very logical, but figuring out the logical resultant was never fun to me, because I couldn't connect the dots myself; I could only ever know how and why I would connect the dots the way the textbook intended. My school never felt the want to adhere in me the traits to link the dots by myself either.

After ten years in school like this, I had some ideas as to how to tackle this issue of mine myself. One was to fully understand the fundamentals. So I tried reading my textbooks from former school years, but it hardly really helped... I was scoring better on papers, but I never truly found it fun doing it. It was slightly more exciting, sure, but not very fun. I was demotivated by this; I then conjectured that mathematics just isn't my thing and I should embrace the thought.

Then I started embracing my circum- No... I started pretending to be embracing my circumstances: I don't think I ever embraced this thought deeply that I just sucked at mathematics: there was a part of me that still was yearning to make it fun. I then started reading external books, eventually grabbed one on number theory -- the book I discussed about in the first paragraph.

This book had some cool ways to look at mathematical things. I never actually got to know about triangular numbers until I read this book. Triangular numbers were numbers which can form a triangle if you assume the triangular number x as x number of cells. Even if I had heard about square numbers, my school textbooks only ever described it algebraically. This book manifested in me new ways of looking at square and triangular numbers, they are geometrically just box and triangles. This may seem like common sense to a large group of people who know geometry, but my ken when it is about geometry was at best only piteous thus far.

So, four geometrically is:

. .
. .

... And three geometrically is:

 .
. .

Two years ago, I first learned about Gauss' formula, (n(n + 1)) / 2, from my school's textbook. Their explaination was based on arithmetic progression. However this book took a wonderful approach to explaining it. It was a very meaningful geometric approach. If you calculate the first few triangular numbers, you get, 1, 3, 6, 9 and so on... If you try to find a pattern, you end up with 1 + 2 = 3, 1 + 2 + 3 = 6, and so on. You can see the pattern. But have you ever wondered what would happen if we add two triangles together?

So,

.
. .

And,

. .
  .

If we pair them together, we get,

.. . 
. ..

Something like that. ASCII art is limited, so that's the best I could do. Sorry about that!

Mathematically, it is, (1 + 2) + (1 + 2) = 6, then (1 + 2 + 3) + (1 + 2 + 3) = 12, and so on...

If we want to create a square out of two triangles, pairing the two triangles won't be a square unless we overlap the two. Now, what if we add a diagonal here? We don't want to overlap them because it's no fun that way, so we will add a diagonal.

. . .
. . .
. . .

If we add a diagonal that is one cell larger than largest side of the two triangles, we get a square. It consists of:

.
. .
  . .
    .
.
 .
  .

Mathematically, it is (1 + 2) + (1 + 2) + 3 = 9, (1 + 2 + 3) + (1 + 2 + 3) + 4 = 16, ... We got squares of three and four. Adding a diagonal (n + 1) cells long than the largest side with n cells of two congruent triangles makes a square. We can derive an equation from this information: (1 + 2 + 3 + ... + (n - 1)) * 2 + n = n^2. Or (1 + 2 + 3 + ... + n) * 2 + (n + 1) = (n + 1)^2.

If we focus on (1 + 2 + 3 + ... + n) * 2 + (n + 1) = (n + 1)^2 equation, we get to see (1 + 2 + 3 + ... + n) which is what Gauss' formula does, right? That means we can derive that formula if we solve for that:

(1 + 2 + 3 + ... + n) * 2 + (n + 1) = (n + 1)^2
(1 + 2 + 3 + ... + n) * 2 = (n + 1)^2 - (n + 1)
(1 + 2 + 3 + ... + n) = [(n + 1)^2 - (n + 1)] / 2

There it is. If n = 5, we should get fifteen as (1 + 2 + 3 + 4 + 5) = 15. [(5 + 1)^2 - (5 + 1)] / 2 = (6^2 - 6) / 2 = (36 - 6) / 2 = 30 / 2 = 15. There you have it. If we simplify our equation, we will get (n * (n + 1)) / 2.

This explanation was so fun! I could connect all the dots!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment