top of page

Number Theory

Updated: Sep 19, 2022

"The basis of the Universe"

Bust of Pythagoras
Bust of Pythagoras

​Pythagoreans, followers of the ancient Greek Philosopher Pythagoras, who lived from approximately 580 to 500 B.C., believed Rational numbers to be the basis of the universe. This is in line with Pythagoras' proposal that rational numbers governed architectural beauty, the path of the stars and the laws of musical harmony (Klutch & Bumby, 1978).

The question then is what are these rational numbers?

A simple and not so accurate definition would be that a Rational number is a number that can be written as a fraction. We'll define Rational numbers properly in short order but we'll also need to define other number types, as not all numbers are Rational.

Understandably, the discovery of numbers that fail to be rational upset the Pythagoreans. However, in order to gain a proper understanding of number types, we will need to define these "Irrational numbers" that have succeeded in filling gaps in the number line Pythagoras' Rational numbers could not fill.

"Filling the Number Line"

Let's try defining each number type using a Number line (a line where numbers are marked off at intervals).

We can start by drawing our number line from 1 and counting upwards as shown below:

Natural numbers from counting from 1 to 11 on a number line
Natural numbers on a Number line

The number type represented above would be Natural or counting numbers. While the listed numbers stop at 11 in our diagram they continue forever getting larger. To conserve on space we use an arrow pointing right to suggest that counting continues.

This observation provides an important rule of thumb, which is numbers get larger in value as you move to the right of a number line.

We do a very similar thing when expressing these counting numbers using only numbers, by adding the ellipsis symbol of 3 dots (...) to the end of the list:

So the Counting or Natural numbers on the number line above could also be written as:

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ...

Where the 3 dot ellipsis symbol suggests that the remaining numbers in this sequence do not need to be written as the trend is understood. Going forward the Ellipsis symbol in the written form of our set of numbers will be taken to mean the same thing as the arrowhead on the end of our Number line.

So the group/set of Natural numbers can be written as shown below:

Set of Natural numbers N = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ...}
Set of Natural numbers

The number line we've discussed thus far is limited and doesn't account for all the numbers we encounter in everyday life. The following sections should help us with filling in the number line.

Much Ado about Zero

Surprisingly Pythagoras' theorem may have predated a concept of zero in Mathematics. According to Dantzig & Mazur (2007), the ancient Greeks believed in the concrete and demonstrable and so they couldn't think of the concept of "nothing" as a number or worse yet, give it a symbol.

However, zero was introduced not as a representation of "nothing" but as a placeholder in commerce. For example, in expressing 6 thousands and 7 tens the zeros allow for the identification of each value due to its position in the number (place value) and we can write this number as a result of having the symbol for zero as 6 thousands, no hundreds, 7 tens and no units or simply as 6070.

The addition of this zero to our Natural numbers gives us the set of numbers we call, Whole numbers.

Set of Whole numbers N = {0, 1, 2, 3, 4, 5, 6 ...}
Set of Whole numbers

The number line for Whole numbers appears as shown below:

Whole numbers from counting from 0 to 6 on a number line
Whole numbers on a Number line

So was there much ado about zero?

Well, understandably early number systems had their basis in counting, which starts with 1. According to Dantzig & Mazur (2007), the correlation between number systems and how ancient man likely counted is further emphasized by the bases of ancient number systems and even the decimal system (base 10) we use today. For example, Roman numerals have a base 5 (quinary) nature to their symbols as it may have been common to count with the fingers of one hand and we could argue the decimal system (base 10) is directly linked with the tendency to count with the fingers on both hands.

The issue arose with the Abacists, so-called for their use of ancient counting tools such as the Abacus, who defended old traditions and resisted the introduction of zero. They clashed with the Algorists, who embraced not only zero but positional numeration (place values) for the compactness and the improvements these concepts provided in calculation. Shockingly, this disagreement lasted 400 years, including the banning of the Arabic sifr (zero) and positional value calculation from official documents. However, by the 16th-century Algorists, zero and positional value numeration were victorious with the Abacists all but fading into obscurity by the 17th century.

