February 21, 2019

Constructing the Rational Numbers (2)

Contents

  1. Canonical Form
  2. Where is $\Z$?
  3. Ordering the Rationals
  4. Filling the Gaps
  5. Field Axioms

Canonical Form

This is a continuation of Constructing the Rational Numbers (1). Before moving forward with the rest of the construction, I'd like to formally change my notation for rational numbers from that of equivalence classes of ordered pairs of integers to that of fractions.

That is, from here on out the rational number $[(a,b)]$ will simply be written as the fraction $\frac{a}{b}$. And now rational numbers look exactly how you would expect. Yay! Note that the bar doesn't really mean anything yet, this notation is currently just a formalism.

Remember that there are many choices of representative for each rational number. For instance, $\frac{1}{2}=\frac{2}{4}$ in the same way that $[(1,2)]=[(2,4)]$ because, in the language of my last post, $(1,2)\sim_\Q (2,4)$. Last time we defined this equivalence relation, $\sim_\Q$, which determines whether two fractions are really the same rational number. Let's rephrase this in terms of fractions and without the formality of the equivalence relation, because it's very important:

Rule (Cross Multiplication). Two fractions $\frac{a}{b}$ and $\frac{c}{d}$ represent the same rational number if and only if $ad=bc$.

We know in our hearts that although there are many fractional representations of each rational, there is always one preferred representation. That is, although $\frac{1}{2}$ and $\frac{2}{4}$ are both valid representations of the same number, we definitely prefer to call it $\frac{1}{2}$ because it's simpler somehow.

We can easily make this decision rigorous, but first we need to recall the following definition:

Definition. Given two integers $a$ and $b$, their greatest common divisor, written $\gcd(a,b)$, is the largest positive integer which is a factor of both $a$ and $b$.

Here are some examples, although you have likely seen this concept before.

Example. Consider $4$ and $6$. We can write $4=2\cdot 2$ and $6=2\cdot 3$. They both have one factor in common: $2$. Thus, $\gcd(4,6)=2$.

Example. Consider $15$ and $30$. We can write $15=3\cdot 5$ and $30=2\cdot 3\cdot 5$. They have two prime factors in common, so their greatest common divisor is the product of these factors: $\gcd(15, 30)=15$.

Example. Consider $0$ and $6$. We can trivially write $0=0\cdot 6$, and so $\gcd(0, 6) = 6$.

Example. Consider $3$ and $7$. We cannot simplify either number further since they are both prime. Clearly they have no factors in common other than $1$, so $\gcd(3, 7)=1$.

Example. Consider $4$ and $9$. Neither is prime, so we can write $4=2\cdot 2$ and $9=3\cdot 3$. There are still no common factors other than $1$, so $\gcd(4,9)=1$.

That last example is particularly interesting, since we had two integers which were not prime, and whose greatest common divisor was still 1. We have a special name for this:

Definition. Two integers $a$ and $b$ are coprime (or relatively prime) if $\gcd(a,b)=1$.

I will not prove it, since we are taking properties of the integers for granted, but the greatest common divisor of two integers always exists as long as they are not both zero.

We now have the tools to choose a preferred representation for each rational number.

Definition. A fractional representation $\frac{a}{b}$ for a rational number is in canonical form if $a$ and $b$ are coprime and $b>0$.

This definition should hopefully make sense to you. It means, for instance, that $\frac{1}{2}$ is the canonical form for the rational number which is also represented by $\frac{2}{4}$, $\frac{-1}{-2}$, etc.

However, whenever we make a definition like this it is important to determine two things. Does it always exist? And if it exists, is it unique? In this case, the answer to both questions is yet. There is always exactly one canonical form for each rational number, and so we may refer to it as the canonical form. Let's prove this!

Proposition. Every rational number has a unique canonical form.

Proof. Choose a rational number $q$. We argue first that a canonical form for $q$ exists. Let $\frac{a}{b}$ be some fraction which represents $q$. Note that $\gcd(a,b)$ is guaranteed to exist because $b\neq 0$. Thus there are integers $m$ and $n$ for which

$$\frac{a}{b} = \frac{m\cdot\gcd(a,b)}{n\cdot\gcd(a,b)}.$$

