Today’s a very special day! We’re about to discuss some number theory! It’s important for anyone interested in mathematics to know the basics of number theory. Maybe not to the level of Fermat’s Last Theorem, but definitely enough to know Fermat’s Little Theorem (yes that’s the official name of the theorem).
There are two reasons to learn some number theory. The first is practical, there are a lot of situations where knowing modular arithmetic, some properties of relatively prime integers (numbers that share no factors), or some divisibility rules can come in handy.1 The second reason is for pure enjoyment (for a kick in the discovery one might say)! Number theory is wonderful and so much fun to learn and study! I hope to convey some of this in the next few blogs!
However, to begin we must begin at the beginning! So today, we cover something that is not the most interesting thing in the world, but we need this result to even consider modular arithmetic and therefore important!
We are going to learn about the division algorithm. It basically says you can take any two integers and divide them, DON’T DIVIDE BY ZERO THOUGH. More than that, your answer will be of the form: (Quotient) and (Remainder). In order to prove this statement, we look to well-ordering for help. If you have already read: Induction and Well-Ordering, then you are familiar with well-ordering. If not, go read that blog post first! Jk. Here’s a brief discussion that’s basically cut and pasted from there!
What are Natural Numbers? And why are they Well-ordered?
First, let’s agree on calling the set of counting numbers {1,2,3,4,…} the natural numbers and denote them by a fancy-looking N that’s almost like two N’s written on top of each other: . With that taken care of, what would happen if we took some non-empty subset of these numbers? For example, the even numbers {2,4,6,8,…}. Or, maybe {5, 120, 200}. Or, maybe just the number {10}.
Notice how all of the sets have a smallest number in them. The number 2 is the smallest even number, 5 is the smallest number in {5, 120, 200}, and 10 is the smallest number in {10}.
Challenge: Can you think of a non-empty subset of that does NOT have a smallest number?
I sure hope not, since the well-ordering principle says you can’t!
Well-Ordering: Every non-empty subset of number(s) from
contains a smallest number. Simple.
Note that some people consider 0 a natual number. We won’t, but we will denote the natural numbers with zero by . And, since is basically the same as (with zero put into the set), well-ordering still applies to .
Well-Ordering (Second Version): Every non-empty subset of number(s) from
contains a smallest number. Simple again.
The Division Algorithm (Intuition)
Do you remember wayyyy back when you learned how to divide two numbers, and your teacher wanted you to write your answer with a remainder? It’s probably been a while since you’ve done this, so let’s do two examples.
If we divide 43 by 10 we should get,
This is the same as writing,
Where we call 4 the quotient and 3 the remainder.
Now let’s use 201 and 26.
or .
Basically, you can choose any two natural numbers and and then divide them. More than this, you can always find some quotient and remainder pair such that (if you are doing ). Moreover, again, the quotient and remainder are unique (ie division problems have only one answer)!
Ok, that was a lot to take in. Let’s explain with our example using and .
Dividend = (Quotient)x(Divisor) + Remainder
43 – Dividend –
10 – Divisor –
4 – Quotient –
3 – Remainder –
Observe that the remainder 3 is such that where 10 was our divisor. Also note that the quotient must be 4 and the remainder must be 3 (if it’s in the proper range). No other quotient/remainder pair would work.
Likewise, for 201 and 26, we found . With and no other quotient/remainder other than 7 R19 will work.
This is even true for negative integers! Consider and . Then,
Observe that we still have the remainder that’s positive and less than our divisor . Note, if our divisor is negative, we would want our remainder to be in the range
If we can prove that we can divide two positive integers it makes sense that we could generalize to all integers. Thus, we aim to prove the division algorithm for positive integers. Spoiler Alert the proof relies on the well-ordering principle.
The Division Algorithm (Proof)
Ok, let’s state what we aim to show so there is no confusion:
The Division Algorithm: For all natural numbers
andthere exists two unique natural numbersandsuch that,
Where
is called the quotient andis called the remainder.
How do we prove this? Well, the only tool mentioned, so far, is the well-ordering principle. For this reason, we want to focus on subsets of natural numbers. Let’s rearrange in a way so that we only have to focus on natural numbers or zero, (ie numbers larger than or equal to 0). Since maybe we should focus on the remainder.2
Proof: (Click in the Discovery)
Let and be natural numbers. We break up our proof into two parts: (1) showing and exist with the desired properties, and (2) showing and are unique. Most of our work will be in step (1).
(1). Existence of q and r
Since we want let’s consider the set of numbers that we might get as remainders by varying in :
.
To simplify life, recall is the set of natural numbers including zero. Thus, our set is,
.
Since we are considering only when , all the numbers in are in . Therefore, is a subset of .
For example, with and our set is,
Notice how the smallest number in is the remainder in Maybe this always happens! Indeed it does! This is our aim of attack! By well-ordering (second version) we can guarantee that there is a smallest number in and it just so happens that this number is the remainder we want!
Recall, when using well-ordering, must be non-empty and a subset of . Since we already know that is a subset of , all we need to show must be non-empty by showing there is always at least one number in . Consider when . Then since is from . Therefore, we now know is always in , so the set is not empty.
We now can use the well-ordering principle (second version) to conclude there is a smallest number in . Let’s denote this minimum element by something memorable… maybe by the letter . So, for some choice of we have in . Because we are labeling this minimum number in the letter let’s also label the choice of that gives by the letter .
We now have: where is the smallest number in .
We’re almost there, we’re missing that .
Recap, we have constructed the set to be a subset of numbers from and have shown that is not empty (since is always in ). Therefore, we concluded by well-ordering that there is a smallest number in and we denoted it . So for some we have .
We claim that our choice of labeling the smallest number in by was a good thing. The reason is that, as we will prove, .
Side Note: Recall the remainder we want must be in the interval, . To show that this is the case we will use what’s called a proof by contradiction. We will assume the opposite is true (that ) and show this leads to something nonsensical.
Game plan: if was not in the range so that . This would mean is not the remainder we wanted. We will then us this to find some other in . This then contradicts that was supposed to be the smallest number in .
To this end, let and consider what happens if we changed to in the expression . Let, and we deduce:
Since is the expression with , it must be that is in the set . But then isn’t the smallest number in anymore because . This can’t happen since we chose to be the smallest number in S. Thus, it must be that just like we wanted.
(2) Uniqueness of q and r
Our game plan is to assume there are two different quotient and remainder pairs and show something nonsensical, i.e. a proof by contradiction!
Thus, assume there are numbers such that,
with and . Since we are thinking of as different numbers let’s choose to label them so that way . With some rearranging we see,
.
Recall that both so that . But is at least 1 (if then a contradiction, and therefore ) so we have,
.
So that is another contradiction! Thus,
. Concluding the proof.
And just like that, we can divide any two natural numbers and .
Closing Remarks.
Consider how important the well-ordering principle is in the proof. Remember, it was used to show that there was a smallest number in our set which was the remainder we wanted. Well ordering, thank you again for coming in clutch! Or, if you prefer induction then thank you induction (since they are equivalent)!
I know that many of you reading this are thinking, “Why did we have to go through so much work to prove something so obvious?” To that I say, I agree! This seems to be a lot of work for very little pay off.
But there is a reason.
At some point we will start to ask certain questions that end up being answered more easily by using functions or complex numbers instead of integers (just take my word for a moment). When we get to this point we will be confronted with the question, is there an analogous division algorithm for polynomials and complex numbers? If you remember polynomial or synthetic division, you might say `yes there is a division algorithm for polynomials”. You’d be correct! But what about complex numbers: and where are all integers and Can you divide and to find some and The answer is a little less obvious huh? If I gave you two specific complex numbers you might find a way to divide them, but could you guarantee that no matter which two complex numbers I gave you, you’d be able to find a way?
I’ll let you ponder if there is a division algorithm for complex numbers, I’ve left enough breadcrumbs that with some time (ok a lot of time) you might be able to convince yourself of the answer. However, you might find it hard to prove your answer.
Any who, back to getting on my soap box.
The crux of the matter is this, by proving the obvious we can develop tools and intuition for the less obvious. The tools we use and the intuition we gain are what we care about here, not necessarily the result since you probably knew how to divide before you read this article anyway.
Lastly, division algorithms show up in many places and in many forms that don’t seem like division. One of these forms is called modular arithmetic. Don’t worry if you are unfamiliar with modular arithmetic, we will cover it soon, but for those who already know modular arithmetic, saying 23 is congruent to 2 (mod 3) is the same thing as saying that 23 has a remainder of 2 when divided by 3.
Remainders are important huh!
Footnote:
- For a concrete example, the standard proof for the irrationality of
uses Euclid’s Lemma, which deals with divisibility. Or, if you know a little group theory one can show thatif and only if. And to understand the proof it helps to know about relatively prime numbers. ↩︎ - We will be using some set notation in the following proof and since this is the first part of our number theory journey together, here are the fundamentals:
(i) A set is a collection of elements, in our case numbers, and is denoted by curly brackets. For example,and
(ii) When we want to say that a number is in a set, we will denote this by the Greek letter epsilonwhich means ‘is an element of’ or ‘is in the set’. Thus,translates to 1 is in the setbut since 5 isn’t in this set we would writewhich translates to 5 is not in the set
(iii) If our set is described by a rule, we have a more efficient way to denote this set than just listing its elements. For example, the set of all even numbers could be written aswhich is fine for a rule that is this easy to communicate. However, when the rule gets more complicated, we want a more efficient way to write it. What we will do is write any of the following,
We would read the above set as the set of numbers n such that n is equal to 2k where k is in the set of natural numbers. Or the set consisting of numbers n where n=2k and k is a natural number. More often than not, you can read the colon : or the vertical line | in the set as the words such that.
For one final example, consider the set
is the set of numbers 2n+1 where n is a natural number greater than 10. To find some of it’s elements we simply plug in some values for n fromthat are larger than 10. The first few numbers in this set are,↩︎

Leave a reply to Newbie Number Theory (Part 5): Modular Arithmetic – A Kick in the Discovery Cancel reply