Integers and Rationals

Integers arise as equivalence classes of natural pairs with (a,b)∼(c,d)  ⟺  a+d=b+c(a,b)\sim(c,d)\iff a+d=b+c, and rationals as classes of integer pairs with (a,b)∼(c,d)  ⟺  ad=bc(a,b)\sim(c,d)\iff ad=bc. The "numbers as equivalence classes" trick returns when the reals are built from the rationals.

(a,b)∼(c,d)  ⟺  a+d=b+c(a,b)\sim(c,d)\iff a+d=b+c
(a,b)∼(c,d)  ⟺  ad=bc(a,b)\sim(c,d)\iff ad=bc
p<q  ⟹  p<p+q2<qp<q \implies p<\frac{p+q}{2}<q
ab⋅ba=1\frac{a}{b}\cdot\frac{b}{a}=1

Part of these learning paths

Examples & Exercises

Assume (a,b)∼(a′,b′)(a,b)\sim(a',b') and (c,d)∼(c′,d′)(c,d)\sim(c',d'). Prove that (a+c,b+d)∼(a′+c′,b′+d′)(a+c,b+d)\sim(a'+c',b'+d'). (This says the addition [(a,b)]+[(c,d)]=[(a+c,b+d)][(a,b)]+[(c,d)]=[(a+c,b+d)] is well-defined, independent of the chosen representatives.)

(a,b)∼(a′,b′), (c,d)∼(c′,d′)(a,b)\sim(a',b'),\ (c,d)\sim(c',d')
(a+c,b+d)∼(a′+c′,b′+d′)(a+c,b+d)\sim(a'+c',b'+d')
Integers mode — each dot is a class of pairs, and addition is the same whichever representatives are chosen.
Show proof
  1. By definition of the relation, (a,b)∼(a′,b′)(a,b)\sim(a',b') means a+b′=a′+ba+b'=a'+b and (c,d)∼(c′,d′)(c,d)\sim(c',d') means c+d′=c′+dc+d'=c'+d.
  2. Adding the two equations side by side gives (a+b′)+(c+d′)=(a′+b)+(c′+d)(a+b')+(c+d')=(a'+b)+(c'+d). Rearranging with the associativity and commutativity of natural-number addition yields (a+c)+(b′+d′)=(a′+c′)+(b+d)(a+c)+(b'+d')=(a'+c')+(b+d).
  3. This is exactly the definition of (a+c,b+d)∼(a′+c′,b′+d′)(a+c,b+d)\sim(a'+c',b'+d'). So the value of [(a,b)]+[(c,d)][(a,b)]+[(c,d)] never depends on which representatives of the two classes are chosen — addition on Z\mathbb{Z} is well-defined.

For rationals p<qp<q, prove that m=p+q2m=\frac{p+q}{2} is rational and p<m<qp<m<q.

p<q  ⟹  p<p+q2<qp<q \implies p<\frac{p+q}{2}<q
Rationals mode, max denominator 4 — between any two rationals sits another dot.
Show proof
  1. Write p=abp=\frac{a}{b} and q=cdq=\frac{c}{d} with b>0, d>0b>0,\ d>0. Then m=p+q2=ad+bc2bdm=\frac{p+q}{2}=\frac{ad+bc}{2bd}: numerator and denominator are integers and the denominator is nonzero, so mm is rational.
  2. Since p<qp<q, adding pp to both sides gives 2p<p+q2p<p+q; dividing by the positive 22 preserves the inequality, so p<p+q2=mp<\frac{p+q}{2}=m.
  3. Likewise, adding qq to both sides of p<qp<q gives p+q<2qp+q<2q, i.e. m<qm<q. Hence p<m<qp<m<q — between any two rationals there is always another rational, so the rationals are dense. Integers lack this property (no integer lies strictly between consecutive integers).

For a nonzero rational ab\frac{a}{b}, prove that ba\frac{b}{a} is its multiplicative inverse, and explain why this makes Q\mathbb{Q} a field.

ab⋅ba=1(a≠0)\frac{a}{b}\cdot\frac{b}{a}=1\qquad(a\ne 0)
Rationals mode, max denominator 4 — every nonzero dot has a multiplicative inverse.
Show proof
  1. ab≠0\frac{a}{b}\ne 0 means a≠0a\ne 0 (and b≠0b\ne 0 is part of being a rational). So the fraction ba\frac{b}{a}, whose denominator a≠0a\ne 0, is a legitimate rational.
  2. By the definition of fraction multiplication, ab⋅ba=abba\frac{a}{b}\cdot\frac{b}{a}=\frac{ab}{ba}. Commutativity gives ab=baab=ba, so this fraction equals abab=1\frac{ab}{ab}=1. Hence ba\frac{b}{a} is the multiplicative inverse of ab\frac{a}{b}.
  3. Since every nonzero rational has an inverse, division by a nonzero number is always possible in Q\mathbb{Q} — together with the well-defined addition and multiplication, Q\mathbb{Q} is a field. The field axioms and their structure are covered in the groups-fields scene.

1. Number Systems