Evanalysis
3.3Estimated reading time: 19 min

3.3 Integers from equivalence classes

Construct the integers from pairs of natural numbers, understand why equivalence classes are needed, and see how the familiar signed numbers reappear.

Course contents

The natural numbers are not enough for every algebraic problem. A simple equation such as

1=x+21 = x + 2

has no solution in NN. So if we want subtraction to become possible in a systematic way, we need a larger number system.

A rigorous construction does not introduce negative numbers by intuition alone. Instead, we construct the integers from objects we already understand well, namely pairs of natural numbers.

The construction has three tasks: identify pairs that should be the same integer, define arithmetic independently of the chosen pair, and embed NN so its old arithmetic survives. The first task gives the objects; the next two show why these objects solve the subtraction problem.

The guiding idea

A pair (a,b)(a,b) is meant to represent the formal difference

a−b.a-b.

From that viewpoint, different pairs can represent the same intended integer. For example,

(3,1),(5,3),(8,6)(3,1), \quad (5,3), \quad (8,6)

all suggest the same difference, namely 22.

So the integer should not be the ordered pair itself. It should be the whole equivalence class of pairs that encode the same difference.

The relation on N2N^2

Definition

The equivalence relation for the integers

Work in the set N2N^2 of ordered pairs of natural numbers.

Define a relation ∼Z\sim_Z by

(a,b)∼Z(c,d)⟺a+d=b+c.(a,b) \sim_Z (c,d) \quad \Longleftrightarrow \quad a+d=b+c.

The integers are defined to be the equivalence classes of this relation.

The equation a+d=b+ca+d=b+c is exactly what we would expect if (a,b)(a,b) and (c,d)(c,d) are both meant to represent the same formal difference:

a−b=c−d.a-b=c-d.

Indeed, rearranging this equality gives precisely a+d=b+ca+d=b+c.

This rearrangement motivates the definition; it is not yet a calculation inside the new ZZ. The actual test a+d=b+ca+d=b+c uses only addition in NN, where every term is already defined. The equivalence proof below therefore uses natural-number laws, without assuming the integer subtraction we are constructing.

Why this relation is the right one

Theorem

The relation really is an equivalence relation

The relation ∼Z\sim_Z on N2N^2 is reflexive, symmetric, and transitive, so it is an equivalence relation.

The proof is not difficult, but it is worth understanding because it explains why quotient constructions work.

Proof: ∼Z\sim_Z is an equivalence relation

For reflexivity, every pair satisfies

a+b=b+a,a+b=b+a,

so (a,b)∼Z(a,b)(a,b)\sim_Z(a,b).

For symmetry, if (a,b)∼Z(c,d)(a,b)\sim_Z(c,d), then a+d=b+ca+d=b+c. The same equality can be read backwards as c+b=d+ac+b=d+a, so (c,d)∼Z(a,b)(c,d)\sim_Z(a,b).

For transitivity, suppose

(a,b)∼Z(c,d)and(c,d)∼Z(e,f).(a,b)\sim_Z(c,d) \quad \text{and} \quad (c,d)\sim_Z(e,f).

Then

a+d=b+c,c+f=d+e.a+d=b+c, \qquad c+f=d+e.

Adding these equalities and cancelling c+dc+d on both sides gives

a+f=b+e,a+f=b+e,

which means (a,b)∼Z(e,f)(a,b)\sim_Z(e,f).

What an integer now is

Definition

Integers as quotient classes

Let X=N2X=N^2. The set of integers is

Z=X/∼Z.\mathbf{Z} = X/{\sim_Z}.

For a pair (a,b)∈N2(a,b) \in N^2, its equivalence class is written

[(a,b)]={(c,d)∈N2:(c,d)∼Z(a,b)}.[(a,b)] = \{(c,d)\in N^2 : (c,d)\sim_Z(a,b)\}.

So an integer is not one pair, but an entire class of equivalent pairs.

This construction explains how the familiar numbers reappear:

  • [(0,0)][(0,0)] behaves like 00;
  • [(1,0)][(1,0)] behaves like 11;
  • [(0,1)][(0,1)] behaves like −1-1;
  • more generally, [(n,0)][(n,0)] gives the usual natural number nn.

