During my self-study of pure mathematics, I have long wanted to write about how number systems such as the natural numbers , the integers , the rational numbers , and the real numbers are constructed, and particularly how they relate to one another.
One thing I find elegant about mathematics is that familiar rules can be built from a few simple assumptions. For example, why is true? Most of us learned to use the distributive law at school; here, I want to see how we can eventually prove it from definitions.
Most of this note follows Terence Tao’s Analysis I
To read this note, pretend to forget what you know about negative numbers and subtraction. Those ideas do not exist yet. If we use them to construct the integers, we will have argued in a circle.
1. Natural Numbers
1.1. The Peano Axioms
The natural numbers will be our starting point. We are not constructing them out of absolutely nothing: words such as “set,” “object,” and “operation” already belong to the surrounding mathematics. What we can do is state the properties we need and then refuse to use any arithmetic rule until we have defined or proved it.
To describe counting, we begin with a distinguished object and a successor operation . The axioms below tell us how they behave. They are usually called the Peano axioms.
Axiom 1.1. is a natural number Some books begin at instead. This is a convention. In this note, because it is our starting object and will be the base case for recursive definitions..
Axiom 1.2.If is a natural number, then is a natural number. We call the successor of —intuitively, the next number after .
Definition 1.3: Numerals.We define , , , and so on. These symbols name the objects reached by finitely many applications of .
The first two axioms let us produce:
but they do not yet say that these are all the objects in our system. That distinction is important: closure under successor is not the same as saying that every object is generated from . For example, what if we can sneak into our system?
To make sure these tiny axioms are already doing something, try proving the next statement before opening the proof. At this point we are allowed to use only the two axioms and the definition above—no smuggling ordinary arithmetic through the back door!
Lemma (Example 1.4). is a natural number.
By Definition 1.3, . Axiom 1.1 says that is a natural number. Applying Axiom 1.2 three times tells us that , then , and finally are natural numbers. Therefore, is a natural number.
However, the first two axioms are not enough. Consider the system with
It satisfies both axioms, but after reaching it wraps around to . That is not the counting system we want, so we need another axiom.
Axiom 1.5. is not the successor of any natural number: for every .
Are three axioms enough? Still no. Consider with the expected successors until , but let . This system never returns to , so it satisfies Axiom 1.5. It gets stuck at instead: every supposed numeral after names the same object. We rule this out by requiring different inputs to have different successors.
Axiom 1.6.The successor operation is injective: if , then .
We have excluded wrap-arounds and fixed points, but the axioms still allow unrelated successor chains. To see this, look temporarily at the following subset of the real numbers:
Here describes this example from the outside; it is not the addition that we will define in the next section. The elements form one successor chain, while form another. The axioms so far cannot tell us that the second chain is unwanted.
Axiom 1.7: Induction.If a subset contains and is closed under successor, then . Equivalently, if a property holds for and for every , then holds for every natural number.
How does induction exclude ? Take
We have , and implies . Therefore, contains the starting point and is closed under successor. If satisfied Axiom 1.7, we would have to conclude that , but and . Therefore, does not satisfy induction.
For the rest of this note, means a natural-number system satisfying these axioms. I am using the subset form of induction followed by Tao. A formal treatment of Peano arithmetic requires more care about what counts as a “property,” but that belongs to a note on logic rather than this construction.
1.2. Addition on Natural Numbers
We define addition by recursion on its first argument.
Definition 1.8: Addition.For ,
The recursion and Axiom 1.2 show by induction on that . Notice that the definition immediately controls the left argument. To move a successor in the right argument, we need a lemma.
Lemma 1.9: Right zero.For every , .
The base case is . If , then Induction on proves the claim.
Lemma 1.10: Right successor.For all , .
Fix and induct on . For , If , then This is precisely the required statement with in place of .
In particular, because ,
Proposition 1.11: Commutativity of addition.For all , .
Fix and induct on . The base case is by Definition 1.8 and Lemma 1.9. If , then The first equality is Definition 1.8, the middle equality uses the induction hypothesis, and the last is Lemma 1.10.
Proposition 1.12: Associativity of addition.For all , .
Fix and induct on . For , both sides equal . If , then:
Each outer equality follows from Definition 1.8.
Lemma 1.13: Cancellation for addition.If , then .
Induct on . When , the equality is . For the induction step, becomes . Injectivity of gives , and the induction hypothesis gives .
Definition (Positive natural numbers).A natural number is positive if and only if it is not equal to .
This may feel exhausting—we already “know” that addition is commutative, yet we have spent several proofs earning the right to say it.
1.3. Multiplication on Natural Numbers
Multiplication is recursion on its first argument, just as addition was.
Definition 1.14: Multiplication.For ,
Here we can see the hierarchy of the construction: multiplication is built from addition, and addition was built from successor. Later, exponentiation will be built from multiplication.
To prove commutativity, we again need right-hand versions of the defining equations.
Lemma 1.15: Right zero.For every , .
The base case follows from Definition 1.14. If , then
Lemma 1.16: Right successor.For all , .
Fix and induct on . For , both sides are . If , then The third equality uses associativity, commutativity, and .
Proposition 1.17: Commutativity of multiplication.For all , .
Fix and induct on . The base case is by Definition 1.14 and Lemma 1.15. If , then where the last equality is Lemma 1.16.
Proposition 1.18: Distributivity.For all , Consequently, by commutativity of multiplication.
Fix and induct on . For , both sides are . If , then We used associativity and commutativity of addition to regroup the middle expression.
The same kind of induction proves associativity, , and the identity law . We will use these established natural-number laws when checking the integer construction below; a full development appears in Tao
1.4. Arithmetic and Computation

