Evanalysis
3.4Estimated reading time: 26 min

3.4 Rationals and well-defined operations

Construct Q from integer pairs, define its operations on classes, and learn why a formula on representatives must be checked before it becomes a genuine statement about rational numbers.

Course contents

Integers solve the subtraction problem: x+b=ax+b=a has an integer solution for every pair of integers a,ba,b. Division poses the next obstruction. The equation 2x=12x=1 has no integer solution, so ZZ is not closed under division by nonzero elements. We construct QQ so that bx=abx=a can be solved whenever a,b∈Za,b\in Z and b≠0b\ne0.

The earlier construction identified pairs that encoded the same difference. Here we identify pairs that encode the same quotient. First we define equality of those pairs; then we check arithmetic and inverses; finally we define order. At each stage the same question governs the argument: does the result depend on the rational number, or merely on its chosen representative?

Why a quotient is needed

The fractions

12,24,−3−6\frac{1}{2}, \qquad \frac{2}{4}, \qquad \frac{-3}{-6}

all describe the same rational number. If we want to build QQ from integer data alone, then the construction must identify all such pairs automatically.

That is why we do not define a rational number to be a single ordered pair. Instead, we define a rational number to be a whole equivalence class of pairs that represent the same quotient.

Definition

Rational numbers as equivalence classes

Let

Y=Z×(Z∖{0}).Y = Z \times (Z \setminus \{0\}).

Thus an element of YY is a pair (a,b)(a, b) with a∈Za \in Z and b∈Z∖{0}b \in Z \setminus \{0\}.

Define a relation ∼Q\sim_Q on YY by

(a,b)∼Q(c,d)⟺ad=bc.(a, b) \sim_Q (c, d) \quad\Longleftrightarrow\quad ad = bc.

The set of rational numbers is the quotient

Q=Y/∼Q.Q = Y / \sim_Q.

The equivalence class of (a,b)(a, b) is written [(a,b)][(a, b)], and it is represented informally by the fraction a/ba/b.

The denominator is required to be nonzero because the construction is intended to model quotients. If b=0b = 0, then the pair (a,b)(a, b) cannot represent a meaningful rational number.

Why the relation makes sense

The equation ad=bcad = bc is the usual cross-multiplication test for equality of fractions. In the quotient construction, that familiar test becomes the actual definition of equality.

Theorem

The relation ∼Q\sim_Q is an equivalence relation

The relation defined by

(a,b)∼Q(c,d)⟺ad=bc(a, b) \sim_Q (c, d) \quad\Longleftrightarrow\quad ad = bc

is reflexive, symmetric, and transitive on YY.

Proof: ∼Q\sim_Q is an equivalence relation

Reflexivity is immediate because ab=baab = ba, so (a,b)∼Q(a,b)(a, b) \sim_Q (a, b).

Symmetry is also immediate: if ad=bcad = bc, then cb=dacb = da, so (c,d)∼Q(a,b)(c, d) \sim_Q (a, b).

For transitivity, assume

(a,b)∼Q(c,d)and(c,d)∼Q(e,f).(a, b) \sim_Q (c, d) \qquad\text{and}\qquad (c, d) \sim_Q (e, f).

Then

ad=bcandcf=de.ad = bc \qquad\text{and}\qquad cf = de.

Multiply the first equation by ff and the second by bb:

adf=bcf,bcf=bde.adf = bcf, \qquad bcf = bde.

Hence adf=bdeadf = bde. Because dd is nonzero and ZZ has no zero divisors, we may cancel dd in ZZ to obtain

af=be.af = be.

Therefore (a,b)∼Q(e,f)(a, b) \sim_Q (e, f), so the relation is transitive.

Representatives and the same rational number

An equivalence class contains many representatives. That is not a defect. It is the whole point of the construction.

Worked example

Different pairs can describe the same rational number

Consider the pairs (1,2)(1, 2), (2,4)(2, 4), and (−3,−6)(-3, -6).

We have

