Rational arithmetic all works together

We have seen what the ra­tio­nal num­bers are, and five things we can do with them:

Th­ese might seem like five stan­dalone op­er­a­tions, but in fact they all play nicely to­gether in a par­tic­u­lar way. You don’t need to know the fancy name, but here it is any­way: math­e­mat­i­ci­ans say that the ra­tio­nals form an or­dered field, mean­ing that the five op­er­a­tions above:

  • work in the rationals

  • slot to­gether, be­hav­ing in cer­tain spe­cific ways that make it easy to calculate

You shouldn’t bother learn­ing this page par­tic­u­larly deeply, be­cause none of the prop­er­ties alone is very in­ter­est­ing; in­stead, try and ab­sorb it as a whole.

We’ve already seen the “in­stant rules” for ma­nipu­lat­ing the ra­tio­nals, and where they come from. Here, we’ll first quickly define the ra­tio­nal num­bers them­selves, and all the op­er­a­tions above, in “in­stant rule” for­mat, just to have them all here in one place. Then we’ll go through all the prop­er­ties that are re­quired for math­e­mat­i­ci­ans to be able to say that the op­er­a­tions on ra­tio­nals “play nicely to­gether” in the above sense; and we’ll be rely­ing on the in­stant rules as our defi­ni­tions, be­cause they’re to­tally un­am­bigu­ous. That way we can be much more sure that we’re not mak­ing some small er­ror. (Rely­ing on an in­tu­ition about how ap­ples work could in the­ory lead us astray; but the rules leave no wig­gle-room or scope for in­ter­pre­ta­tion.)

The let­ters \(a, b, c, d\) should be read as stand­ing for in­te­gers (pos­si­bly pos­i­tive, nega­tive or \(0\)), and \(b\) and \(d\) should be as­sumed not to be \(0\) (re­call­ing that it makes no sense to di­vide by \(0\)).

  • A ra­tio­nal num­ber is a pair of in­te­gers, writ­ten as \(\frac{a}{b}\), where \(b\) is not \(0\), such that \(\frac{a}{b}\) is viewed as be­ing the same as \(\frac{c}{d}\) pre­cisely when \(a \times d = b \times c\). noteThis is just the in­stant rule for sub­trac­tion, be­low, to­gether with the as­sump­tion that \(\frac{0}{x} = \frac{0}{y}\) for any \(x, y\) nonzero in­te­gers; in par­tic­u­lar, the as­sump­tion that \(\frac{0}{b \times d} = \frac{0}{1}\) when \(b, d\) are not \(0\), which we will need later.

  • Ad­di­tion:

    $$\frac{a}{b} + \frac{c}{d} = \frac{a \times d + b \times c} {b \times d}$$

  • Sub­trac­tion:

    $$\frac{a}{b} - \frac{c}{d} = \frac{a}{b} + \frac{-c}{d} = \frac{a \times d - b \times c}{b \times d}$$

  • Mul­ti­pli­ca­tion:

    $$\frac{a}{b} \times \frac{c}{d} = \frac{a \times c}{b \times d}$$

  • Divi­sion (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}$$

  • Com­par­i­son (where we write \(\frac{a}{b}\) and \(\frac{c}{d}\) such that both \(b\) and \(d\) are pos­i­tive noteRe­mem­ber, we can do that: if \(b\) is nega­tive, for in­stance, we may in­stead write \(\frac{a}{b}\) as \(\frac{-a}{-b}\), and the ex­tra minus-sign we in­tro­duce has now flipped \(b\) from be­ing nega­tive to be­ing pos­i­tive.): \(\frac{a}{b} < \frac{c}{d}\) pre­cisely when \(\frac{c}{d}-\frac{a}{b}\) is pos­i­tive: 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 su­per-pedan­tic, it is nec­es­sary to show that the rules above are “well-defined”: for in­stance, you don’t get differ­ent an­swers if you ap­ply the rules us­ing \(\frac{2}{4}\) in­stead of \(\frac{1}{2}\). Con­cretely, for ex­am­ple,

$$\frac{2}{4} + \frac{1}{3} = \frac{1}{2} + \frac{1}{3}$$
ac­cord­ing to the in­stant rules. It’s ac­tu­ally true that they are well-defined in this sense, but we won’t show it here; con­sider them to be ex­er­cises.

Ad­di­tion­ally, each in­te­ger can also be viewed as a ra­tio­nal num­ber: namely, the in­te­ger \(n\) can be viewed as \(\frac{n}{1}\), be­ing ”\(n\) copies of the \(\frac{1}{1}\)-chunk”.

The prop­er­ties re­quired for an “or­dered field”—that is, a nicely-be­haved sys­tem of ar­ith­metic in the ra­tio­nals—fall nat­u­rally into groups, which will cor­re­spond to main-level head­ings be­low.

