I don't understand this definition of the integers.

Well, what do we think of when we think of the integers? The integers are the natural numbers, $0$, and the negative natural numbers. In the natural numbers, we have addition, but by introducing the integers, we get subtraction. Therefore, we can say that any integer is just the difference of two natural numbers: For any $z \in \Bbb{Z}$, there are $m, n \in \Bbb{N}$ such that $m-n=z$.

Now that we know that, how can we use that to form a formal definition of the integers? Well, we know we need two natural numbers $m, n$. We can get this from the set $\Bbb{N} \times \Bbb{N}$, which is the set of ordered pairs of natural numbers. Then, to get an integer from the ordered pair, we just map $(m, n)$ to $m-n$.

However, if we have two ordered pairs $(m, n)$ and $(p, q)$ where $m-n=p-q$, then we have two ordered pairs that map to the same integer. Therefore, we need these two ordered pairs to be "equal" somehow. This is where $R$ comes in. $(m, n)R(p, q)$ is the same as $m-n=p-q$. However, we want to base $R$ solely off the natural numbers, meaning no subtraction. Therefore, we manipulate the equation to get: $$(m, n)R(p, q) \iff m+q=p+n$$


Thus, that's how these people got this definition of the integers: They partitioned ordered pairs of natural numbers based off the difference of their elements. For example, here's the set of ordered pairs that represent $0$: $$0=\{(0, 0), (1, 1), (2, 2), ...\}$$ All of these elements have a difference of $0$ between their elements. If you test any of them against the $(m, n)R(p, q)$ relation, the relation holds true: $$(1, 1)R(2, 2) \iff 1+2=1+2 \iff 3=3$$

Now, here's another example: $$2=\{(2, 0), (3, 1), (4, 2), ...\}$$ All of these elements have a difference of $2$ between their elements. If you test any of them against the $(m, n)R(p, q)$ relation, the relation holds true: $$(2, 0)R(4, 2) \iff 2+2=0+4 \iff 4=4$$

Now, here's where the cleverness starts to come in: $$-1=\{(0, 1), (1, 2), (2, 3), ...\}$$ All of these elements have a difference of $-1$ between their elements. If you test any of them against the $(m, n)R(p, q)$ relation, the relation holds true: $$(1, 2)R(2, 3) \iff 1+3=2+2 \iff 4=4$$

Thus, using this partition, we were able to define a negative number using only addition and ordered pairs of natural numbers by making $(1, 0)$ maps to $+1$ while $(0, 1)$ maps to $-1$, which is the small trick behind all of this complex relation stuff.


Formally you can't define a subtraction on $\mathbb{N}$, since an expression like $2-3$ wouldn't make any sense in $\mathbb{N}$. Nevertheless you can still define the subtraction implicitly via the addition by rewriting the relation $$b-x = a \Leftrightarrow a+x = b.$$ With the equation on the right-hand side $x$ is uniquely determined by the pair $(a,b) \in \mathbb{N} \times \mathbb{N}$, but choosing a different pair $(a',b')$ could result in the same $x$ as before, for example for $(a',b')=(a+1,b+1)$ we get $$a+x = b \Leftrightarrow (a+1)+x = (b+1).$$ You now want to identify all pairs $(a,b)$, which define the same $x$, so your goal is $$(a,b) \sim (a',b') :\Leftrightarrow (a,b) \text{ and } (a',b') \text{ define the same } x.$$ This is exactly done by the equivalence relation you mentioned above and the set of all solutions to the problem $a+x=b$ for $a,b \in \mathbb{N}$ is obviously $\mathbb{Z}$.