1⋅4=2⋅2,1⋅(−6)=2⋅(−3).1 \cdot 4 = 2 \cdot 2, \qquad 1 \cdot (-6) = 2 \cdot (-3).

Therefore

(1,2)∼Q(2,4)and(1,2)∼Q(−3,−6).(1, 2) \sim_Q (2, 4) \qquad\text{and}\qquad (1, 2) \sim_Q (-3, -6).

So all three pairs belong to the same rational number:

[(1,2)]=[(2,4)]=[(−3,−6)].[(1, 2)] = [(2, 4)] = [(-3, -6)].

This is the quotient-theoretic version of the elementary fact that

12=24=−3−6.\frac{1}{2} = \frac{2}{4} = \frac{-3}{-6}.

It is often useful to remember that a rational number is not tied to a preferred representative. The class [(a,b)][(a, b)] does not become a different number just because you multiply both coordinates by the same nonzero integer.

Reduced representatives and the Euclidean algorithm

The quotient construction explains why many pairs represent the same rational number. For calculation, however, it is still useful to choose a clean representative. If aa and bb have a greatest common divisor g>0g\gt 0, then

[(a,b)]=[(a/g,b/g)].[(a,b)]=[(a/g,b/g)].

The Euclidean algorithm gives a systematic way to find this gg by repeated division with remainder. This is not a new definition of rational numbers; it is a practical method for choosing a simpler representative inside the same equivalence class.

Worked example

Reducing a representative with the Euclidean algorithm

Consider [(84,30)][(84,30)]. The Euclidean algorithm gives

84=2⋅30+24,30=1⋅24+6,24=4⋅6+0.84=2\cdot 30+24,\qquad 30=1\cdot 24+6,\qquad 24=4\cdot 6+0.

So gcd⁡(84,30)=6\gcd(84,30)=6, and

[(84,30)]=[(14,5)].[(84,30)]=[(14,5)].

Both pairs represent the same rational number because 84⋅5=30⋅1484\cdot 5=30\cdot 14.

Operations on QQ

Once the classes are defined, the next task is to define addition and multiplication on the classes themselves.

Definition

Addition, multiplication, and inverses on QQ

For classes in QQ, define

[(a,b)]+[(c,d)]:=[(ad+bc,bd)],[(a, b)] + [(c, d)] := [(ad + bc, bd)],

and

[(a,b)]⋅[(c,d)]:=[(ac,bd)].[(a, b)] \cdot [(c, d)] := [(ac, bd)].

The additive inverse is defined by

−[(a,b)]:=[(−a,b)].-[(a, b)] := [(-a, b)].

If a≠0a \neq 0, the multiplicative inverse is defined by

[(a,b)]−1:=[(b,a)].[(a, b)]^{-1} := [(b, a)].

Each of these formulas is written on representatives, so each of them must be checked for well-definedness. Otherwise the formula might depend on the chosen pair rather than on the rational number itself.

Before checking representatives, check the output domain. Since b,d≠0b,d\ne0 and ZZ has no zero divisors, the denominator bdbd is nonzero for both sums and products. For inversion, the extra condition a≠0a\ne0 makes (b,a)(b,a) a valid pair. These are two different obligations: a formula must produce a valid object, and that object must be independent of representatives.

What "well-defined" means

A formula on equivalence classes is well-defined if changing representatives does not change the resulting class.

For addition, this means the following statement must be true:

if (a,b)∼Q(a′,b′)(a, b) \sim_Q (a', b') and (c,d)∼Q(c′,d′)(c, d) \sim_Q (c', d'), then

(ad+bc,bd)∼Q(a′d′+b′c′,b′d′).(ad + bc, bd) \sim_Q (a'd' + b'c', b'd').

Theorem

Addition on QQ is well-defined

If (a,b)∼Q(a′,b′)(a, b) \sim_Q (a', b') and (c,d)∼Q(c′,d′)(c, d) \sim_Q (c', d'), then

