represents the domain of integers, as in x∈Integers.
Integers
represents the domain of integers, as in x∈Integers.
Details
- x∈Integers evaluates immediately if x is a numeric quantity.
- Simplify[expr∈Integers,assum] can be used to try to determine whether an expression is an integer under the given assumptions.
- (x1|x2|…)∈Integers and {x1,x2,…}∈Integers test whether all xi are integers.
- IntegerQ[expr] tests only whether expr is manifestly an integer (i.e. has head Integer).
- Integers is output in StandardForm or TraditionalForm as
. This typeset form can be input using
ints
.
Examples
open all close allBasic Examples (3)
Scope (7)
Test domain membership of a numeric expression:
Element[1234567, Integers]Make domain membership assumptions:
Refine[Sin[n Pi], Element[n, Integers]]FullSimplify[x ^ n + y ^ n == z ^ n, Element[x | y | z | n, Integers] && n > 3 && x y z ≠ 0]Specify the default domain over which a function should work:
f = Expand[(x ^ 999997 - 25x ^ 12345 + 24x)(x - 7)(x ^ 2 - 9)]Find integer roots of a high-degree polynomial:
Reduce[f == 0, x, Integers]Find a representation of an integer as a sum of seven squares:
FindInstance[x ^ 2 + y ^ 2 + z ^ 2 + t ^ 2 + u ^ 2 + v ^ 2 + w ^ 2 == 1234567890987654321, {x, y, z, t, u, v, w}, Integers]Solve an optimization problem over the integers:
Minimize[{x ^ 2 + x y, x y > 1}, {x, y}, Integers]Test whether several numbers are integers:
(x | y | 1)∈IntegersIf any number is explicitly non-integer, the result is False:
{x, y, Pi}∈IntegersTraditionalForm formatting:
Integers//TraditionalFormProperties & Relations (3)
Refine[Element[x, Integers], Element[x, Primes]]Integers is contained in Complexes, Reals, Algebraics, and Rationals:
Refine[Element[x, #], Element[x, Integers]]& /@ {Complexes, Reals, Algebraics, Rationals}IntegerQ returns True for explicit integers and False otherwise:
IntegerQ /@ {7, a, (E + 7) ^ 2 / 7 - E ^ 2 / 7 - 2E}Element remains unevaluated when it cannot decide whether an expression is an integer:
Element[#, Integers]& /@ {7, a, (E + 7) ^ 2 / 7 - E ^ 2 / 7 - 2E}Simplify[%]Related Guides
History
Introduced in 1999 (4.0) | Updated in 2017 (11.2)
Text
Wolfram Research (1999), Integers, Wolfram Language function, https://reference.wolfram.com/language/ref/Integers.html (updated 2017).
CMS
Wolfram Language. 1999. "Integers." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/Integers.html.
APA
Wolfram Language. (1999). Integers. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Integers.html
BibTeX
@misc{reference.wolfram_2026_integers, author="Wolfram Research", title="{Integers}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/Integers.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_integers, organization={Wolfram Research}, title={Integers}, year={2017}, url={https://reference.wolfram.com/language/ref/Integers.html}, note=[Accessed: 13-June-2026]}