How ad­di­tion behaves

Ad­di­tion always spits out a ra­tio­nal num­ber noteCon­fu­cius say that man who run in front of bus get tired; man who run be­hind bus get ex­hausted. On the other hand, math­e­mat­i­ci­ans say that the ra­tio­nals are closed un­der ad­di­tion.

You might re­mem­ber a cer­tain ex­is­ten­tial dread men­tioned in the in­tro to ra­tio­nal num­bers: whether it made sense to add ra­tio­nal num­bers at all. Then we saw in Ad­di­tion of ra­tio­nal num­bers (Math 0) that in fact it does make sense.

How­ever, in this page we are work­ing from the in­stant rules above, so if we want to prove that “ad­di­tion spits out a ra­tio­nal num­ber”, we ac­tu­ally have to prove the fact that \(\frac{a \times d + b \times c} {b \times d}\) is a ra­tio­nal num­ber; no men­tion of ap­ples at all.

Re­mem­ber, a ra­tio­nal num­ber here (as defined by in­stant rule!) is a pair of in­te­gers, the bot­tom one be­ing non-zero. So we just need to check that \(a \times d + b \times c\) is an in­te­ger and that \(b \times d\) is a non-zero in­te­ger, where \(a, b, c, d\) are in­te­gers and \(b, d\) are also not zero.

But that’s easy: the product of in­te­gers is in­te­ger, and the product of in­te­gers which aren’t zero is not zero.

There must be a ra­tio­nal \(0\) such that adding \(0\) to any­thing doesn’t change the thing noteMath­e­mat­i­ci­ans say that there is an iden­tity el­e­ment for ad­di­tion.

This tells us that if we want to stay where we are, but we ab­solutely must add some­thing, then we can always add \(0\); this won’t change our an­swer. More con­cretely, \(\frac{5}{6} + 0 = \frac{5}{6}\).

Strictly speak­ing, I’m pul­ling a bit of a fast one here; if you no­ticed how, then very well done. A ra­tio­nal num­ber is a pair of in­te­gers, such that the bot­tom one is not \(0\); and I’ve just tried to say that \(0\) is our ra­tio­nal such that adding \(0\) doesn’t change ra­tio­nals. But \(0\) is not a pair of in­te­gers!

The trick is to use \(\frac{0}{1}\) in­stead. Then we can ver­ify 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 re­quire.

Every ra­tio­nal must have an anti-ra­tio­nal un­der ad­di­tion noteMath­e­mat­i­ci­ans say that ad­di­tion is in­vert­ible.

Con­cretely, ev­ery ra­tio­nal \(\frac{a}{b}\) must have some ra­tio­nal \(\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-ra­tio­nal”, but re­mem­ber that in or­der to fit in with our in­stant rules above, \(-\frac{a}{b}\) is also not a pair of in­te­gers; we should in­stead 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}$$

Fi­nally, we want \(\frac{0}{b \times b} = \frac{0}{1}\); but this is im­me­di­ate by the in­stant-rule defi­ni­tion of “ra­tio­nal num­ber”, since \(0 \times 1 = 0 \times (b \times b)\) (both be­ing equal to \(0\)).

Ad­di­tion doesn’t care which way round we do it noteMath­e­mat­i­ci­ans say that ad­di­tion is com­mu­ta­tive.

Con­cretely, this is the fact that

$$\frac{a}{b} + \frac{c}{d} = \frac{c}{d} + \frac{a}{b}$$
This is in­tu­itively plau­si­ble be­cause “ad­di­tion” is just “plac­ing ap­ples next to each other”, and if I put five ap­ples down and then seven ap­ples, I get the same num­ber of ap­ples as if I put down seven and then five.

But we have to use the in­stant rules now, so that we can be sure our defi­ni­tion is com­pletely wa­ter­tight.

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 mul­ti­pli­ca­tion of in­te­gers doesn’t care about the or­der in which we do it, and similarly ad­di­tion of in­te­gers.

Ad­di­tion doesn’t care about the group­ing of terms noteMath­e­mat­i­ci­ans say that ad­di­tion is as­so­ci­a­tive.

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 in­tu­itively plau­si­ble fact, be­cause “ad­di­tion” is just “plac­ing ap­ples next to each other”, and if I put down three ap­ples, then two ap­ples to the right, then one ap­ple to the left, I get the same num­ber (\(6\)) of ap­ples as if I had put down one ap­ple on the left, then three ap­ples in the mid­dle, then two on the right.

But we have to use the in­stant rules now, so that we can be sure our defi­ni­tion is com­pletely wa­ter­tight. So here goes, start­ing from the left-hand side:

$$\left(\frac{a}{b} + \frac{c}{d}\right) + \frac{e}{f} = \frac{a \times d + b \times c}{b \times d} + \frac{e}{f} = \frac{(a \times d + b \times c) \times f + (b \times d) \times e}{(b \times d) \times f}$$