[(ad+bc,bd)]=[(a′d′+b′c′,b′d′)].[(ad + bc, bd)] = [(a'd' + b'c', b'd')].

So the addition formula does not depend on the chosen representatives.

Proof: addition on QQ is well-defined

Assume

ab′=ba′andcd′=dc′.ab' = ba' \qquad\text{and}\qquad cd' = dc'.

We must show

(ad+bc,bd)∼Q(a′d′+b′c′,b′d′).(ad + bc, bd) \sim_Q (a'd' + b'c', b'd').

By definition of ∼Q\sim_Q, it is enough to prove

(ad+bc)b′d′=(a′d′+b′c′)bd.(ad + bc)b'd' = (a'd' + b'c')bd.

Expanding the left-hand side gives

adb′d′+bcb′d′.adb'd' + bcb'd'.

Using ab′=ba′ab' = ba', the first term becomes

adb′d′=ba′dd′.adb'd' = ba'dd'.

Using cd′=dc′cd' = dc', the second term becomes

bcb′d′=bdb′c′.bcb'd' = bdb'c'.

Hence

(ad+bc)b′d′=ba′dd′+bdb′c′=(a′d′+b′c′)bd.(ad + bc)b'd' = ba'dd' + bdb'c' = (a'd' + b'c')bd.

Therefore

(ad+bc,bd)∼Q(a′d′+b′c′,b′d′),(ad + bc, bd) \sim_Q (a'd' + b'c', b'd'),

so the sum is well-defined.

Worked example

Compute in classes, then simplify conceptually

Let

x=[(1,2)],y=[(1,3)].x = [(1, 2)], \qquad y = [(1, 3)].

Then

x+y=[(1⋅3+2⋅1,2⋅3)]=[(5,6)].x + y = [(1 \cdot 3 + 2 \cdot 1, 2 \cdot 3)] = [(5, 6)].

Also,

x⋅y=[(1⋅1,2⋅3)]=[(1,6)].x \cdot y = [(1 \cdot 1, 2 \cdot 3)] = [(1, 6)].

If we replace xx by the equivalent representative [(2,4)][(2, 4)], then the same formulas give

[(2,4)]+[(1,3)]=[(10,12)],[(2, 4)] + [(1, 3)] = [(10, 12)],

and

[(2,4)]⋅[(1,3)]=[(2,12)].[(2, 4)] \cdot [(1, 3)] = [(2, 12)].

These are the same rational numbers as [(5,6)][(5, 6)] and [(1,6)][(1, 6)], so the class operations behave as they should.

Multiplication and inversion require the same discipline

The addition proof displays the general method. Multiplication is shorter, but it still has to be checked explicitly because the inputs are classes rather than preferred fractions.

Why multiplication on QQ is well-defined

Assume

(a,b)∼Q(a′,b′)and(c,d)∼Q(c′,d′).(a,b)\sim_Q(a',b') \qquad\text{and}\qquad (c,d)\sim_Q(c',d').

The hypotheses mean

ab′=ba′andcd′=dc′.ab'=ba' \qquad\text{and}\qquad cd'=dc'.

To prove that the product is independent of representatives, use the defining test for ∼Q\sim_Q:

(ac)(b′d′)=(bd)(a′c′).(ac)(b'd')=(bd)(a'c').

The left side factors as

(ac)(b′d′)=(ab′)(cd′)=(ba′)(dc′)=(bd)(a′c′).(ac)(b'd')=(ab')(cd')=(ba')(dc')=(bd)(a'c').

Hence (ac,bd)∼Q(a′c′,b′d′)(ac,bd)\sim_Q(a'c',b'd'), and the product formula descends from pairs to rational classes.

Theorem

Every nonzero rational has one multiplicative inverse

If q∈Qq\in Q and q≠0q\ne0, there is a unique q−1∈Qq^{-1}\in Q with

q⋅q−1=[(1,1)].q\cdot q^{-1}=[(1,1)].

Proof: existence and uniqueness of the rational inverse

