{
  "id": "integer",
  "title": "整数",
  "lang": "zh-Hans",
  "source_lang": "en",
  "summary": "整数包括零、正整数和负整数，构成对加法、减法和乘法封闭的基本数系。",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/zh/integer/",
  "translations": {
    "en": {
      "url": "https://aiwiki.page/en/integer/",
      "json": "https://aiwiki.page/en/integer.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "整数是属于集合\n\n\\[\\mathbb Z=\\{\\ldots,-3,-2,-1,0,1,2,3,\\ldots\\}\\]\n\n的数。整数包括用于计数的正数、零以及计数所用正数的相反数，不包括 \\(1/2\\) 和 \\(\\sqrt2\\) 等非整数。在初等数学中，整数将计数扩展到方向或符号相反的量，例如收益与损失，或参照点上方与下方的位置。（openstax.org）"
    },
    {
      "heading": "定义及其在数系中的位置",
      "text": "正整数是 \\(1,2,3,\\ldots\\)，负整数是 \\(-1,-2,-3,\\ldots\\)。零既不是正数，也不是负数。非负整数包括零和正整数。英语中的“whole numbers”通常指非负整数，而自然数是否包含零，则因约定而异。（openstax.org）\n\n每个整数都是有理数，因为 \\(n=n/1\\)，因此也都是实数。反过来则不成立：许多有理数和实数并不是整数。这种包含关系针对的是数值，而不是书写形式。例如，\\(6/2\\) 虽然写成分数形式，却表示整数 \\(3\\)。有理数可以由分母非零的整数之比构造出来。（pancratz.org）"
    },
    {
      "heading": "顺序与大小",
      "text": "在数轴上，整数对应等距排列的点，相邻整数之间相距一个单位。数值向右递增，例如 \\(-5<-2<0<3\\)。每个整数 \\(n\\) 都有紧邻的前一个整数 \\(n-1\\) 和后一个整数 \\(n+1\\)。整数没有最大值或最小值，两个相邻整数之间也不存在其他整数。（openstax.org）\n\n绝对值 \\(|n|\\) 表示整数到零的距离，与其正负号无关。因此，\\(|-7|=|7|=7\\)。互为相反数的整数具有相同的绝对值，但它们的位置和大小关系不同。例如，尽管 \\(7>4\\)，却有 \\(-7<-4\\)。（openstax.org）\n\n在集合论中，整数集是一个可数无限集。整数可以排列为 \\(0,1,-1,2,-2,\\ldots\\)，从而与非负整数建立一一对应关系。因此，加入负数并不会增大自然数系的无限基数。（math.libretexts.org）"
    },
    {
      "heading": "算术与代数结构",
      "text": "整数算术中的加法、减法和乘法具有封闭性：对两个整数进行其中任一种运算，结果仍是整数。加法和乘法都满足结合律与交换律，乘法对加法满足分配律。零是加法单位元，一是乘法单位元，每个整数 \\(n\\) 都有加法逆元 \\(-n\\)。（math.libretexts.org）\n\n整数对除法并不封闭，例如 \\(7/2\\) 不是整数。只有 \\(1\\) 和 \\(-1\\) 的乘法逆元仍是整数。除以零没有定义。在抽象代数中，这些性质使 \\(\\mathbb Z\\) 成为一个有单位元的交换环，但它不是域（数学）。它也是一个整环：只有至少一个因数为零时，整数的乘积才会为零。（math.libretexts.org）"
    },
    {
      "heading": "形式化构造",
      "text": "整数可以由自然数构造出来，而无须预先假定减法已经存在。约定自然数包含零，考虑用于表示 \\(a-b\\) 的有序对 \\((a,b)\\)。定义一个等价关系：\n\n\\[(a,b)\\sim(c,d)\\quad\\text{当且仅当}\\quad a+d=b+c.\\]\n\n于是，一个整数就是这类有序对的一个等价类。例如，\\((3,1)\\)、\\((4,2)\\) 和 \\((2,0)\\) 都表示 \\(2\\)。（builds.openlogicproject.org）\n\n用 \\([(a,b)]\\) 表示一个等价类，加法定义为\n\n\\[[(a,b)]+[(c,d)]=[(a+c,b+d)].\\]\n\n取相反数则是交换两个坐标。自然数 \\(n\\) 对应 \\([(n,0)]\\)，其相反数对应 \\([(0,n)]\\)，而所有形如 \\((a,a)\\) 的代表元都表示零。这些定义不依赖于所选的代表元。（builds.openlogicproject.org）"
    },
    {
      "heading": "整除与数论",
      "text": "整数是初等数论的主要研究对象。如果存在整数 \\(k\\)，使得 \\(b=ak\\)，就称整数 \\(a\\) 整除 \\(b\\)。素数是大于一、且正因数只有一和它本身的正整数。算术基本定理指出，每个大于一的整数都有唯一的素因数分解，其中不计各因数的排列顺序。（math.libretexts.org）\n\n带余除法定理指出，对于任意整数 \\(a\\) 和正整数 \\(b\\)，存在唯一的整数 \\(q,r\\)，满足\n\n\\[a=bq+r,\\qquad 0\\le r<b.\\]\n\n这个定理也适用于被除数为负数的情况，例如 \\(-7=3(-3)+2\\)。反复进行带余除法，是求最大公因数的欧几里得算法的基础。（math.libretexts.org）\n\n在模算术中，如果正整数 \\(m\\) 整除 \\(a-b\\)，就称整数 \\(a,b\\) 模 \\(m\\) 同余。同余关系根据余数将整数分组；模二时，这些类分别是偶数和奇数。加法和乘法都保持同余关系。（math.libretexts.org）"
    },
    {
      "heading": "计算机中的整数",
      "text": "数学上的整数没有预设的大小限制，但编程语言中的整数类型可能有固定的取值范围。例如，Java 的 int 使用 32 位有符号补码表示，取值范围为 \\(-2^{31}\\) 至 \\(2^{31}-1\\)。超出该范围的运算结果会发生溢出，而不能保持为精确的数学整数。（docs.oracle.com）\n\n另一些实现则提供任意精度运算。在 Python 的数值模型中，整数具有无限精度，不过实际计算仍受可用内存和处理资源的限制。这一区别体现了抽象整数系统与其有限计算表示之间的差异。（docs.python.org）"
    }
  ],
  "links": [
    "number",
    "zero",
    "mathematics",
    "natural-number",
    "rational-number",
    "real-number",
    "absolute-value",
    "set-theory",
    "countable-set",
    "arithmetic",
    "abstract-algebra",
    "ring-mathematics",
    "field-mathematics",
    "integral-domain",
    "equivalence-relation",
    "equivalence-class",
    "number-theory",
    "prime-number",
    "fundamental-theorem-of-arithmetic",
    "euclidean-algorithm",
    "modular-arithmetic",
    "programming-language"
  ],
  "sources": [
    {
      "title": "openstax.org/books/prealgebra/pages/3-1-introduction-to-integers",
      "url": "https://openstax.org/books/prealgebra/pages/3-1-introduction-to-integers"
    },
    {
      "title": "pancratz.org/notes/Numbers.pdf",
      "url": "https://www.pancratz.org/notes/Numbers.pdf"
    },
    {
      "title": "openstax.org/books/contemporary-mathematics/pages/3-2-the-integers",
      "url": "https://openstax.org/books/contemporary-mathematics/pages/3-2-the-integers"
    },
    {
      "title": "math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Elementa…",
      "url": "https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics/Elementary_Foundations%3A_An_Introduction_to_Topics_in_Discrete_Mathematics_%28Sylvestre%29/13%3A_Countable_and_uncountable_sets/13.01%3A_Basics_and_Examples"
    },
    {
      "title": "math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/Abstract_Algebra…",
      "url": "https://math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/Abstract_Algebra%3A_Theory_and_Applications_%28Judson%29/16%3A_Rings"
    },
    {
      "title": "math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/Abstract_Algebra…",
      "url": "https://math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/Abstract_Algebra%3A_Theory_and_Applications_%28Judson%29/16%3A_Rings/16.04%3A_Integral_Domains_and_Fields"
    },
    {
      "title": "builds.openlogicproject.org/content/sets-functions-relations/arithmetization/in…",
      "url": "https://builds.openlogicproject.org/content/sets-functions-relations/arithmetization/integers.pdf"
    },
    {
      "title": "math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/Abstract_Algebra…",
      "url": "https://math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/Abstract_Algebra%3A_Theory_and_Applications_%28Judson%29/02%3A_The_Integers/2.02%3A_The_Division_Algorithm"
    },
    {
      "title": "math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concept…",
      "url": "https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Proofs_and_Concepts_-_The_Fundamentals_of_Abstract_Mathematics_%28Morris_and_Morris%29/07%3A_Equivalence_relations/7.04%3A_Modular_arithmetic"
    },
    {
      "title": "docs.oracle.com/javase/specs/jls/se22/html/jls-4.html",
      "url": "https://docs.oracle.com/javase/specs/jls/se22/html/jls-4.html"
    },
    {
      "title": "docs.python.org/3.10/library/stdtypes.html",
      "url": "https://docs.python.org/3.10/library/stdtypes.html"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}