Embedding the natural numbers

The natural numbers are still present inside the integers. They are not lost; they are reinterpreted.

Worked example

How NN sits inside ZZ

Define a map from NN to ZZ by

n⟼[(n,0)].n \longmapsto [(n,0)].

Under this map,

0↦[(0,0)],1↦[(1,0)],2↦[(2,0)].0 \mapsto [(0,0)], \qquad 1 \mapsto [(1,0)], \qquad 2 \mapsto [(2,0)].

So the old natural numbers appear inside the new system as particular equivalence classes.

This is why quotient constructions do not destroy previous number systems. They usually enlarge them while preserving a recognizable copy inside the new one.

Positive, negative, and zero

The important point is that sign is not attached to one chosen pair, but to the entire class.

  • an integer is positive when it has representatives (a,b)(a,b) with a>ba\gt b;
  • it is negative when it has representatives with aa less than bb;
  • it is zero when it has representatives with a=ba=b.

Because these properties must not depend on the chosen representative, one also has to check that sign is well defined on equivalence classes.

Proof: sign is well-defined

Suppose (a,b)∼Z(c,d)(a,b)\sim_Z(c,d), so a+d=b+ca+d=b+c. If a>ba\gt b, write a=b+ka=b+k for some positive k∈Nk\in N. Substitution gives (b+k)+d=b+c(b+k)+d=b+c, and natural-number cancellation gives c=d+kc=d+k, so c>dc\gt d. Exchanging the coordinates gives the corresponding statement for negative classes; if a=ba=b, then the relation gives c=dc=d. Thus positivity, negativity, and zero are properties of the class.

Arithmetic on equivalence classes

To turn the quotient set into a number system, we still need operations. Addition is defined by

[(a,b)]+[(c,d)]:=[(a+c,b+d)].[(a,b)] + [(c,d)] := [(a+c,b+d)].

This definition matches the formal-difference intuition:

(a−b)+(c−d)=(a+c)−(b+d).(a-b)+(c-d)=(a+c)-(b+d).

The next step is to check that such definitions are well defined, meaning they do not depend on the representatives chosen.

Proof: integer addition is well-defined

If (a,b)∼Z(a′,b′)(a,b)\sim_Z(a',b') and (c,d)∼Z(c′,d′)(c,d)\sim_Z(c',d'), then

a+b′=b+a′,c+d′=d+c′.a+b'=b+a', \qquad c+d'=d+c'.

Adding these equalities and rearranging in NN gives

(a+c)+(b′+d′)=(b+d)+(a′+c′).(a+c)+(b'+d')=(b+d)+(a'+c').

This is exactly (a+c,b+d)∼Z(a′+c′,b′+d′)(a+c,b+d)\sim_Z(a'+c',b'+d'), so the addition formula descends from pairs to integer classes.

A concrete class calculation

Worked example

Recognizing one integer through several representatives

Consider the class [(2,5)][(2,5)].

Since

2+4=5+1,2+4 = 5+1,

we have

(2,5)∼Z(1,4).(2,5)\sim_Z(1,4).

Likewise,

2+7=5+4,2+7 = 5+4,

so

(2,5)∼Z(4,7).(2,5)\sim_Z(4,7).

All of these pairs represent the same integer, namely the one we would usually think of as −3-3.

Explore what a representative can change

At this point, it is useful to test the defining relation directly. The following panel keeps the class fixed while you change representatives and asks whether a second pair lies in the same class.

Read and try

Explore representatives of one integer

The explorer shows how changing representatives inside one integer class preserves the formal difference.

Use whole numbers from 0 to 1,000,000. Inputs are rounded down and kept within this range.

Chosen representative

(2, 5)

Formal difference: 2 - 5 = -3

Shifted representative

(2, 5) -> (5, 8)

5 - 8 = -3

Test another pair

(4, 7)

Formal difference: 4 - 7 = -3

Equivalence test

2 + 7 = 5 + 4

Same class

Sign of the class: negative

The important lesson is that equality in ZZ is not componentwise equality of pairs. It is equality of equivalence classes. Two very different looking pairs can be the same integer if the cross-sum condition a+d=b+ca+d=b+c holds.