We argue that $\frac{a}{b}=\frac{m}{n}$. This is easily done by remembering the above rule for determining whether two fractions represent the same rational number. From the first equality above, we have that

$$a \cdot n \cdot \gcd(a,b) = b \cdot m \cdot \gcd(a,b).$$

Using the left cancellation property of the integers, we may cancel $\gcd(a,b)$ from both sides to obtain

$$an=bm.$$

Again using the cross multiplication rule for equivalent fractions, we see that $\frac{a}{b}=\frac{m}{n}$. If $n$ is positive, this is certainly a canonical form for $q$. Otherwise, we may easily obtain a canonical form by negating both slots of the fraction: $\frac{-m}{-n}$. It is easy to show from here that $\frac{a}{b}=\frac{-m}{-n}$, so I will not bother with it.

We have demonstrated that a canonical form for $q$ exists. It remains to show that it is unique. That is, we aim to show that if $\frac{m_1}{n_1}$ and $\frac{m_2}{n_2}$ are both canonical forms for $q$, then $m_1=m_2$ and $n_1=n_2$.

This is not too difficult. Since both fractions are already in canonical form, we know that $\gcd(m_1,n_1)=1$ and $\gcd(m_2,n_2)=1$. Furthermore, since they both represent $q$, we also know that $\frac{m_1}{n_1} = \frac{m_2}{n_2}$ and thus $m_1n_2=n_1m_2$.

Certainly this indicates that $m_1$ is a factor of $n_1m_2$. But $m_1$ and $n_1$ are coprime by hypothesis, so it must be the case that $m_1$ is a factor of $m_2$. Reversing the argument, we see that $m_2$ is a factor of $m_1$. This can only be true if $m_1=m_2$. The argument that $n_1=n_2$ is exactly analogous. It follows then that the canonical form is unique, as desired.

So now we know that every rational number can be represented in a way that is in this sense "most desirable." It certainly aligns with the simplification of fractions that we all saw in elementary school.

Now, remember that we already defined addition and multiplication of rational numbers in my previous post. Let's review those definitions here.

Definition. The sum of two rational numbers $\frac{a}{b}$ and $\frac{c}{d}$ is the rational number $\frac{ad+bc}{bd}$.

Definition. The product of two rational numbers $\frac{a}{b}$ and $\frac{c}{d}$ is the rational number $\frac{ac}{bd}$.

It's worth mentioning that taking the sum or product of two fractions in canonical form does not always result in a canonical form fraction.

Example. The fraction $\frac{1}{2}$ is certainly in canonical form. However,

$$\begin{align}
\frac{1}{2}+\frac{1}{2} &= \frac{1\cdot 2 + 2\cdot 1}{2\cdot 2} \\
&= \frac{4}{4}.
\end{align}$$

This is certainly not in canonical form, since $\gcd(4,4)=4$.

However, this is not really an issue since we can just rewrite it in canonical form post-computation. In this case, the canonical form for the result is $\frac{1}{1}$.

Where is $\Z$?

Ordinarily, when we are not being as ridiculously pedantic as we are in this post, we would consider the integers to be a subset of the rational numbers. But technically this is not the case of our construction, since our rationals are equivalence classes of pairs of integers and thus not integers themselves. It's our goal, therefore, to identify a subset of rationals that looks and behaves like the integers.

The above example may have already given this away. Technically the rational number whose canonical form is $\frac{1}{1}$ is not the same thing as the integer $1$. But I mean, come on... they're pretty darn similar. This leads us to the following identification.

Definition. The rational integers are the set of rational numbers whose canonical form is $\frac{n}{1}$, where $n$ is an integer. We refer to $\frac{n}{1}$ as the rational integer corresponding to $n$.

I don't actually think "rational integer" is a phrase that anyone ever uses, but it will serve our purposes for this post to distinguish between an integer and its corresponding rational number.

Rational integers behave just as we would expect under addition and multiplication. That is, their sums and products are also rational integers. Moreover, they are the correct rational integers. Let's make this a bit more formal:

Proposition. If $m$ and $n$ are integers, then the sum of their corresponding rational integers is the rational integer corresponding to their sum. That is,

$$\frac{m}{1}+\frac{n}{1}=\frac{m+n}{1}.$$

Proof. The result actually follows immediately from our definition of rational addition, since

