# Rational arithmetic all works together

We have seen what the rational numbers are, and five things we can do with them:

These might seem like five standalone operations, but in fact they all play nicely together in a particular way.
You don’t need to know the fancy name, but here it is anyway: mathematicians say that the rationals **form an ordered field**, meaning that the five operations above:

work in the rationals

slot together, behaving in certain specific ways that make it easy to calculate

*You shouldn’t bother learning this page particularly deeply, because none of the properties alone is very interesting; instead, try and absorb it as a whole.*

We’ve already seen the “instant rules” for manipulating the rationals, and where they come from. Here, we’ll first quickly define the rational numbers themselves, and all the operations above, in “instant rule” format, just to have them all here in one place. Then we’ll go through all the properties that are required for mathematicians to be able to say that the operations on rationals “play nicely together” in the above sense; and we’ll be relying on the instant rules as our definitions, because they’re totally unambiguous. That way we can be much more sure that we’re not making some small error. (Relying on an intuition about how apples work could in theory lead us astray; but the rules leave no wiggle-room or scope for interpretation.)

The letters \(a, b, c, d\) should be read as standing for integers (possibly positive, negative or \(0\)), and \(b\) and \(d\) should be assumed not to be \(0\) (recalling that it makes no sense to divide by \(0\)).

A

**rational number**is a pair of integers, written as \(\frac{a}{b}\), where \(b\) is not \(0\), such that \(\frac{a}{b}\) is viewed as being the same as \(\frac{c}{d}\) precisely when \(a \times d = b \times c\). noteThis is just the instant rule for subtraction, below, together with the assumption that \(\frac{0}{x} = \frac{0}{y}\) for any \(x, y\) nonzero integers; in particular, the assumption that \(\frac{0}{b \times d} = \frac{0}{1}\) when \(b, d\) are not \(0\), which we will need later.Addition: \($\frac{a}{b} + \frac{c}{d} = \frac{a \times d + b \times c} {b \times d}\)$

Subtraction: \($\frac{a}{b} - \frac{c}{d} = \frac{a}{b} + \frac{-c}{d} = \frac{a \times d - b \times c}{b \times d}\)$

Multiplication: \($\frac{a}{b} \times \frac{c}{d} = \frac{a \times c}{b \times d}\)$

Division (where also \(c\) is not \(0\)): \($\frac{a}{b} \big/ \frac{c}{d} = \frac{a}{b} \times \frac{d}{c} = \frac{a \times d}{b \times c}\)$

Comparison (where we write \(\frac{a}{b}\) and \(\frac{c}{d}\) such that both \(b\) and \(d\) are positive noteRemember, we can do that: if \(b\) is negative, for instance, we may instead write \(\frac{a}{b}\) as \(\frac{-a}{-b}\), and the extra minus-sign we introduce has now flipped \(b\) from being negative to being positive.): \(\frac{a}{b} < \frac{c}{d}\) precisely when \(\frac{c}{d}-\frac{a}{b}\) is positive: that is, when \($\frac{b \times c - a \times d}{b \times d} > 0\)$ which is in turn when \($b \times c - a \times d > 0\)$

To be super-pedantic, it is necessary to show that the rules above are “well-defined”: for instance, you don’t get different answers if you apply the rules using \(\frac{2}{4}\) instead of \(\frac{1}{2}\).
Concretely, for example, \($\frac{2}{4} + \frac{1}{3} = \frac{1}{2} + \frac{1}{3}\)$ according to the instant rules.
It’s actually true that they *are* well-defined in this sense, but we won’t show it here; consider them to be exercises.

Additionally, each integer can also be viewed as a rational number: namely, the integer \(n\) can be viewed as \(\frac{n}{1}\), being “$n$ copies of the \(\frac{1}{1}\)-chunk”.

The properties required for an “ordered field”—that is, a nicely-behaved system of arithmetic in the rationals—fall naturally into groups, which will correspond to main-level headings below.

# How addition behaves

## Addition always spits out a rational number noteConfucius say that man who run in front of bus get tired; man who run behind bus get exhausted. On the other hand, mathematicians say that the rationals are *closed* under addition.

You might remember a certain existential dread mentioned in the intro to rational numbers: whether it made sense to add rational numbers at all. Then we saw in Addition of rational numbers (Math 0) that in fact it does make sense.