Write q=[(a,b)]q=[(a,b)] with b≠0b\ne0. The condition q≠0q\ne0 means a≠0a\ne0, so [(b,a)][(b,a)] is a valid rational class. Then

[(a,b)]⋅[(b,a)]=[(ab,ba)]=[(1,1)],[(a,b)]\cdot[(b,a)]=[(ab,ba)]=[(1,1)],

because ab=baab=ba in ZZ.

For uniqueness, suppose [(u,v)][(u,v)] is another inverse. The equation

[(u,v)]⋅[(a,b)]=[(1,1)][(u,v)]\cdot[(a,b)]=[(1,1)]

means (ua,vb)∼Q(1,1)(ua,vb)\sim_Q(1,1), hence ua=vbua=vb. This is exactly the condition (u,v)∼Q(b,a)(u,v)\sim_Q(b,a). Thus every inverse represents the same class [(b,a)][(b,a)].

Worked example

Invert a negative rational without changing its class

Let q=[(−3,5)]q=[(-3,5)]. Since the numerator is nonzero,

q−1=[(5,−3)].q^{-1}=[(5,-3)].

Their product is

[(−3,5)]⋅[(5,−3)]=[(−15,−15)]=[(1,1)].[(-3,5)]\cdot[(5,-3)]=[(-15,-15)]=[(1,1)].

The denominator in the inverse is nonzero, and the two coordinates may be multiplied by −1-1 without changing the class. The calculation therefore works even when the chosen denominator is negative.

Common mistake

Nonzero numerator is needed before inverting

The formula [(a,b)]−1=[(b,a)][(a,b)]^{-1}=[(b,a)] is valid only when a≠0a\ne0. If a=0a=0, the second coordinate of [(b,a)][(b,a)] would be zero, which is excluded from YY, and zero has no multiplicative inverse.

How the construction solves division

The integers enter the new system through j(n)=[(n,1)]j(n)=[(n,1)]. This map is injective: equality [(m,1)]=[(n,1)][(m,1)]=[(n,1)] means m⋅1=1⋅nm\cdot1=1\cdot n, hence m=nm=n. The operation formulas also give

j(m)+j(n)=j(m+n),j(m)j(n)=j(mn).j(m)+j(n)=j(m+n),\qquad j(m)j(n)=j(mn).

Thus integer arithmetic is preserved. More importantly, if a,b∈Za,b\in Z and b≠0b\ne0, the class x=[(a,b)]x=[(a,b)] satisfies

j(b)x=[(ba,b)]=[(a,1)]=j(a).j(b)x=[(ba,b)]=[(a,1)]=j(a).

The middle equality is the cross-product test. We have now answered the opening question: the quotient construction supplies a solution of bx=abx=a while keeping the original integers identifiable inside QQ.

Not every representative formula descends to QQ

Once you start thinking in equivalence classes, you should become suspicious of any proposed relation or operation written directly on representatives.

For example, consider the following candidate rules on classes [(p,q)][(p, q)] and [(m,n)][(m, n)]:

  1. compare pp and mm;
  2. compare the sign of pn−qmpn - qm;
  3. compare the sign of (pn−mq)nq(pn - mq)nq.

The first two rules are not well-defined on QQ, because changing a representative can change the truth value. The third rule compensates for sign changes in the denominators and is invariant under changing representatives.

Worked example

Why the denominator signs matter

Compare [(1,2)][(1,2)] with [(0,1)][(0,1)]. The numerator rule gives 1>01\gt0, and the raw cross-difference is 1⋅1−0⋅2=11\cdot1-0\cdot2=1. Replace (1,2)(1,2) by (−1,−2)(-1,-2), which names the same class. The numerator comparison becomes −1>0-1\gt0, now false, and the raw cross-difference becomes −1-1.

Both proposed rules have changed while the rational numbers stayed fixed. The sign-corrected expression stays positive: its two values are 1⋅2=21\cdot2=2 and (−1)⋅(−2)=2(-1)\cdot(-2)=2. It compensates for the denominator sign rather than treating that sign as irrelevant.

