8.3: The Rational Numbers
Rational numbers are ratios of integers, or nearly so. Of course, different numerators and denominators can give rise to the same rational number - indeed a good deal of elementary school arithmetic is devoted to determining when two distinct expressions for rational numbers are equal. We built the integers from the natural numbers with equivalence classes of "differences" of natural numbers. We construct the rational numbers from the integers analogously, with equivalence classes of "quotients" of integers. Algebraically this gives rise to division.
Let \(Q=\mathbb{Z} \times \mathbb{N}^{+}\) . We define an equivalence relation \(\sim\) on \(Q\) . If \(\langle a, b\rangle,\langle c, d\rangle \in Q\) , then \[\langle a, b\rangle \sim\langle c, d\rangle \Longleftrightarrow a \cdot d=b \cdot c .\] We define the rational numbers, \(\mathbf{Q}\) , as the equivalence classes of \(Q\) with respect to the equivalence relation \(\sim\) . That is, \[\mathbf{Q}:=Q / \sim \text {. }\] We associate the equivalence classes of \(\mathbf{Q}\) with the intuitive rational numbers via the bijection \(i: \mathbb{Q} \rightarrow \mathbf{Q}\) defined by \[i\left(\frac{p}{q}\right)=[\langle p, q\rangle]\] for \(\langle p, q\rangle \in Q\) .
We define the operations and linear ordering on \(\mathbb{Q}\) in terms of the operations and linear ordering in \(\mathbb{Z}\) . Define addition by \[[\langle a, b\rangle]+[\langle c, d\rangle]:=[\langle a d+b c, b d\rangle]\] and multiplication by \[[\langle a, b\rangle] \cdot[\langle c, d\rangle]:=[\langle a \cdot c, b \cdot d\rangle] .\] We define the linear ordering on \(\mathbb{Q}\) by \[[\langle a, b\rangle] \leq[\langle c, d\rangle] \quad \text { iff } \quad a \cdot d \leq b \cdot c .\] Through the construction of the rational numbers, we have used set operations to build mathematical structures with which you are already familiar. Consequently you are able to check that the construction behaves as you expect. For instance, one can easily prove that the operations we have constructed agree with the usual operations of addition and multiplication on the rational numbers. Similarly one can easily check that the relation we have constructed on \(\mathbb{Q}\) agrees with the usual linear ordering of the rational numbers. Constructing the real numbers is more complicated.