# Integer

This may need some disambiguation information to deal with the computer programming data type.
 Subject classification: this is a mathematics resource .
 Educational level: this is a secondary education resource.
 Educational level: this is a tertiary (university) resource.

The integers are a very fundamental mathematical set on which arithmetic is based. They are the familiar "whole numbers"; that is, they do not include fractional quantities. They include zero and negative whole numbers—the natural numbers are the set that includes only positive whole numbers. That is, the integers are the set $\dots -3, -2, -1, 0, 1, 2, 3, \dots$.

Mathematicians denote the set of integers with an ornate capital letter: $\mathbb{Z}$. They are the 2nd item in this hierarchy of types of numbers:

• The "natural numbers"—$\mathbb{N}$, 0, 1, 2, 3, ...
• The "integers"—$\mathbb{Z}$, positive, negative, and zero
• The "rational numbers"—$\mathbb{Q}$, or fractions, like 355/113
• The "real numbers"—$\mathbb{R}$, including irrational numbers
• The "complex numbers"—$\mathbb{C}$, which give solutions to polynomial equations

## The formal "axiomatic" definition of the integers

Continuing the axiomatic definition of the natural numbers, which are just positive numbers and are defined with the Peano axioms, we can give a formal mathematical definition of the integers. This follows a common motif in formal mathematical definitions—we extend a set by defining a completely abstract set as "those things that have property XYZ", whatever property we need. We will see this motif again in the definition of the rationals ("those things that would be the quotient of 5 over 7", or whatever) and the reals ("those things that would have a square of 2", or whatever.) In the case of the integers, we define zero as sort of "that thing which when added to 7 yields 7". And we define -5 along the lines of "that thing which when added to 9 yields 4".

Here is how we do it.

We define the integers as the set $\mathbb{N}^+$ of strictly positive natural numbers (from the Peano axioms), along with a new element called "zero", and the set of "negative numbers". That is, for each positive natural number x, we define a new number called "-x". We then define all the arithmetical operations for them.

For the positive integers, the operations were already defined, and their properties proven, from the Peano axioms. So we just need to define the operations for cases in which zero or negative numbers are involved.

• Addition: For all positive x and y, we extend addition to all integers as follows. The value of x+(-y) depends on which is larger, x or y.
If x > y, x+(-y) = x-y
If x < y, x+(-y) = -(y-x)
Also, (-y)+x = x+(-y), and (-x)+(-y) = -(x+y)
Finally, x+0 = 0+x = x for all x, positive, negative, or zero.
• Negation: This operator, written "-x", has already been defined for positive numbers. For negative numbers, we define -(-x) = x. Also, -0 = 0.
• Subtraction: We define subtraction for all numbers, positive, negative, or zero, in terms of negation and addition: x-y = x+(-y)
• Multiplication: For negative numbers, we define
x•(-y) = -(x•y)
(-x)•y = -(x•y)
0•x = x•0 = 0
• Ordering: If x and y are both positive numbers:
-x < -y if and only if x > y
-x < 0, -x < y
0 > -y, x > -y
In all cases, x<y means x≠y and y > x

From these definitions, we can then prove all the various commutativity, associativity, and distributivity properties, and the trichotomy law. This is left as an exercise.

## Group and ring properties

The integers, with their property of addition, constitute a group. Groups are extremely important objects in mathematics. A group requires a set (the integers), an operation (addition), an "inverse" operation (negation—the natural numbers don't have this, so they are not a group), and an "identity" operation (zero). To be a group, the operation must be associative, a property which the integers satisfy. Also, since addition is commutative, the integers are an abelian (commutative) group.

Furthermore, the integers have a multiplication operator, satisfying the distributive law, and having a multiplicative identity (1). This makes the integers a ring.