Order: choose positive denominators

Arithmetic now belongs to rational classes. To compare those classes, choose representatives with positive denominators: if b<0b\lt0, replace (a,b)(a,b) by (−a,−b)(-a,-b). For b,d>0b,d\gt0, define

ab<cd⟺ad<bc.\frac{a}{b}\lt\frac{c}{d}\quad\Longleftrightarrow\quad ad\lt bc.

The right side uses the order already established on ZZ. Positivity matters because multiplying an inequality by a negative denominator would reverse it.

Proof that rational order is independent of representatives

Suppose ab′=ba′ab'=ba' and cd′=dc′cd'=dc', with all four denominators positive. Then

ad⋅b′d′=a′d′⋅bd,bc⋅b′d′=b′c′⋅bd.ad\cdot b'd'=a'd'\cdot bd, \qquad bc\cdot b'd'=b'c'\cdot bd.

Multiplying ad<bcad\lt bc by positive b′d′b'd' and substituting these equalities gives a′d′⋅bd<b′c′⋅bda'd'\cdot bd\lt b'c'\cdot bd. Cancelling positive bdbd yields a′d′<b′c′a'd'\lt b'c'. The reverse argument is identical, so the comparison is unchanged.

Trichotomy in ZZ implies that exactly one of a/b<c/da/b\lt c/d, a/b=c/da/b=c/d, and c/d<a/bc/d\lt a/b holds. For transitivity, take b,d,f>0b,d,f\gt0. If ad<bcad\lt bc and cf<decf\lt de, then

adf<bcf<bde.adf\lt bcf\lt bde.

Cancelling positive dd gives af<beaf\lt be, hence a/b<e/fa/b\lt e/f. Thus the order laws follow from integer order, with every sign condition visible.

Explore which comparisons survive

The quickest way to understand this issue is to compare several proposed rules against different representatives of the same two rational numbers. In the panel below, the rational numbers remain 1/21/2 and 1/31/3; only their representatives change.

Read and try

Test representative-dependent formulas on Q

The lab compares several representative formulas and makes visible which ones survive a change of fraction representative.

Represent 1/2 as

Represent 1/3 as

The rational comparison itself is fixed: 1/2 > 1/3.

Numerator-only rule: p > m

1 > 1

false

Raw cross-difference: pn - mq > 0

1·3 - 1·2 = 1

true

Sign-corrected test: (pn - mq)nq > 0

(1)·(6) = 6

true

A genuine relation on QQ must give the same truth value after every legal change of representatives. If the output changes merely because 1/21/2 was written as (1,2)(1,2) instead of (2,4)(2,4) or (−1,−2)(-1,-2), the formula has not descended to the quotient.

Checkpoint

Why does the multiplication proof use two cross-product equalities rather than decimal intuition?

Explain what can change while the rational class stays fixed.

Solution · Answer

The same rational number has many representatives. Cross-product equalities are the defining conditions that identify those representatives, so they are the data that can be substituted safely in a well-definedness proof.

Common mistakes

Common mistake

A quotient class is not one preferred fraction

The symbols [(1,2)][(1, 2)], [(2,4)][(2, 4)], and [(−3,−6)][(-3, -6)] name the same equivalence class, hence the same rational number. The three ordered pairs (1,2)(1,2), (2,4)(2,4), and (−3,−6)(-3,-6) are distinct representatives of that class.

Common mistake

A plausible formula is not automatically well-defined

A formula on pairs may look natural and still fail on the quotient. Before accepting an operation on QQ, check that changing to equivalent representatives preserves the equivalence class of its output. For a relation on QQ, the truth value must remain unchanged.

Quick checks

Checkpoint

Suppose zero denominators were allowed. Use (1,0)(1,0), (0,0)(0,0), and (0,1)(0,1) to prove that the cross-product relation would no longer be transitive.

Test the two consecutive relations, then compare the first pair directly with the third.

Solution · Model solution