Hippasus: The first known Troll... cancelled?!

The Abacists 400-year dispute with the Algorists may seem overblown but we need to understand that what the Algorists proposed would change the way numbers were perceived

Hippasus after being thrown overboard by the disciples of Pythagoras for arguing that irrational numbers exist
Hippasus thrown overboard

and calculations done. History shows that every great change is met with great opposition. To be fair, the Pythagoreans had a history of over-reacting if Clegg(2004) is to be believed. In today's society, if there is consensus on anything posted on social media there is at least one person that goes out of their way to disagree. We call them trolls and Hippasus may just have been the very first troll.

The story goes that around 520 BC off the coast of Greece, Hippasus was thrown overboard for revealing the existence of a number that isn't rational. The existence of these "Irrational" numbers means we have a lot of work to do filling in our number line.

Let's start by re-defining what a Rational number is so we can understand what it means when a number is Irrational. We started with a fast and loose definition of Rational numbers as numbers that can be written as fractions, but we can add to that by saying that they have decimal forms that either terminate or repeat.

Examples of Rational numbers that have decimal forms that terminate or repeat in pattern are shown below:

Rational numbers whose decimal form terminate or stop. Three tenth or 0.3 and one half or 0.5
Examples of Rational numbers

Rational numbers whose decimal form repeats. One third and five eleventh.
Examples of Rational numbers

Irrational numbers like the one that Hippasus discovered have decimal forms which neither terminate nor repeat. Below is the Irrational number that prompted Hippasus' burial at sea:

Square root of 2 = 1.414213562373095...
Hippasus' Irrational number

This number's decimal form neither terminates nor does it repeat and so the number can be declared Irrational. Since Rational numbers by definition can be written as fractions then Irrational numbers must also be seen to be numbers that cannot be expressed as fractions.

We can represent the group or set of Rational and Irrational numbers as shown below:

The set of Rational numbers as terms whose decimal form neither terminates nor repeats
Set of Rational numbers

The set of Irrational numbers as terms that aren't Rational
Set of Irrational numbers

We've spoken about zero being the difference between Natural/Counting numbers and Whole numbers. Are Rational numbers and Irrational numbers all greater than zero? The short answer is no. However, this journey is not about short answers, so we'll need to take another dive into Math History to get a better understanding of what is less than zero.

"What is less than Zero"

We just discussed a 400-year disagreement, in part over the existence and use of the Arabic sifr or zero in mathematical models. The progression of our topics might give the impression that the concept of negative numbers would follow the acceptance of zero in the 16th century. However, Rogers (2008) explains that the Indian mathematician Brahmagupta proposed the rules that would govern negative numbers in the 7th century, well before the idea of zero was "fully accepted". Fully accepted in quotations because by the time Brahmagupta used negatives to represent "debts" and positives to represent what he called "fortunes" in around 620 CE, place values and zero were already being used in the Indian number system.

While the idea of negative numbers was far from new, acceptance would grow with practical application of negatives in the area of double-entry bookkeeping by the Franciscan Friar Luca Pacioli in the 15th century. In fact, English Mathematician John Wallis helped legitimize and give meaning to negative numbers by adding them to the number line as recently as the 17th century.

We can represent the group or set of Integers as shown below:

The set of Integers
Set of Integers

John Wallis' number line with negative numbers hints at a very important attribute of negative numbers, being that the larger a negative number is numerically, the smaller it is in value. You may be asking what that means, so let's explain using the set of integers above. The first thing to establish is the general rule of a number line which is, numbers get larger in value as you move to the right of the number line. This means numbers conversely, get smaller in value as you move to the left of the number line. So from our set of written integers, -4 is less -3, -3 is less than -2, -2 is less than -1 and we can say all negative numbers are less than zero.