$$\begin{align}
\frac{m}{1}+\frac{n}{1} &= \frac{m\cdot 1 + 1\cdot n}{1\cdot 1} \\
&= \frac{m+n}{1}.
\end{align}$$

We can do exactly the same sort of thing for multiplication:

Proposition. If $m$ and $n$ are integers, then the product of their corresponding rational integers is the rational integer corresponding to their product. That is,

$$\frac{m}{1}\cdot\frac{n}{1}=\frac{mn}{1}.$$

Proof. Again, the result follows directly from our definition of rational multiplication. Note that

$$\begin{align}
\frac{m}{1}\cdot\frac{n}{1} &= \frac{m\cdot n}{1\cdot 1} \\
&= \frac{mn}{1}.
\end{align}$$

So these rational integers really do correspond to the integers in a one-to-one manner. Since there's no functional difference between rational integers and integers, we might as well just say they're the same thing.

Ordering the Rationals

One of the requirements we imposed on our construction last post was that the rationals should be ordered in a way that's compatible with the integers. That means that if $n$ and $m$ are integers with $n < m$, then we definitely want it to be the case that $\frac{n}{1} < \frac{m}{1}$. That is, integers and rational integers should have the same order.

But in addition to rational integers, all the other rational numbers should be comparable as well. This is done easily enough.

Definition. Given two rational numbers $\frac{a}{b}$ and $\frac{c}{d}$ in canonical form, their order is determined by saying that $\frac{a}{b} < \frac{c}{d}$ if and only if $ad<bc$.

Just as a quick check that this definition of order makes any sense, let's look at a couple simple examples.

Example. Consider the fractions $\frac{1}{2}$ and $\frac{2}{3}$. These are already in canonical form, and we would certainly expect $\frac{1}{2}$ to be less than $\frac{2}{3}$. Let's check that this is indeed the case.

According to the definition, we just need to make sure that $1 \cdot 3 < 2\cdot 2$. This is obviously true ($3<4$) and so we're done.

Example. Consider the fractions $\frac{0}{1}$ and $\frac{-3}{2}$. Of course we hope it should be the case that $\frac{-3}{2}$ is less than $\frac{0}{1}$.

Again, plugging these straight into the definition, we see that

$$\begin{align}
-3\cdot 1 &= -3 \\
&< 0 \\
&= 2\cdot 0.
\end{align}$$

These sanity checks indicate that we're on the right track with our definition of order. But we need to guarantee that our order extends that of the integers. Let's do that now.

Proposition. If $m$ and $n$ are integers with $m<n$ then $\frac{m}{1} < \frac{n}{1}$.

Proof. There's really not much to prove. Since $m<n$ we certainly have that $m\cdot 1 = 1\cdot n$. By the definition of order, this means that $\frac{m}{1} < \frac{n}{1}$.

So this order is compatible with the order on the integers. Yay! Now that our rational numbers are ordered, we're allowed to put them on the number line if we so choose.

Filling the Gaps

Our motivation for inventing rational numbers was to fill the two types of gaps we identified in the previous post as being missing from the integers. Namely, we required that our rational numbers satisfy the following properties:

  • If $a$ and $b$ are integers with $a\ne 0$, there exists a rational number $x$ for which $ax=b$.
  • If $p$ and $q$ are rational numbers with $p<q$, there exists a rational number $x$ for which $p<x<q$.

It's actually pretty straightforward to show that our construction guarantees these properties. Let's get straight to work!

Proposition. If $a$ and $b$ are integers with $a\ne 0$, there exists a rational number $x$ for which $ax=b$.

Proof. Technically we should consider the rational integers $\frac{a}{1}$ and $\frac{b}{1}$. We need to show that there is a rational number $\frac{p}{q}$ for which $\frac{a}{1}\cdot\frac{p}{q}=\frac{b}{1}$.

We argue that taking $p=b$ and $q=a$ will yield the desired result. That is, we only need to verify that $\frac{a}{1}\cdot\frac{b}{a}=\frac{b}{1}$. Notice that, from the definition of rational multiplication,

$$\begin{align}
\frac{a}{1}\cdot\frac{b}{a} &= \frac{ab}{1a} \\
&= \frac{ab}{a}.
\end{align}$$

Since $\gcd(ab, a)=a$, the canonical form for the result is $\frac{b}{1}$, as desired.