However, in this page we are working from the instant rules above, so if we want to prove that “addition spits out a rational number”, we actually have to prove the fact that \(\frac{a \times d + b \times c} {b \times d}\) is a rational number; no mention of apples at all.

Remember, a rational number here (as defined by instant rule!) is a pair of integers, the bottom one being non-zero. So we just need to check that \(a \times d + b \times c\) is an integer and that \(b \times d\) is a non-zero integer, where \(a, b, c, d\) are integers and \(b, d\) are also not zero.

But that’s easy: the product of integers is integer, and the product of integers which aren’t zero is not zero.

## There must be a rational \(0\) such that adding \(0\) to anything doesn’t change the thing noteMathematicians say that there is an identity element for addition.

This tells us that if we want to stay where we are, but we absolutely must add something, then we can always add \(0\); this won’t change our answer. More concretely, \(\frac{5}{6} + 0 = \frac{5}{6}\).

Strictly speaking, I’m pulling a bit of a fast one here; if you noticed how, then *very* well done.
A rational number is a *pair* of integers, such that the bottom one is not \(0\); and I’ve just tried to say that \(0\) is our rational such that adding \(0\) doesn’t change rationals.
But \(0\) is not a pair of integers!

The trick is to use \(\frac{0}{1}\) instead. Then we can verify that \($\frac{0}{1} + \frac{a}{b} = \frac{0 \times b + a \times 1}{1 \times b} = \frac{0 + a}{b} = \frac{a}{b}\)$ as we require.

## Every rational must have an anti-rational under addition noteMathematicians say that addition is *invertible*.

Concretely, every rational \(\frac{a}{b}\) must have some rational \(\frac{c}{d}\) such that \(\frac{a}{b} + \frac{c}{d} = \frac{0}{1}\). We’ve already seen that we can define \(-\frac{a}{b}\) to be such an “anti-rational”, but remember that in order to fit in with our instant rules above, \(-\frac{a}{b}\) is also not a pair of integers; we should instead use \(\frac{-a}{b}\).

Then \($\frac{a}{b} + \frac{-a}{b} = \frac{a \times b + (-a) \times b}{b \times b} = \frac{0}{b \times b}\)$

Finally, we want \(\frac{0}{b \times b} = \frac{0}{1}\); but this is immediate by the instant-rule definition of “rational number”, since \(0 \times 1 = 0 \times (b \times b)\) (both being equal to \(0\)).

## Addition doesn’t care which way round we do it noteMathematicians say that addition is commutative.

Concretely, this is the fact that \($\frac{a}{b} + \frac{c}{d} = \frac{c}{d} + \frac{a}{b}\)$ This is intuitively plausible because “addition” is just “placing apples next to each other”, and if I put five apples down and then seven apples, I get the same number of apples as if I put down seven and then five.

But we have to use the instant rules now, so that we can be sure our definition is completely watertight.

So here we go: \($\frac{a}{b} + \frac{c}{d} = \frac{a \times d + b \times c}{b \times d} = \frac{c \times b + d \times a}{d \times b} = \frac{c}{d} + \frac{a}{b}\)$
where we have used the fact that multiplication of *integers* doesn’t care about the order in which we do it, and similarly addition of *integers*.

## Addition doesn’t care about the grouping of terms noteMathematicians say that addition is associative.

Here, we mean that \($\left(\frac{a}{b} + \frac{c}{d}\right) + \frac{e}{f} = \frac{a}{b} + \left( \frac{c}{d} + \frac{e}{f} \right)\)$ This is an intuitively plausible fact, because “addition” is just “placing apples next to each other”, and if I put down three apples, then two apples to the right, then one apple to the left, I get the same number ($6$) of apples as if I had put down one apple on the left, then three apples in the middle, then two on the right.

But we have to use the instant rules now, so that we can be sure our definition is completely watertight. So here goes, starting from the left-hand side:

Since addition and multiplication of *integers* don’t care about grouping of terms, this is just \($\frac{a \times d \times f + b \times c \times f + b \times d \times e}{b \times d \times f}\)$

Now going from the right-hand side:

Since we showed that both the left-hand and the right-hand side are equal to the same thing, they are in fact equal to each other.

# How multiplication behaves

## Multiplication always spits out a rational number noteMathematicians say that the rationals are *closed* under multiplication.