Some other important observations that can be made about the negative numbers on our number line are listed below:

  • This follows naturally if we think of negatives in the context in which they were originally used, which is as debt. If positive numbers represented your countable fortune in the sense that the Indian Mathematician, Brahmagupta envisioned, then negatives are less than zero. Your debts must be taken from any value in your possession/balance, even if that value is zero.

  • Zero is neither positive nor negative.

  • Each positive number has a numerical negative equivalent, so while they are not equal as you can see from the number line, they are equally distant from zero. So positive 4 is 4 units/ones greater than or away from zero while negative 4 is 4 units/ones less than or away from zero, but in the opposite direction.

  • As Mathematicians we'll tend towards not writing things that are understood. You'll find that in Algebra later where we simply say x instead of 1x (read "one x") because the 1 is understood. It's similar to conventions in the English language of not being redundant. That is, in English we don't say "I have one phone", we instead say "I have a phone". With Integers, then you won't always see a positive (+) sign in front of positive numbers, because if no sign is seen the number is understood to be positive. So is writing the positive sign incorrect? No, but it is seen as a bit redundant unless writing the sign of quality improves the readability of your mathematical statement.

  • The language is important when referring to negative numbers. We don't want to use the same words for the sign of quality and the operation as that can lead to a bit of confusion in the long term. So we need to avoid saying "minus minus 2" for example and instead say "subtracting/minus negative 2".

I know for some, this lengthy explanation of negative numbers may seem unnecessary, however, this topic is a pain point for many. This one thing I hope this blog will do is normalizing asking "why?" and allowing people to admit what they need to work on as Mathematicians. To this end, I'd like to share a story originally reported by the Manchester Evening News (Leeming, 2007).

The Camelot Group have been operators of the UK National Lottery since 1994 and below is a ticket from one of the lottery's scratch games called "Cool Cash".

The winning temperature on this ticket is -8 but the listed temperatures on the ticket are -4, -6, -7 and -7 for rows 1 through 4 respectively.
Cool Cash Lottery Ticket

What does this have to do with negative numbers?

The "Cool Cash" lottery game had to be withdrawn by Camelot in 2007 because players couldn't figure out whether they had won or lost.

The rules of the "Cool Cash" scratch game:

To win players had to scratch a window to reveal a temperature lower than the temperature displayed on each card. It's important to note that the game had a winter theme and so temperatures were below freezing (negative).

The problem came with comparing negative numbers and Camelot received dozens of complaints from players that couldn't understand how, for example, -7 is a higher temperature than -8.

In one particular case, Tina Farrell, from Levenshulme, called Camelot when she was confused as to why she hadn't won with several cards. The 23-year-old who'd left school without passing GCSE maths, said:

​“On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn’t. I phoned Camelot and they fobbed me off with some story that -6 is higher, not lower, than -8 but I’m not having it."

The problem Tina may have had is simply the use of the term "lower temperature". Lower of course is associated with less and so she seems to have had difficulties differentiating between numbers being numerically lower as opposed to numbers being lower in value.

So when comparing -6 and -8 the 6 is numerically smaller than 8 but the temperature -6 is closer to zero than -8 and so -6 is more positive than -8 and therefore -6 is the larger number. If Tina had scratched a -13 then she would have had a winning card as -13 is further from 0 than -8, so -13 is colder and therefore lower than -8.

Thermometers show that -8 is literally below -6 degrees
Thermometer showing 6 degrees below zero vs 8 degrees below zero

"Is there a number that multiplies itself to give -1?"

We have yet to speak about the squares of numbers, let alone the square roots of numbers but even a passing understanding of these operations is necessary for us to properly discuss the idea of Imaginary numbers. By now, however, the hope is that you will have realized that while this discourse will follow the syllabus or topics as they are laid out in any secondary Mathematics textbook, this trajectory does not mirror the actual progression and development of ideas in Math history.