Since ad­di­tion and mul­ti­pli­ca­tion of in­te­gers don’t care about group­ing 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 go­ing from the right-hand side:

$$\frac{a}{b} + \left( \frac{c}{d} + \frac{e}{f} \right) = \frac{a}{b} + \frac{c \times f + d \times e}{d \times f} = \frac{a \times (d \times f) + b \times (c \times f + d \times e))}{b \times (d \times f)}$$
and similarly we can write this
$$\frac{a \times d \times f + b \times c \times f + b \times d \times e}{b \times d \times f}$$
which is the same as we got by start­ing on the left-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 mul­ti­pli­ca­tion behaves

Mul­ti­pli­ca­tion always spits out a ra­tio­nal num­ber noteMath­e­mat­i­ci­ans say that the ra­tio­nals are closed un­der mul­ti­pli­ca­tion.

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 ra­tio­nal num­ber.

There must be a ra­tio­nal \(1\) such that mul­ti­ply­ing a thing by \(1\) doesn’t change the thing noteMath­e­mat­i­ci­ans say that mul­ti­pli­ca­tion has an iden­tity el­e­ment.

From our mo­ti­va­tion of what mul­ti­pli­ca­tion was (“do unto \(\frac{a}{b}\) what you would oth­er­wise have done unto \(1\)”), it should be clear that the num­ber \(1\) ought to work here. How­ever, \(1\) is not strictly speak­ing a ra­tio­nal num­ber ac­cord­ing to the let­ter of the “in­stant rules” above; so in­stead 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 in­te­ger \(n\).

Every nonzero ra­tio­nal must have a cor­re­spond­ing ra­tio­nal such that when we mul­ti­ply them, we get \(1\) noteMath­e­mat­i­ci­ans say that ev­ery nonzero ra­tio­nal has an in­verse. (Mul­ti­pli­ca­tion is not quite in­vert­ible, be­cause \(0\) has no in­verse.)

re­call the in­tu­ition from multiplication

Us­ing the in­stant rule, though, we can take our nonzero ra­tio­nal \(\frac{a}{b}\) (where nei­ther \(a\) nor \(b\) is zero; this is forced by the re­quire­ment that \(\frac{a}{b}\) be nonzero), and use \(\frac{b}{a}\) as our cor­re­spond­ing ra­tio­nal. 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}$$

Mul­ti­pli­ca­tion doesn’t care which way round we do it noteMath­e­mat­i­ci­ans say that mul­ti­pli­ca­tion is com­mu­ta­tive.

This had its own sec­tion on the mul­ti­pli­ca­tion page, and its jus­tifi­ca­tion there was by ro­tat­ing a cer­tain pic­ture. Here, we’ll use the in­stant rule:

$$\frac{a}{b} \times \frac{c}{d} = \frac{a \times c}{b \times d} = \frac{c \times a}{d \times b} = \frac{c}{d} \times \frac{a}{b}$$
where we have used that mul­ti­pli­ca­tion of in­te­gers doesn’t care about or­der.

Mul­ti­pli­ca­tion doesn’t care about the group­ing of terms noteMath­e­mat­i­ci­ans say that mul­ti­pli­ca­tion is as­so­ci­a­tive.

This is much harder to see from our in­tu­ition, be­cause while ad­di­tion is a very nat­u­ral op­er­a­tion (“put some­thing next to some­thing else”), mul­ti­pli­ca­tion is much less nat­u­ral (it boils down to “make some­thing big­ger”). In a sense, we’re try­ing to show that “make some­thing big­ger and then big­ger again” is the same as “make some­thing big­ger by a big­ger amount”. How­ever, it turns out to be the case that mul­ti­pli­ca­tion also doesn’t care about the group­ing of terms.

Us­ing the in­stant rule for mul­ti­pli­ca­tion, 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}$$

In­deed, work­ing from the left-hand side:

$$\frac{a}{b} \times \left(\frac{c}{d} \times \frac{e}{f} \right) = \frac{a}{b} \times \frac{c \times e}{d \times f} = \frac{a \times (c \times e)}{b \times (d \times f)}$$
which is \(\frac{a \times c \times e}{b \times d \times f}\) be­cause mul­ti­pli­ca­tion of in­te­gers doesn’t care about the group­ing 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}$$

Th­ese 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 ad­di­tion and mul­ti­pli­ca­tion interact