Arithmetic is expressive enough to encode finite strings of symbols and proofs as natural numbers. Gödel used such encodings to prove a precise limitation: any consistent, effectively axiomatized theory with enough arithmetic is incomplete. In particular, no such theory proves every sentence that is true in the standard natural numbers. This statement is about formal theories such as Peano arithmetic, not about the strong subset form of induction used above

Turing gave a mathematical model of an algorithm and proved that the halting behavior of arbitrary machines cannot itself be decided by one machine. This does not mean that computers can solve nothing difficult; it means that some precisely specified decision problems are undecidable
If this detour sounds interesting, Sipser’s Introduction to the Theory of Computation is a wonderful next stop—or you can wait for me to write notes about it someday 😳.
2. Integers
Natural-number addition cannot always undo itself. For example, there is no satisfying . We want a larger number system in which every equation
has a solution. We cannot call that solution yet, because subtraction is exactly what we are trying to construct.
The same enlargement instinct will appear again later. For example, has no solution to , while does. That analogy explains the motivation, not the whole construction.
2.1. Formal Differences
Begin with ordered pairs . Think of as a formal difference: the first coordinate records a positive contribution and the second a negative contribution. This is motivation, not subtraction already performed.
Different pairs should sometimes describe the same future integer. For example, adding the same natural number to both coordinates should change nothing. We therefore define
This definition uses only addition on .
Definition 2.1: Equivalence relation.A relation on a set is an equivalence relation when, for all , it is reflexive (), symmetric ( implies ), and transitive ( and imply ).
Proposition 2.2.The relation on is an equivalence relation.
Reflexivity: , so .
Symmetry: if , then , so .
Transitivity: suppose and . Thus
Adding these equalities and rearranging gives
Lemma 1.13 cancels , leaving . Hence .
The equivalence class of is
We define
the set of all such equivalence classes.
An integer is thus a class of formal differences, not a pair that secretly solves an equation in a pre-existing number system.
2.2. Operations and Well-Definedness
When an operation is written using representatives, we must prove that replacing a representative by an equivalent one does not change the resulting class.
Example (Why representatives can betray us)
Suppose we try to define by taking the first coordinate:
The pairs and are equivalent because . They therefore represent the same integer, but the proposed rule gives from one representative and from the other. So is not well-defined. An equivalence class lets us choose a representative for computation, but it does not let the answer depend on which representative happened to be chosen.
Definition 2.4: Integer operations.For and , define
Why is the multiplication formula so cumbersome? If we temporarily use the familiar subtraction notation only as motivation, then
This predicts the pair : same-sign terms enter the first coordinate, while mixed terms enter the second. The displayed expansion helps us discover the definition, but the pair formula itself uses only natural-number addition and multiplication.
Proposition 2.5: Addition and negation are well-defined.Equivalent representatives give equivalent sums and equivalent negations.
Suppose and . Then
Adding and rearranging yields
which says .
For negation, can be rearranged as . Hence . Since subtraction is defined from addition and negation, it is well-defined too.
Proposition 2.6: Multiplication is well-defined.Equivalent representatives give equivalent products.
It is enough to replace one factor at a time. Suppose , so , and keep fixed. Distributivity gives Add the first equality to the reverse of the second and rearrange: Therefore The pair formula is symmetric in and by commutativity in , so the same argument replaces the second factor. Replacing first one factor and then the other proves the claim.
2.3. Seeing the Natural Numbers Inside the Integers
Define
Proposition 2.7: The natural-number embedding.The map is injective and preserves , , addition, and multiplication.
If , then , so and therefore . Thus is injective.
Also,
and
Because is injective and respects the arithmetic, we may identify with . Only now is it safe to compute
and use the abbreviation
It summarizes the construction; it was not used to define it. Likewise, abbreviates .
2.4. Integer Arithmetic
Let
For all ,
and .
Choose representatives , , and . Commutativity and associativity follow coordinatewise from the corresponding laws in . The identity law is Finally, because . Thus every integer has an additive inverse.
For all ,
and
Commutativity follows immediately from the symmetry of
and commutativity in . The identity calculation is
For associativity, the representative of has coordinates
while the representative of has the same terms, possibly in a different order. Associativity and commutativity in make the pairs equal.
For distributivity, direct expansion gives both and the representative
Because the operations are well-defined, these representative calculations prove laws about the equivalence classes themselves.
We have now obtained a commutative ring: addition forms an abelian group, multiplication is associative and commutative with identity, and multiplication distributes over addition.
2.5. Two Directions from Here
Congruence modulo a positive integer is another equivalence relation, this time on :
when divides . Its equivalence classes form the residue-class ring . This is modular arithmetic. Elliptic-curve cryptography is more specific than “elliptic curves over ”: it commonly uses elliptic curves over finite fields
Integer-solution problems lead in another direction. A Diophantine equation is a polynomial equation for which integer solutions are sought. The equation has solutions such as . Fermat’s Last Theorem says that for every integer exponent , the equation
has no solution in positive integers . Andrew Wiles’s corrected proof was completed in 1994 and published in 1995
This is where we stop for now. The next question is natural: how can we enlarge so that an equation can be solved when ? Following that question will lead us to the rational numbers.
- [Tao, 2022]Analysis I[DOI]Tao, Terence, 2022. Springer.
- [Gödel, 1931]Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I[DOI]Gödel, Kurt, 1931. Monatshefte für Mathematik und Physik, vol. 38, pp. 173--198
- [Turing, 1937]On Computable Numbers, with an Application to the Entscheidungsproblem[DOI]Turing, Alan M., 1937. Proceedings of the London Mathematical Society, vol. s2-42, pp. 230--265
- [Standards for Efficient Cryptography Group, 2010]SEC 2: Recommended Elliptic Curve Domain Parameters[PDF]Standards for Efficient Cryptography Group, 2010.
- [Wiles, 1995]Modular Elliptic Curves and Fermat's Last Theorem[DOI]Wiles, Andrew, 1995. Annals of Mathematics, vol. 141, pp. 443--551