No path of proper discovery is linear, exploration by definition requires you to deviate from the beaten path and Mathematics is no different. This for me is the true beauty of the subject beyond ironclad rules and prescribed steps to some answer, I've always wanted to hear about the stories behind the discoveries. The human, fallible and at some points scandalous stories behind the neat and tidy questions and answers that are associated with our subject.

Fittingly, this next digression from negative numbers leads down the path of the imaginary. Dantzig & Mazur (2007) introduce us to Imaginary numbers via this quote from Brahmin Bhaskara II in the twelfth century:

“The square of a positive number, as also that of a negative number, is positive; and the square root of a positive number is twofold, positive and negative; there is no square root of a negative number, for a negative number is not a square.”

Bhāskara II the Indian Mathematician and Astronomer
Bhāskara II

Bhāskara II has succinctly made observations you may have made when speaking about the squares and square roots of numbers. That is, the product of two positive numbers is positive and the product of two negative numbers is also positive.

Take, for example, the fact that 16 which is the product of 4 and 4 otherwise known as the square of 4 and 16 is also the product of -4 and -4 or the square of -4.

This means that 16 has two square roots of numbers that multiply themselves to give the product 16, in 4 and -4.

We can see this relationship below:

The binary nature of the square root of positive numbers

Consider the question below, what is the square root of -1?

This question can be rewritten, "Is there a number that when multiplied by itself gives -1?."