This one is very easy to show: \(\frac{a}{b} \times \frac{c}{d} = \frac{a \times c}{b \times d}\), but \(b \times d\) is not zero when \(b\) and \(d\) are not zero, so this is a valid rational number.

## There must be a rational \(1\) such that multiplying a thing by \(1\) doesn’t change the thing noteMathematicians say that multiplication has an identity element.

From our motivation of what multiplication was (“do unto \(\frac{a}{b}\) what you would otherwise have done unto \(1\)”), it should be clear that the number \(1\) ought to work here. However, \(1\) is not strictly speaking a rational number according to the letter of the “instant rules” above; so instead we use \(\frac{1}{1}\).

Then \($\frac{1}{1} \times \frac{a}{b} = \frac{1 \times a}{1 \times b} = \frac{a}{b}\)$ since \(1 \times n = n\) for any integer \(n\).

## Every nonzero rational must have a corresponding rational such that when we multiply them, we get \(1\) noteMathematicians say that every nonzero rational has an *inverse*. (Multiplication is not quite *invertible*, because \(0\) has no inverse.)

recall the intuition from multiplication

Using the instant rule, though, we can take our nonzero rational \(\frac{a}{b}\) (where neither \(a\) nor \(b\) is zero; this is forced by the requirement that \(\frac{a}{b}\) be nonzero), and use \(\frac{b}{a}\) as our corresponding rational. Then \($\frac{a}{b} \times \frac{b}{a} = \frac{a\times b}{b \times a} = \frac{a \times b}{a \times b} = \frac{1}{1}\)$

## Multiplication doesn’t care which way round we do it noteMathematicians say that multiplication is commutative.

This had its own section on the multiplication page, and its justification there was by rotating a certain picture. Here, we’ll use the instant rule:

*integers*doesn’t care about order.

## Multiplication doesn’t care about the grouping of terms noteMathematicians say that multiplication is associative.

This is much harder to see from our intuition, because while addition is a very natural operation (“put something next to something else”), multiplication is much less natural (it boils down to “make something bigger”).
In a sense, we’re trying to show that “make something bigger and then bigger again” is the same as “make something bigger by a bigger amount”.
However, it turns out to be the case that multiplication *also* doesn’t care about the grouping of terms.

Using the instant rule for multiplication, it’s quite easy to show that \($\frac{a}{b} \times \left(\frac{c}{d} \times \frac{e}{f} \right) = \left(\frac{a}{b} \times \frac{c}{d} \right) \times \frac{e}{f}\)$

Indeed, working from the left-hand side:

*integers*doesn’t care about the grouping of terms.

On the other hand, \($\left(\frac{a}{b} \times \frac{c}{d} \right) \times \frac{e}{f} = \frac{a \times c}{b \times d} \times \frac{e}{f} = \frac{(a \times c) \times e}{(b \times d) \times f} = \frac{a \times c \times e}{b \times d \times f}\)$

These two are equal, so we have shown that the left-hand and right-hand sides are both equal to the same thing, and hence they are the equal to each other.

# How addition and multiplication interact

## Multiplication “filters through” addition noteMathematicians say that multiplication *distributes over* addition.

What we will show is that \($\left(\frac{c}{d} + \frac{e}{f}\right) \times \frac{a}{b} = \left(\frac{a}{b} \times \frac{c}{d}\right) + \left(\frac{a}{b} \times \frac{e}{f}\right)\)$

This is intuitively true: the left-hand side is “make \(\frac{a}{b}\), but instead of starting out with \(1\), start with \(\left(\frac{c}{d} + \frac{e}{f}\right)\)”; while the right-hand side is “make \(\frac{a}{b}\), but instead of starting out with \(1\), start with \(\frac{c}{d}\); then do the same but start with \(\frac{e}{f}\); and then put the two together”. If we draw out diagrams for the right-hand side, and put them next to each other, we get the diagram for the left-hand side. (As an exercise, you should do this for some specific values of \(a,b,c,d,e,f\).)

We’ll prove it now using the instant rules.

The left-hand side is \($\left(\frac{c}{d} + \frac{e}{f}\right) \times \frac{a}{b} = \frac{c \times f + d \times e}{d \times f} \times \frac{a}{b} = \frac{(c \times f + d \times e) \times a}{(d \times f) \times b}\)$ which is \(\frac{c \times f \times a + d \times e \times a}{d \times f \times b}\).

