[2] The set of all integers is often denoted by the boldface Z or blackboard bold
An integer may be regarded as a real number that can be written without a fractional component.
[12][13] Only positive integers were considered, making the term synonymous with the natural numbers.
The definition of integer expanded over time to include negative numbers as their usefulness was recognized.
[14] For example Leonhard Euler in his 1765 Elements of Algebra defined integers to include both positive and negative numbers.
The use of the letter Z to denote the set of integers comes from the German word Zahlen ("numbers")[3][4] and has been attributed to David Hilbert.
[16] The earliest known use of the notation in a textbook occurs in Algèbre written by the collective Nicolas Bourbaki, dating to 1947.
[19] But by 1961, Z was generally used by modern algebra texts to denote the positive and negative integers.
is often annotated to denote various sets, with varying usage amongst different authors:
Although the natural numbers are closed under exponentiation, the integers are not (since the result can be a fraction when the exponent is negative).
It is also a cyclic group, since every non-zero integer can be written as a finite sum 1 + 1 + ... + 1 or (−1) + (−1) + ... + (−1).
However, not every integer has a multiplicative inverse (as is the case of the number 2), which means that
for all values of variables, which are true in any unital commutative ring.
The lack of zero divisors in the integers (last property in the table) means that the commutative ring
The process of constructing the rationals from the integers can be mimicked to form the field of fractions of any integral domain.
is a principal ideal domain, and any positive integer can be written as the products of primes in an essentially unique way.
is a totally ordered set without upper or lower bound.
The ordering of integers is compatible with the algebraic operations in the following way: Thus it follows that
The integers are the only nontrivial totally ordered abelian group whose positive elements are well-ordered.
[33] First construct the set of natural numbers according to the Peano axioms, call this
The traditional style of definition leads to many different cases (each arithmetic operation needs to be defined on each combination of types of integer) and makes it tedious to prove that integers obey the various laws of arithmetic.
[34] In modern set-theoretic mathematics, a more abstract construction[35][36] allowing one to define arithmetical operations without any case distinction is often used instead.
[37] The integers can thus be formally constructed as the equivalence classes of ordered pairs of natural numbers (a,b).
[38] To confirm our expectation that 1 − 2 and 4 − 5 denote the same number, we define an equivalence relation ~ on these pairs with the following rule: precisely when Addition and multiplication of integers can be defined in terms of the equivalent operations on the natural numbers;[38] by using [(a,b)] to denote the equivalence class having (a,b) as a member, one has: The negation (or additive inverse) of an integer is obtained by reversing the order of the pair: Hence subtraction can be defined as the addition of the additive inverse: The standard ordering on the integers is given by: It is easily verified that these definitions are independent of the choice of representatives of the equivalence classes.
Thus, [(a,b)] is denoted by If the natural numbers are identified with the corresponding integers (using the embedding mentioned above), this convention creates no ambiguity.
Some examples are: In theoretical computer science, other approaches for the construction of integers are used by automated theorem provers and term rewrite engines.
The technique for the construction of integers presented in the previous section corresponds to the particular case where there is a single basic operation pair
This technique of construction is used by the proof assistant Isabelle; however, many other tools use alternative construction techniques, notable those based upon free constructors, which are simpler and can be implemented more efficiently in computers.
An integer is often a primitive data type in computer languages.
Other integer data types are implemented with a fixed size, usually a number of bits which is a power of 2 (4, 8, 16, etc.)