The short answer, as Bhāskara II alluded to, is simply that there is no real number that will multiply itself (be squared) to give a product -1. It would take over 300 years before the Italian Mathematician, Girolamo Cardan0 in 1545 would even be credited with being the first to use a symbol to denote the square root of a negative number. However, Mathematics wouldn't take its next step forward with this number type until the 18th century (over 500 years after Bhāskara II's proclamation and in excess of 200 years after Cardano's symbol) where the square root of negative one (-1) was given it's now commonly used notation of i (read iota) by Leonhard Euler (O'Connor & Robertson, 1998).

As shown below the square root of -1 is i (read as iota), which means when i is squared it equals -1:

i the imaginary number is equal to the square root of -1
i (iota)

We will definitely revisit imaginary numbers in more detail in the CAPE portion of our journey so we'll temporarily close this chapter by saying that imaginary numbers tend to take the form of a number multiplying i.

Examples of imaginary numbers may be i, 2i and 10i.

"As if numbers weren't Complex enough!"

As if numbers weren't complex enough, Dantzig & Mazur (2007) explain that Leibniz compares complex numbers to amphibians in that there is a duality to complex numbers, they exist between a state of "being and not being".

That is a complex number is a sum of a real number and one of the imaginary numbers we discussed earlier. An example of a complex number would be:

2+3i as an example of a complex number

Imaginary numbers and complex numbers with an imaginary component can't be added to our number line. So are there complex numbers without an imaginary portion? In a manner of speaking. Consider the complex number 2 + 0i. Since 0 multiplies any term to give 0 then 2 + 0i = 2, and 2 of course can be found on the number line and is as such a Real number.

We'll delve more deeply into both imaginary and complex numbers in our CAPE course, but for now, let's take an overarching view of the number types we've discussed to this point to see summarize how they are related.

All numbers

To this point, we've spoken about numbers with respect to those that can be represented on our number line as opposed to those that cannot. We alluded to Real numbers as being those that can be located on a number line while Imaginary numbers cannot be found on a number line because they contain the square root of a negative number.

The interactive Number type tree below allows you to explore the relations between different number types. Filled circles/nodes show those Number types that contain other Number types while empty circles show those Number types that don't contain any other number types. Instructions: Clicking blue nodes expands those nodes to show more number types.

Interactive Number Type Collapsible Tree Diagram

We've done a lot to this point to ground our major number types in history so to ensure we have a point where we can quickly reflect on these number types before moving on to number sub-types, a brief definition of each is shown below:

Real Numbers

Any numbers that can be located on a number line. Real numbers can be considered as the combination of the sets of Rational and Irrational numbers.

​Any number expressed in terms of the root of a negative number can be said to be imaginary.

Are a special type of imaginary number created by combining a real number with an Imaginary number, for example, 2 + 3i.

Rational Numbers

Any number that can be expressed as a fraction and whose decimal form either terminates or repeats.

Irrational Numbers

​Numbers that cannot be expressed exactly as fractions and so their decimal form neither terminates nor repeats.


​In the strictest terms, if a fraction is a part of a whole then Integers are non-fractional. A better way to think of them would be fractions that have denominators of 1, or multiples of a whole. Integers, can be positive, negative or zero.

Whole Numbers

​All counting numbers and zero.

Natural Numbers

​Counting numbers.

Female numbers?

This blog has already established that numbers are ancient concepts and so the ideas that surround their origins are equally antiquated. That was my disclaimer.. ok let's get into it.

Parrish(2016) explains that according to British Author Alex Bellos, our friend Pythagoras believed that even numbers are feminine and that odd numbers are masculine. What was Pythagoras' rationale?

Well, rationale is a strong word, but the idea was that even numbers can be split into two equal parts and that this was a sign of weakness. While the indivisibility of odd numbers, represented a resistance to being split and therefore strength. This section could have been titled, Pythagoras and the Red Pill, since he believed odd numbers, masculine and thus, the master over even numbers. Bellos went a step further to assert that this wasn't uncommon for the period as he drew a parallels to Christianity, with Adam being first with Eve second and Eve being associated with sin.

So Even numbers are those that can be split into two equal parts and so are divisible by 2. It's important then to ackwoledge that Zero is even because it is divisible by two.

Even and Odd Numbers

The Seive of Eratosthenes

The Sieve of Eratosthenes
The Sieve of Eratosthenes

What are we looking at here? As the sections title suggests, this is Eratosthenes' Sieve and it at aglance shows all 25 prime numbers less than 100.

More importantly ... what are Prime numbers?

Prime numbers are numbers that have only 2 factors. Since a number is always a factor itself then those two factors will be 1 and the number itself.

Follow up question, then is 1 prime?

Since prime numbers have 2 factors then 1 can't be prime. This makes 2 not only the only even prime number but it is also the first prime number and explains why the first step in completing the Sieve of Eratosthenes is always to mark out or eliminate 1.

The Transum website has an excellent interactive version of the Seive that walks you through the process of identifying the prime numbers less than 100 and I've linked it below: Transum's Sieve of Eratosthenes

You can also check out an infuriating but good game on the Transum site called the Prime square game linked below:

Another important characteristic of prime numbers is that any non-prime number can be expressed as a product of prime numbers. These non-prime numbers have a name and they are more commonly referred to as Composite numbers.

An example, of the factorization or decomposition of a composite number into prime factors is shown below:

Prime factor tree of 216
Prime factor tree of 216

Based on the prime factorization above we can see that 216 can be expressed as a product of primes. That is,

216 is equal to 2 times 2 times 2 times 3 times 3 times 3

For more practice factorizing primes I'll link two more great exercises from John at Transum below:

The Number Divisibility Rules

In order to identify our Prime or Composite numbers we need to know what numbers divide other numbers. We can do this at a glance for some numbers using the divisibility rules listed below:

Numbers ​Divisible by

​Obey this rule


​Ends in an even number.


Sum of all digits in the number is a multiple of 3.

For example, 24 is divisible by 3 as 2+4=6 and 6 is divisible by 3.


Last 2 digits form a number that is divisible by 4.

For example, 824 is divisible by 4 and we can see this because the last two digits form the number 24, and 24 is divisible by 4.


Ends in 5 or 0.


Obeys both the disibility rules for 2 and 3 at the same time.

4320 is divisible by 6 because it is divisible by both 2 and 3. We can see it is divisible by 2 as it ends in an even number (0). We know it is divisible by 3 because 4+3+2+0=9 (which is a multiple of 3).


Double the last digit and subtract it from the rest of the number and the difference is divisible by 7. This can be done repeatedly.

343 is divisible by 7 because 34-6=28 and 28 is divisble by 7.


The last 3 digits form a umber that is divisible by 8.

2160 is divisible by 8 because 160 is divisible by 8.


Sum of all the digits in the number is a multiple of 9.

5103 is divisible by 9 because 5+1+0+3= 9 which is a multiple of 9.


Ends in 0

Triangular and Square numbers

The last classifications of numbers we'll address are triangular and square numbers. Dantzig & Mazur (2007) describe these number types as having a basis in geometry and so triangular numbers can be used to make triangles, while square numbers can be used to make squares.

First 5 Triangular Numbers: 1, 3, 6, 10, 15
Triangular Numbers

From the diagram above we can see that the first set of triangular numbers are 1, 3, 6, 10 and 15. From the Geometric perspective, these are the number of dots (in the case of our diagram) that would be needed to create a triangle with equal sides (an equilateral triangle). The formulaic approach would involve recognizing a pattern and one that we can use is that the nth triangular number being the sum of the first n consecutive positive integers.

nth ​Triangular number

Value (sum of consecutive positive integers)











We can almost envision ancient peoples making these associations between geometric shapes and the numbers needed to form these shapes. Square numbers as such, are those that geometrically, literally form squares and explains our modern use of the term 'the square of a number' to represent a number multiplying itself.

The first 5 square numbers: 1, 4, 9, 16 and 25
Square numbers

From the diagram above we see that the first 5 square numbers are 1, 4, 9, 16 and 25. Which makes sense because:

Let's wrap up this jaunt through the history of Number theory where we began with the Pythagoreans. They also made an observation about the relationship between Square numbers and triangular numbers. They believed that a Square number was equal to the sum of the Triangular number in that position and the one before it.

Triangular numbers

​Square numbers











So many stories were left undiscussed but the idea behind this blog is to pique your interesting and get you reading. Math is more than numbers and my hope was to convey that in what I hope was a cohesive narrative. I've linked my reading materials below and I hope you take the time to discover the people and ideas behind the numbers.


Glossary of Terms


​A member of the highest ranking social class in Hindu India. The original members of this group were priests with the primary duty of praying and meditating to Gods and they were respected for their intellect.


Current Era means Current Era and is the scientific equivalent of Anno Domini or AD.


​General Certificate of Secondary Education describes an academic qualification at the High School level in a particular subject.

​Sign of quality

​The positive (+) or negative (-) signs that precede a number and indicate whether the number is positive or negative respectively.


Bhāskara II. Alchetron, Accessed 7 March. 2022

Hippasus Thrown Overboard. This North Eastern Life, Accessed 4 Feb. 2022.

Cool Cash Lottery. South Shields Sanddancers Forum, Ticket. Accessed 24 Feb. 2022.

The Sieve of Eratosthenes. Number: The language of science.

Please note:

All uncited images were either purchased or personal creations.

Works Cited

Clegg, B. (2004). The Dangerous Ratio. NRICH.

Dantzig, T., & Mazur, J. (2007). Number: The language of science. Penguin.

Hayes, S. (2015, march 05). Even and Odd. Origins of Mathematics.

Interactive Number Type Collapsible Tree Diagram is an edited code snippet referenced from and is a part of the opensource initiative under the MIT License:

d3noob (2019) Block 1a96af738c89b88723eb63456beb6510 [Source code].

Klutch, R., & Bumby, D. R. (1978). Mathematics: A Topical Approach: Course 1. CE Merrill.

Leeming, C. (2007, November 10). 'Cool Cash' card confusion. Manchester Evening News.

O'Connor, J. J., & Robertson, E. F. (1998). MacTutor. Biographies.

Parrish, S. (2016, October 03). Alex bellos: Every Number Tells a Story. Numeracy.

Wu, H. (2008). Fractions, decimals, and rational numbers. Berkeley, CA: Author.

36 views0 comments
bottom of page