Integer

An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...).

Uses your system voice; voice and rate in settings.

≈ 6 min read

Cite, export and learn8 citation formats · 8 exports · lesson and quiz

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative integers.

The set of all integers is often denoted by the boldface or blackboard bold The set of natural numbers is a subset of , which in turn is a subset of the set of all rational numbers , itself a subset of the real numbers . Like the set of natural numbers, the set of integers is countably infinite.

An integer may be regarded as a real number that can be written without a fractional component. For example, 21, 4, 0, and −2048 are integers, while 9.75, , 5/4, and the square root of 2 are not. The integers form the smallest group and the smallest ring containing the natural numbers.

In algebraic number theory, integers are sometimes called rational integers to distinguish them from the more general algebraic integers. In fact, (rational) integers are algebraic integers that are also rational numbers.

Order-theoretic properties

is a totally ordered set without upper or lower bound. The ordering of is given by: \cdots An integer is positive if it is greater than zero, and negative if it is less than zero. Zero is defined as neither negative nor positive.

The ordering of integers is compatible with the algebraic operations in the following way: If and , then If and , then Thus it follows that together with the above ordering is an ordered ring. The integers are the only nontrivial totally ordered abelian group whose positive elements are well-ordered.

This is equivalent to the statement that any Noetherian valuation ring is either a field—or a discrete valuation ring.

Construction

-x = \begin{cases} \psi(x), & \text{if } x \in P \\ \psi^{-1}(x), & \text{if } x \in P^- \\ 0, & \text{if } x = 0 \end{cases} 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. s. Linked red points are equivalence classes representing the blue integers at the end of the line.|upright=1.5 In modern set-theoretic mathematics, a more abstract construction allowing one to define arithmetical operations without any case distinction is often used instead. The integers can thus be formally constructed as the equivalence classes of ordered pairs of natural numbers .

The intuition is that stands for the result of subtracting from . To confirm our expectation that and denote the same number, we define an equivalence relation on these pairs with the following rule: (a,b)\sim(c,d) precisely when a+d=b+c . Addition and multiplication of integers can be defined in terms of the equivalent operations on the natural numbers; by using to denote the equivalence class having as a member, one has: [(a,b)]+[(c,d)]:=[(a+c,b+d)] . [(a,b)]\cdot[(c,d)]:=[(ac+bd,ad+bc)] .

The negation (or additive inverse) of an integer is obtained by reversing the order of the pair: -[(a,b)]:=[(b,a)] . Hence subtraction can be defined as the addition of the additive inverse: [(a,b)]-[(c,d)]:=[(a+d,b+c)] . The standard ordering on the integers is given by: [(a,b)] if and only if a+d . It is easily verified that these definitions are independent of the choice of representatives of the equivalence classes. Every equivalence class has a unique member that is of the form or (or both at once).

The natural number is identified with the class (i.e., the natural numbers are embedded into the integers by map sending to ), and the class is denoted (this covers all remaining classes, and gives the class a second time since −0 = 0. Thus, is denoted by \begin{cases} a-b,&\mbox{if }a\ge b\\ -(b-a),&\mbox{if }a If the natural numbers are identified with the corresponding integers (using the embedding mentioned above), this convention creates no ambiguity.

This notation recovers the familiar representation of the integers as . Some examples are: \begin{alignat}{3} 0 &= [(0,0)] &&= [(1,1)] &&= \ \cdots \ &&= [(k,k)],\\ 1 &= [(1,0)] &&= [(2,1)] &&= \ \cdots \ &&= [(k+1,k)],\\ -1 &= [(0,1)] &&= [(1,2)] &&= \ \cdots \ &&= [(k,k+1)],\\ 2 &= [(2,0)] &&= [(3,1)] &&= \ \cdots \ &&= [(k+2,k)],\\ -2 &= [(0,2)] &&= [(1,3)] &&= \ \cdots \ &&= [(k,k+2)]. \end{alignat}

Computer science

An integer is often a primitive data type in computer languages. However, integer data types can only represent a subset of all integers, since practical computers are of finite capacity. Also, in the common two's complement representation, the inherent definition of sign distinguishes between "negative" and "non-negative" rather than "negative, positive, and 0".

(It is, however, certainly possible for a computer to determine whether an integer value is truly positive.) Fixed length integer approximation data types (or subsets) are denoted int or Integer in several programming languages (such as Algol68, C, Java, Delphi, etc.). Variable-length representations of integers, such as bignums, can store any integer that fits in the computer's memory.

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.) or a memorable number of decimal digits (e.g., 9 or 10).

Cardinality

The set of integers is countably infinite, meaning it is possible to pair each integer with a unique natural number. An example of such a pairing is More technically, the cardinality of is said to equal (aleph-null). The pairing between elements of and is called a bijection.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1377285574 under CC BY-SA 4.0; modifications have been made.

Words in each sectionConstructionConstructionConstruction: 491 words491Computer scienceComputer scienceComputer science: 158 words158Order-theoretic propert…Order-theoretic propertiesOrder-theoretic properties: 111 words111CardinalityCardinalityCardinality: 68 words68
Words in each section. Measured from the stored article body; sections below the minimum are not plotted.

Provenance

snapshot enwiki-001377285574 · captured 2026-09-28 · ledger · version history

Cite this page as: encyclopegia.org, “Integer”, snapshot enwiki-001377285574. https://encyclopegia.org/a/integer

Sources cited in this revision

31 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.