Neat! We plugged one type of gap and now have solutions to lots of equations. All that's left is to check that we've filled the other type of gap.

Proposition. If $p$ and $q$ are rational numbers with $p<q$, there exists a rational number $x$ for which $p<x<q$.

Proof. Suppose $p=\frac{p_1}{p_2}$ and $q=\frac{q_1}{q_2}$ are in canonical form. We argue that taking $x=\frac{p_1q_2 + p_2q_1}{2p_2q_2}$ will suffice. To see that we did not pull this out of thin air, notice that $x$ is really just the "average" of $p$ and $q$ put into fractional form, and thus we should expect it to sit directly between them on the number line.

We need to verify that $p<x$ and that $x<q$. To do so, we use the definition of order.

For the first inequality, note first that since $p<q$, we have that $p_1q_2<p_2q_1$. Thus,

$$\begin{align}
(p_1)(2p_2q_2) &= (p_2)(2p_1q_2) \\
&< (p_2)(p_1q_2 + p_2q_1),
\end{align}$$

It follows then that $\frac{p_1}{p_2} < \frac{p_1q_2 + p_2q_1}{2p_2q_2}$. That is, $p<x$.

The proof that $x<q$ is completely analagous to the above.

And there we have it. Our construction of the rational numbers satisfies all the properties we wanted it to!

So why did we do all this again? The short answer is because we can, and because it's kind of cool. The real answer is that we construct things in mathematics from the ground up so that

  1. We know that the objects we are working with actually exist.
  2. We know exactly what properties our objects satisfy.

I don't feel comfortable working with anything I can't get a feel for in this way.

Field Axioms

Our rational numbers actually have a few more properties than I've mentioned. Technically, they form what is called an ordered field. I won't prove all of the field axioms here, but from what I've done already and the properties of the integers, you should be able to fill in the gaps pretty easily now. I'll just give you the axioms and then call it quits.

Definition. A field is a set $\mathbb{F}$ equipped with two operations, addition $+$ and multiplication $\cdot$, which satisfy the following properties:

  1. Associativity of Addition: For all $a,b,c\in\mathbb{F}$, $a+(b+c)=(a+b)+c$.
  2. Commutativity of Addition: For all $a,b\in\mathbb{F}$, $a+b=b+a$.
  3. Additive Identity: There exists $0\in\mathbb{F}$ for which $0+a=a$ for any $a\in\mathbb{F}$.
  4. Additive Inverses: For all $a\in\mathbb{F}$, there exists $-a\in\mathbb{F}$ for which $a+(-a)=0$.
  5. Associativity of Multiplication: For all $a,b,c\in\mathbb{F}$, $a\cdot (b\cdot c)=(a\cdot b)\cdot c$.
  6. Commutativity of Multiplication: For all $a,b\in\mathbb{F}$, $a\cdot b=b\cdot a$.
  7. Multiplicative Identity: There exists $1\in\mathbb{F}$ with $1\ne 0$ for which $1\cdot a=a$ for any $a\in\mathbb{F}$.
  8. Multiplicative Inverses: For all $a\in\mathbb{F}$ with $a\ne 0$, there exists $a^{-1}\in\mathbb{F}$ for which $a\cdot a^{-1}=1$.
  9. Distributivity of Multiplication over Addition: For all $a,b,c\in\mathbb{F}$, $a\cdot (b+c) = a\cdot b+a\cdot c$.

Furthermore, $\mathbb{F}$ is an ordered field if there is an order $<$ on $\mathbb{F}$ which is compatible with the field structure in the following sense: If $a,b\in\mathbb{F}$ and $a,b\ge 0$, then $a+b\ge 0$ and $a\cdot b\ge 0$.

That's pretty much it. It's not too hard to show that the rationals $\Q$ form an ordered field under the definitions we gave for addition and multiplication. The additive identity is $\frac{0}{1}$, the multiplicative identity is $\frac{1}{1}$, the additive inverse of $\frac{a}{b}$ is $\frac{-a}{b}$, and the multiplicative inverse of $\frac{a}{b}$ is $\frac{b}{a}$ (provided $a\ne 0$).

The integers $\Z$ do not form an ordered field because they are lacking multiplicative inverses. This is precisely the first "gap" that we filled.

So... yeah.