Is the set of natural numbers closed under subtraction?

I was reading my textbook right now on elementary number theory, and this question came up. It got me wondering: How can subtraction be performed on two elements $x,y\in\mathbb{N}$ if subtraction is defined by $x-y=x+(-y)$, and $\forall a\in\mathbb{N}, 0<a<\infty$?

I realize that $1-10=-9$, which is not in $\mathbb{N}$. But the question just bothered me, because I wonder if you can technically subtract two elements of $\mathbb{N}$?

Solutions Collecting From Web of "Is the set of natural numbers closed under subtraction?"

Regular subtraction is not well-defined on the natural numbers. In natural number contexts one often deals instead with truncated subtraction, which is defined: $$a\dot-b = \begin{cases}0,&\text{if $a\le b$}\\ a-b&\text{if $a\ge b$}\end{cases}$$

For example, one can define a truncated subtraction in Peano arithmetic as follows:
0 & \dot- & n & = 0 \\
Sn & \dot- & 0 & = Sn \\
Sn & \dot- & Sm & = n\dot- m

One can similarly define it in the context of Church numerals, or in the context of total recursive functions.

This is often sufficient for whatever purposes one needs subtraction.

When one subtracts a natural number from another, say $1-2=-1$, one may not get a natural number. However, this does not forbid us from defining substraction. Substraction would be closed if we enlarge the set to the set of all integers.

Subtraction is partially defined in $\Bbb N$, i.e. it is defined only for some pairs of natural numbers. You cannot define it as $x-y=x+(-y)$, though, since $-y\notin \Bbb N$.

You can define $x-y=z$ for $x,y\in \Bbb N$ just as the $z\in \Bbb N$, if it exists, such that $y+z=x$.

No, subtraction is not closed on the set of natural numbers.

One can define the difference between $a$ and $b$, $a, b \in \mathbb N\,$ in terms of the magnitude of the difference: taking the absolute value: $|a – b|$ for $a, b \in \mathbb N$, but the problem with “normal subtraction” is that $\,a – b = a + (-b)$. And here, $-b$ is the additive inverse of $b$: and since here we have $b \in \mathbb N$, unless $b = 0$ (if $\mathbb N$ includes $0$), $-b \notin \mathbb N$.

  • The additive inverse of an integer $n$ is the number such that for any $n \in \mathbb Z$, $\,n + -n = -n + n = 0,\;$ where $\,0\,$ is the additive identity.

  • Hence, we have the integers, which are closed under subtraction, (or rather closed under inverses), and hence defining subtraction on the integers presents no problems.

  • However, for all $n \in \mathbb N$, n\neq 0,\; -n \notin \mathbb N$. That, essentially, is what is meant when we say that the set of natural numbers is not closed under subtraction (…because it is not closed under inverses).

When we write for the natural numbers $a-b=c$ we mean that the number $c$ is the natural number (if it exists) that verify $c+b=a$ so the subtraction is defined by the sum operation. Now if we write for example $1-10=c$, the question is are there a natural number $c$ s.t $c+10=1$? The answer is obviously NO! so the set of natural number is not closed under subtraction.

You can prove that for any natural numbers $a,b$ there is at most one $c$ such that $b+c=a$. That means that we can define $z=a-b$ to mean $z+b=a$. This means that if $z=a-b$ and $w=a-b$ then $z=w$ – that is, subtraction is well-defined when it is defined.

You could also just define the integers based on the naturals, and define subtraction there for all pairs of integers.