On all of Z2Z^2, cross-multiplication would give (1,0)∼(0,0)(1,0)\sim(0,0) and (0,0)∼(0,1)(0,0)\sim(0,1), because both tests reduce to 0=00=0. But (1,0)∼(0,1)(1,0)\sim(0,1) would require 1=01=0, which is false. Transitivity therefore fails. Excluding zero denominators is part of making the quotient construction mathematically valid, before any inverse is defined.

Checkpoint

For a rational class [(a,b)][(a,b)] with a≠0a\ne0, prove that swapping the coordinates gives its multiplicative inverse. Check both the domain and the product.

Check the product with the original class.

Solution · Answer

Since a≠0a\ne0, the pair (b,a)(b,a) has a nonzero second coordinate and is valid. The inverse is [(b,a)][(b,a)], because

[(a,b)]⋅[(b,a)]=[(ab,ba)]=[(1,1)],[(a, b)] \cdot [(b, a)] = [(ab, ba)] = [(1, 1)],

which is the multiplicative identity in QQ.

Exercises

Checkpoint

Why does the relation [(p,q)]≺[(m,n)][(p, q)] \prec [(m, n)] defined by pp greater than mm fail to be well-defined?

Find equivalent representatives that change the truth value.

Solution · Guided solution

Take [(1,2)]=[(−1,−2)][(1, 2)] = [(-1, -2)]. Compare both with [(0,1)][(0, 1)].

Using the representative (1,2)(1, 2), the statement p>mp \gt m reads 1>01 \gt 0, which is true. Using the equivalent representative (−1,−2)(-1, -2), it reads −1>0-1 \gt 0, which is false.

So the rule depends on the chosen representative and therefore does not define an order relation on QQ.

Checkpoint

Let a,b,k,c∈Za,b,k,c\in Z, b>0b>0, a=bk+ca=bk+c, and 0≤c<b0\le c<b. Prove that gcd⁡(a,b)=gcd⁡(b,c)\gcd(a,b)=\gcd(b,c).

Show that the two pairs have exactly the same common divisors.

Solution · Guided solution

Let dd be a common divisor of aa and bb. Since c=a−bkc=a-bk, the same dd divides cc, so dd is a common divisor of bb and cc.

Conversely, if dd divides both bb and cc, then dd divides bk+c=abk+c=a, so dd is a common divisor of aa and bb.

Thus the two pairs have the same common divisors, and therefore the same greatest common divisor:

gcd⁡(a,b)=gcd⁡(b,c).\gcd(a,b)=\gcd(b,c).

Checkpoint

Prove the multiplication formula on QQ is well-defined: if (a,b)∼Q(a′,b′)(a,b)\sim_Q(a',b') and (c,d)∼Q(c′,d′)(c,d)\sim_Q(c',d'), then (ac,bd)∼Q(a′c′,b′d′)(ac,bd)\sim_Q(a'c',b'd').

Translate each equivalence into a cross-product equality.

Solution · Guided solution

From (a,b)∼Q(a′,b′)(a,b)\sim_Q(a',b') and (c,d)∼Q(c′,d′)(c,d)\sim_Q(c',d'), we know

ab′=ba′,cd′=dc′.ab'=ba', \qquad cd'=dc'.

To prove (ac,bd)∼Q(a′c′,b′d′)(ac,bd)\sim_Q(a'c',b'd'), we must show

(ac)(b′d′)=(bd)(a′c′).(ac)(b'd')=(bd)(a'c').

But

(ac)(b′d′)=(ab′)(cd′)=(ba′)(dc′)=(bd)(a′c′).(ac)(b'd')=(ab')(cd')=(ba')(dc')=(bd)(a'c').

So multiplication does not depend on the chosen representatives.

Read 3.3 Integers from equivalence classes for the previous quotient construction, and 3.5 Gaps in Q and why sqrt(2) is not rational for the next point where the rational number system shows its limitations.

Practice

Work out your answer, then check it. You can revise and try again.

Loading…

Key terms in this unit