Evanalysis
3.4Source-backedEstimated reading time: 2 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.

Note collections

MATH1090: Set theory

Rigorous course notes on logic, sets, and number construction, written in short linked sections with careful proofs and examples.

Chapter 1

Logic

Reasoning tools for statements, connectives, and quantifiers.

Chapter 2

Sets and relations

Basic set language, functions, and relations.

Chapter 4

Order and completeness

Total order, bounds, supremum and infimum, and the completeness gap between Q and R.

The passage from integers to rational numbers changes the construction problem in an important way. For integers, different pairs of natural numbers can encode the same difference. For rationals, different pairs of integers can encode the same quotient. The notation a/b hides that redundancy, so this note makes it explicit.

The guiding idea is simple: rational numbers are not raw pairs. They are equivalence classes of pairs, and every operation on QQ must respect that quotient structure.

Why a quotient is needed

The fractions

12,24,36\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) with aZa \in Z and bZ{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) is written [(a, b)], and it is represented informally by the fraction a/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) 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

Why Q\sim_Q is an equivalence relation

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), (2, 4), and (3,6)(-3, -6).

We have

14=22,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=36.\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)] does not become a different number just because you multiply both coordinates by the same nonzero integer.

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 a0a \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.

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(ad+bc,bd).(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)]=[(ad+bc,bd)].[(ad + bc, bd)] = [(a'd' + b'c', b'd')].

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

Proof

Why the addition formula is well-defined

The multiplication formula is proved in the same spirit, but more quickly: starting from ab=baab' = ba' and cd=dccd' = dc', one obtains

acbd=acbd.acb'd' = a'c'bd.

Thus multiplication is also 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=[(13+21,23)]=[(5,6)].x + y = [(1 \cdot 3 + 2 \cdot 1, 2 \cdot 3)] = [(5, 6)].

Also,

xy=[(11,23)]=[(1,6)].x \cdot y = [(1 \cdot 1, 2 \cdot 3)] = [(1, 6)].

If we replace x by the equivalent representative [(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)] and [(1, 6)], so the class operations behave as they should.

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)] and [(m, n)]:

  1. compare p and m;
  2. compare the sign of pnqmpn - qm;
  3. compare the sign of (pnmq)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

The pair (1, 2) represents the same rational number as (1,2)(-1, -2).

If you test a relation using only p>mp > m or only the sign of pnqmpn - qm, then switching from (1, 2) to (1,2)(-1, -2) can change the answer even though the rational number has not changed.

That is exactly what well-definedness forbids. A statement about rational numbers must survive the change of representatives.

Common mistakes

Common mistake

A quotient class is not one preferred fraction

The symbols [(1, 2)], [(2, 4)], and [(3,6)][(-3, -6)] do not name three different rational numbers. They name one class with three different representatives.

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 any operation or relation on QQ, you must check that equivalent representatives always produce equivalent outputs.

Quick checks

Quick check

Why must the second coordinate in (a, b) be restricted to b0b \neq 0?

Answer in terms of the quotient construction, not everyday arithmetic slogans.

Solution

Answer

Quick check

If a0a \neq 0, what should be the multiplicative inverse of [(a, b)]?

Check the product with the original class.

Solution

Answer

Exercises

Quick check

Show that [(3,5)]=[(9,15)][(3, 5)] = [(9, 15)], and then compute [(3,5)]+[(1,5)][(3, 5)] + [(1, 5)].

First verify equality of classes by the defining relation, then use the class addition formula.

Solution

Guided solution

Quick check

Why does the relation [(p,q)][(m,n)][(p, q)] \prec [(m, n)] defined by p>mp > m fail to be well-defined?

Find equivalent representatives that change the truth value.

Solution

Guided solution

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.

Key terms in this unit