Subtraction and multiplication

The same quotient viewpoint also gives formulas for the ordinary arithmetic of signed integers. Since [(a,b)][(a,b)] represents the formal difference a−ba-b, we should define subtraction by

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

This matches the formal calculation

(a−b)−(c−d)=(a+d)−(b+c).(a-b)-(c-d)=(a+d)-(b+c).

Multiplication is slightly more delicate, because the signs interact:

(a−b)(c−d)=ac+bd−(ad+bc).(a-b)(c-d)=ac+bd-(ad+bc).

So the product is defined by

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

Theorem

The multiplication formula must be well-defined

If (a,b)∼Z(a′,b′)(a,b)\sim_Z(a',b') and (c,d)∼Z(c′,d′)(c,d)\sim_Z(c',d'), then

(ac+bd,ad+bc)∼Z(a′c′+b′d′,a′d′+b′c′).(ac+bd,ad+bc)\sim_Z(a'c'+b'd',a'd'+b'c').

Therefore the product class does not depend on the representatives chosen.

Proof: integer multiplication is well-defined

Assume the hypotheses

a+b′=b+a′,c+d′=d+c′.a+b'=b+a', \qquad c+d'=d+c'.

To prove that the two proposed product representatives are equivalent, the definition of ∼Z\sim_Z asks us to show

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

First change only the representative of the first factor. Multiplying a+b′=b+a′a+b'=b+a' by cc and by dd gives

ac+b′c=bc+a′c,ad+b′d=bd+a′d.ac+b'c=bc+a'c, \qquad ad+b'd=bd+a'd.

Therefore, using only associativity and commutativity of addition in NN,

(ac+bd)+(a′d+b′c)=(ac+b′c)+(bd+a′d)=(bc+a′c)+(ad+b′d)=(ad+bc)+(a′c+b′d).\begin{aligned} (ac+bd)+(a'd+b'c) &=(ac+b'c)+(bd+a'd)\\ &=(bc+a'c)+(ad+b'd)\\ &=(ad+bc)+(a'c+b'd). \end{aligned}

This proves equivalence with the product formed from (a′,b′)(a',b') and (c,d)(c,d). Now keep (a′,b′)(a',b') fixed and apply c+d′=d+c′c+d'=d+c', multiplying by a′a' and b′b'; the same natural-number rearrangement proves equivalence with the product formed from (c′,d′)(c',d'). Transitivity gives the claimed output equivalence. No subtraction or integer multiplication is used in this proof.

Arithmetic laws inherited from N

The quotient operations inherit their laws from natural-number arithmetic. For example, addition associativity is checked by expanding representatives:

([(a,b)]+[(c,d)])+[(e,f)]=[(a+c+e,b+d+f)]=[(a,b)]+([(c,d)]+[(e,f)]).([(a,b)]+[(c,d)])+[(e,f)] =[(a+c+e,b+d+f)] =[(a,b)]+([(c,d)]+[(e,f)]).

The two displayed representatives are equal by associativity in NN. The same representative expansion, using commutativity and distributivity in NN, proves commutativity and associativity of integer addition and multiplication and the distributive laws. This is a transport argument: once well-definedness is known, each natural-number identity can be applied coordinatewise to the formulas on classes.

The canonical embedding also preserves the operations: [(n,0)]+[(m,0)]=[(n+m,0)][(n,0)]+[(m,0)]=[(n+m,0)] and [(n,0)]⋅[(m,0)]=[(n⋅m,0)][(n,0)]\cdot[(m,0)]=[(n\cdot m,0)]. It is injective because [(n,0)]=[(m,0)][(n,0)]=[(m,0)] gives n+0=0+mn+0=0+m, hence n=mn=m in NN.

The order on Z

Define the integer order by

x<y⟺y−x is positive,x\lt y\quad\Longleftrightarrow\quad y-x\text{ is positive},

where y−xy-x means y+(−x)y+(-x). The signed representative result gives trichotomy: for every x,yx,y, exactly one of y−xy-x is positive, zero, or negative, so exactly one of x<yx\lt y, x=yx=y, or y<xy\lt x holds.

The order is transitive. If x<yx\lt y and y<zy\lt z, then y−xy-x and z−yz-y are positive. Their sum is positive by the signed representative calculation, and

