One of the interestingly odd things about how people understand math is numbers. It's
astonishing to see how many people don't really understand what numbers are, or what different kinds of numbers there are. It's particularly amazing to listen to people arguing
vehemently about whether certain kinds of numbers are really "real" or not.
Today I'm going to talk about two of the most basic kind of numbers: the naturals and the integers. This is sort of an advanced basics article; to explain things like natural numbers and integers, you can either write two boring sentences, or you can go a bit more formal. The formal
stuff is more fun. If you don't want to bother with that, here are the two boring sentences:
- The natural numbers (written N) are zero and the numbers that can be
written without fractions that are greater than zero.
- The integers (written Z) are all of the numbers, both larger and smaller than
zero, that can be written without fractions.
The most basic kind of number is what's called a natural number Intuitively, natural
numbers are whole numbers - no fractions - starting at zero, and going onwards towards infinity: 0, 1, 2, 3, 4, ... Computer scientists are particularly fond of natural numbers, because everything computable ultimately comes from the natural numbers.
The natural numbers are actually formally defined by something called Peano arithmetic. Peano arithmetic specifies a list of 5 rules that define the natural numbers:
- Initial value rule: 0 is a natural number.
- Successor rule: For every natural number n there is exactly one other natural number called its successor s(n).
- Predecessor rule: 0 is not the successor of any natural number. Every natural
number except zero is the successor to some other natural number, called
- Uniqueness rule: No two natural numbers have the same successor.
- Induction rule: For some statement P, P is true for all
natural numbers if:
- P is true about 0 (That is, P(0) is true)
- If you assume P is true for a natural number n (P(n) is true),
then you can prove that the P is true for the successor s(n) of
n (P(s(n)) is true).
And all of that is just a fancy way of saying: the natural numbers are numbers with no fractional
part starting at 0. We usually write N for the set of natural numbers. Most people, on first encountering the Peano rules find them pretty easy to understand, except for the last one. Induction is a tricky idea; I know that when I first saw an inductive proof, I certainly didn't get it; it had a feeling of circularity to it that I had trouble wrapping my head around. But induction is essential: the natural numbers are an infinite set - so if we want to be able to say anything about the entire set, then we need to be able to use that kind of reasoning to extend from the finite to the infinite.
To give an example of why we need induction, let's look at addition. We can define addition on the natural numbers quite easily. Addition is a function "+" from a pair of natural numbers to another natural number called their sum. Basically, we define addition using the successor rule of Peano arithmetic: m + n = 1 + (m + (n - 1)). So formally, addition is defined by the following rules:
- Commutativity: For any pair of natural numbers n and m, n + m = m + n.
- Identity: For any natural numbers n, n + 0 = 0 + n = n.
- Recursion: For any natural numbers m and n, m+s(n) = s(m+n)
The last rule is the tricky one. Just remember that this is a definition, not a procedure. So it's describing what addition means, not how to do it. The last rule works because of the Peano induction rule. Without it, how could we define what it means to add two numbers? Induction gives us a way of saying what addition means for any two natural numbers.
The integers are what you get when you extend the naturals by adding an inverse rule. Take the set of natural numbers N. In addition to the 5 Peano rules, we just need to add a definition of an additive inverse. An additive inverse of a non-zero natural number is
just a negative number. So, to get the integers, we just add these new rules:
- Additive Inverse: For any natural number n other than zero,
n, there is exactly one number -n which not a natural number,
and which called the additive inverse of n,
where n + -n = 0. We call the set of natural numbers and their additive inverses
- Inverse Uniqueness: For any two integers i and j, i is the additive inverse of
of j if and only if j is the additive inverse of i.
And that's just a fancy way of saying that the integers are all of the whole numbers - zero, the
positives, and the negatives. What's pretty neat is that if you define addition for the natural numbers, the addition of the inverse rule is enough to make addition work. And since multiplication on natural numbers is just repeated addition, that means that multiplication works for the integers too.