The right-hand side is \($\left(\frac{a}{b} \times \frac{c}{d}\right) + \left(\frac{a}{b} \times \frac{e}{f}\right) = \frac{a \times c}{b \times d} + \frac{a \times e}{b \times f} = \frac{(a \times c) \times (b \times f) + (b \times d) \times (a \times e)}{(b \times d) \times (b \times f)} = \frac{(a \times c \times b \times f) + (b \times d \times a \times e)}{(b \times d \times b \times f)}\)$
Notice that everything on the top has a \(b\) in it somewhere, so we can use this same “filtering-through” property that we already know the *integers* have:

This is just the same as the left-hand side, after we rearrange the product terms.

# How comparison interacts with the operations

## How comparison interacts with addition

The founding principle for how we came up with the definition of “comparison” was that adding the same thing to two sides of a balance scale didn’t change the balance.

In terms of the instant rules, that becomes: if \(\frac{a}{b} < \frac{c}{d}\), then \(\frac{a}{b} + \frac{e}{f} < \frac{c}{d} + \frac{e}{f}\).

But by our instant rule, this is true precisely when \($0 < \frac{c}{d} + \frac{e}{f} - (\frac{a}{b} + \frac{e}{f})\)$ and since multiplication by \(-1\) filters through addition, that is precisely when \($0 < \frac{c}{d} + \frac{e}{f} - \frac{a}{b} - \frac{e}{f}\)$ which (since addition doesn’t care about which way round we do the additions, and subtraction is just a kind of addition) is precisely when \($0 < \frac{c}{d} - \frac{a}{b} + \frac{e}{f} - \frac{e}{f}\)$ i.e. when \(0 < \frac{c}{d} - \frac{a}{b}\); i.e. when \(\frac{a}{b} < \frac{c}{d}\).

## How comparison interacts with multiplication

The aim here is basically to show that we can’t multiply two things and get an anti-thing. Written out in the notation, we wish to show that if \(0 < \frac{a}{b}\) and if \(0 < \frac{c}{d}\) then \(0 < \frac{a}{b} \times \frac{c}{d}\), since the test for anti-ness is “am I less than \(0\)?”.

Since \(0 < \frac{a}{b}\), there are two options: either both \(a\) and \(b\) are positive, or they are both negative. (If one is negative and one is positive, then the fraction will be negative.)

Likewise either both \(c\) and \(d\) are positive, or both are negative.

So we have four options in total:

\(a, b, c, d\) are positive

\(a, b, c, d\) are negative

\(a, b\) are positive; \(c, d\) are negative

\(a, b\) are negative; \(c, d\) are positive.

In the first case, we have \(\frac{a \times c}{b \times d}\) positive, because all of \(a, b, c, d\) are.

In the second case, we have \(a \times c\) positive and \(b \times d\) also positive (because both are two negative integers multiplied together); so again the fraction \(\frac{a \times c}{b \times d}\) is positive.

In the third case, we have \(a \times c\) negative and \(b \times d\) also negative (because both are a positive number times a negative number); so the fraction \(\frac{a \times c}{b \times d}\) is a negative divided by a negative. Therefore it is positive, because we can multiply the numerator and the denominator by \(-1\) to turn it into a positive divided by a positive.

In the fourth case, we can do the same as the above, or we can be a bit sneaky: using the fact from earlier that multiplication doesn’t care about order, we can note that \(\frac{a}{b} \times \frac{c}{d}\) is the same as \(\frac{c}{d} \times \frac{a}{b}\). But now \(c\) and \(d\) are positive, and \(a\) and \(b\) are negative; we’ve already shown (in the previous case) that if the first fraction is “positive divided by positive”, and the second fraction is “negative divided by negative”. By swapping \(a\) for \(c\), and \(b\) for \(d\), we can use a result we’ve already proved to obtain this final case.

Hence we’ve shown all four possible cases, and so the final result follows.

Parents:

- Arithmetic of rational numbers (Math 0)
How do we combine rational numbers together?

Do you think we could have the actual names of the rules as subheadings or as footnotes? Like, at the end of the “Multiplication doesn’t care about the grouping terms” we could write “Mathematicians call this the

associative property of multiplication”.