(z−y)+(y−x)=z−x(z-y)+(y-x)=z-x

by the already established ring laws; hence x<zx\lt z. It is translation invariant because

(y+t)−(x+t)=y−x,(y+t)-(x+t)=y-x,

so x<yx\lt y exactly when x+t<y+tx+t\lt y+t. Finally, if 0<x0\lt x and 0<y0\lt y, their canonical signed representatives are [(k,0)][(k,0)] and [(ℓ,0)][(\ell,0)] with positive natural k,ℓk,\ell; the multiplication formula gives [(k⋅ℓ,0)][(k\cdot\ell,0)], which is positive because positive natural factors have positive product. Thus positive products preserve positivity in ZZ before the rational construction uses the ordered integer system.

For t>0t\gt0, if x<yx\lt y, distributivity gives ty−tx=t(y−x)>0ty-tx=t(y-x)\gt0, so tx<tytx\lt ty. Conversely, if tx<tytx\lt ty, trichotomy rules out x=yx=y and y<xy\lt x (the latter would give ty<txty\lt tx). Therefore multiplication by a positive integer preserves and reflects strict inequalities.

ZZ has no zero divisors

Every nonzero integer has a canonical signed representative. If [(a,b)]≠[(0,0)][(a,b)]\ne[(0,0)], then either a=b+ka=b+k or b=a+kb=a+k for some positive k∈Nk\in N. In the first case [(a,b)]=[(k,0)][(a,b)]=[(k,0)]; in the second, [(a,b)]=[(0,k)][(a,b)]=[(0,k)]. Thus two nonzero integers have representatives of the forms [(k,0)][(k,0)] or [(0,k)][(0,k)], with k>0k\gt 0.

The multiplication formula reduces their product to [(k⋅ℓ,0)][(k\cdot\ell,0)] when the signs agree and [(0,k⋅ℓ)][(0,k\cdot\ell)] when they differ. Since positive natural numbers have nonzero product, the product is not zero. Therefore x≠0x\ne0 and y≠0y\ne0 imply x⋅y≠0x\cdot y\ne0 in ZZ. This fact is established here before the construction of QQ uses cancellation in ZZ.

Common mistakes

Common mistake

The integer is not the pair

The pair (a,b)(a,b) is only a representative. The actual integer is the entire equivalence class [(a,b)][(a,b)].

Common mistake

Different representatives can describe the same number

Pairs such as (3,1)(3,1) and (5,3)(5,3) are not different integers. They belong to the same class because they encode the same difference.

Quick checks

Checkpoint

Are (2,0)(2,0) and (5,3)(5,3) equivalent under ∼Z\sim_Z?

Apply the rule a+d=b+ca+d=b+c directly.

Solution · Answer

Yes. We compute

2+3=0+5,2+3=0+5,

so (2,0)∼Z(5,3)(2,0)\sim_Z(5,3).

Checkpoint

Which class should represent the integer −1-1?

Use the idea that the pair records a formal difference.

Solution · Answer

The class [(0,1)][(0,1)] represents −1-1, because the formal difference is 0−10-1. Any equivalent pair such as (2,3)(2,3) represents the same integer.

Checkpoint

Why do we need equivalence classes instead of just using raw ordered pairs?

Answer in one careful sentence.

Solution · Answer

We need equivalence classes because many different ordered pairs encode the same formal difference, and the integer must identify all of those representatives as one object.

Exercises

Checkpoint

Show that [(4,1)]=[(7,4)][(4,1)] = [(7,4)], and decide whether the class is positive, negative, or zero.

Check equivalence first, then interpret the sign from a representative.

Solution · Guided solution

We compute

4+4=1+7,4+4 = 1+7,

so (4,1)∼Z(7,4)(4,1)\sim_Z(7,4), which means

[(4,1)]=[(7,4)].[(4,1)] = [(7,4)].

Since 4>14\gt 1, the class is positive. In ordinary notation, it represents the integer 33.

Read this first

This note depends on the language of equivalence relations from 2.2 Functions and relations and continues into 3.4 Rationals and well-defined operations.

Practice

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

Loading…

Key terms in this unit