Mul­ti­pli­ca­tion “filters through” ad­di­tion noteMath­e­mat­i­ci­ans say that mul­ti­pli­ca­tion dis­tributes over ad­di­tion.

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 in­tu­itively true: the left-hand side is “make \(\frac{a}{b}\), but in­stead of start­ing out with \(1\), start with \(\left(\frac{c}{d} + \frac{e}{f}\right)\)”; while the right-hand side is “make \(\frac{a}{b}\), but in­stead of start­ing out with \(1\), start with \(\frac{c}{d}\); then do the same but start with \(\frac{e}{f}\); and then put the two to­gether”. If we draw out di­a­grams for the right-hand side, and put them next to each other, we get the di­a­gram for the left-hand side. (As an ex­er­cise, you should do this for some spe­cific val­ues of \(a,b,c,d,e,f\).)

We’ll prove it now us­ing the in­stant 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)}$$
No­tice that ev­ery­thing on the top has a \(b\) in it some­where, so we can use this same “fil­ter­ing-through” prop­erty that we already know the in­te­gers have:
$$\frac{b \times [(a \times c \times f) + (d \times a \times e)]}{b \times (d \times b \times f)}$$
And fi­nally we know that mul­ti­ply­ing a frac­tion’s nu­mer­a­tor and de­nom­i­na­tor both by \(b\) doesn’t change the frac­tion:
$$\frac{(a \times c \times f) + (d \times a \times e)}{d \times b \times f}$$

This is just the same as the left-hand side, af­ter we re­ar­range the product terms.

How com­par­i­son in­ter­acts with the operations

How com­par­i­son in­ter­acts with addition

The found­ing prin­ci­ple for how we came up with the defi­ni­tion of “com­par­i­son” was that adding the same thing to two sides of a bal­ance scale didn’t change the bal­ance.

In terms of the in­stant rules, that be­comes: if \(\frac{a}{b} < \frac{c}{d}\), then \(\frac{a}{b} + \frac{e}{f} < \frac{c}{d} + \frac{e}{f}\).

But by our in­stant rule, this is true pre­cisely when

$$0 < \frac{c}{d} + \frac{e}{f} - (\frac{a}{b} + \frac{e}{f})$$
and since mul­ti­pli­ca­tion by \(-1\) filters through ad­di­tion, that is pre­cisely when
$$0 < \frac{c}{d} + \frac{e}{f} - \frac{a}{b} - \frac{e}{f}$$
which (since ad­di­tion doesn’t care about which way round we do the ad­di­tions, and sub­trac­tion is just a kind of ad­di­tion) is pre­cisely 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 com­par­i­son in­ter­acts with multiplication

The aim here is ba­si­cally to show that we can’t mul­ti­ply two things and get an anti-thing. Writ­ten out in the no­ta­tion, 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 op­tions: ei­ther both \(a\) and \(b\) are pos­i­tive, or they are both nega­tive. (If one is nega­tive and one is pos­i­tive, then the frac­tion will be nega­tive.)

Like­wise ei­ther both \(c\) and \(d\) are pos­i­tive, or both are nega­tive.

So we have four op­tions in to­tal:

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

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

  • \(a, b\) are pos­i­tive; \(c, d\) are negative

  • \(a, b\) are nega­tive; \(c, d\) are pos­i­tive.

In the first case, we have \(\frac{a \times c}{b \times d}\) pos­i­tive, be­cause all of \(a, b, c, d\) are.

In the sec­ond case, we have \(a \times c\) pos­i­tive and \(b \times d\) also pos­i­tive (be­cause both are two nega­tive in­te­gers mul­ti­plied to­gether); so again the frac­tion \(\frac{a \times c}{b \times d}\) is pos­i­tive.

In the third case, we have \(a \times c\) nega­tive and \(b \times d\) also nega­tive (be­cause both are a pos­i­tive num­ber times a nega­tive num­ber); so the frac­tion \(\frac{a \times c}{b \times d}\) is a nega­tive di­vided by a nega­tive. There­fore it is pos­i­tive, be­cause we can mul­ti­ply the nu­mer­a­tor and the de­nom­i­na­tor by \(-1\) to turn it into a pos­i­tive di­vided by a pos­i­tive.

We’ll con­sider \(\frac{1}{3}\) and \(\frac{-2}{-5}\). Then the product is \(\frac{1}{3} \times \frac{-2}{-5} = \frac{-2}{-15}\); but that is the same as \(\frac{2}{15}\).

In the fourth case, we can do the same as the above, or we can be a bit sneaky: us­ing the fact from ear­lier that mul­ti­pli­ca­tion doesn’t care about or­der, 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 pos­i­tive, and \(a\) and \(b\) are nega­tive; we’ve already shown (in the pre­vi­ous case) that if the first frac­tion is “pos­i­tive di­vided by pos­i­tive”, and the sec­ond frac­tion is “nega­tive di­vided by nega­tive”. By swap­ping \(a\) for \(c\), and \(b\) for \(d\), we can use a re­sult we’ve already proved to ob­tain this fi­nal case.

Hence we’ve shown all four pos­si­ble cases, and so the fi­nal re­sult fol­lows.

Parents: