# 有理数

有理数是可以写成分数 \( p/q \) 的数，其中 \( p \) 和 \( q \) 是整数，且 \( q \neq 0 \)。这个名称来自*比*（ratio）：这样的数表示两个整量的比。每个整数都是有理数，因为 \( n = n/1 \)；有限小数如 1.875 和循环小数如 \( 0.\overline{36} \) 也都是有理数。<sup>[1](https://openstax.org/books/contemporary-mathematics/pages/3-4-rational-numbers)</sup><sup> • </sup><sup>[2](https://openstax.org/books/college-algebra/pages/1-1-real-numbers-algebra-essentials)</sup> 不能这样写出的数，如 \( \sqrt{10} \) 或 \( \pi \)，称为无理数。

| 要点 | 说明 |
|---|---|
| 定义 | 形如 \( p/q \) 的数，其中 \( p \) 和 \( q \) 为整数且 \( q \neq 0 \)；该集合记作 \( \mathbb{Q} \)<sup>[2](https://openstax.org/books/college-algebra/pages/1-1-real-numbers-algebra-essentials)</sup> |
| 包含整数 | 每个整数 \( n \) 都是有理数，因为 \( n = n/1 \)<sup>[1](https://openstax.org/books/contemporary-mathematics/pages/3-4-rational-numbers)</sup> |
| 小数判别 | 一个实数是有理数，当且仅当其小数展开有限或最终循环<sup>[3](https://digitalcommons.unl.edu/mathfacpub/48/)</sup> |
| 循环节长度 | 对于最简形式 \( n/m \)，循环数字的位数仅取决于 \( m \)；所有分母为 7 的分数循环节长度均为 6<sup>[3](https://digitalcommons.unl.edu/mathfacpub/48/)</sup> |
| 稠密性 | 任意两个不同实数之间都存在有理数，而且有无穷多个<sup>[4](https://www.cambridge.org/core/books/abs/real-analysis/countable-and-uncountable-sets/122E05E0D6C8B37B588B647FCE27CA98)</sup> |
| 可数性 | 有理数是可数无限的，尽管它们在实数轴上稠密<sup>[5](https://people.math.binghamton.edu/mfochler/bu-mfx/bu-math-arv/math-330-arv/math-330-2022-08/html/lec-notes/bu-ln-330-m330-solns-2022-09-07.pdf)</sup> |
| 代数结构 | 在通常运算下，\( \mathbb{Q} \) 是一个有序域<sup>[6](https://www.cs.cmu.edu/~bhiksha/courses/math.11691/fall2015/class2/rationals.html)</sup> |

## 定义与基本例子

有理数集记作 \( \mathbb{Q} = \{ m/n \mid m, n \in \mathbb{Z},\ n \neq 0 \} \)。<sup>[2](https://openstax.org/books/college-algebra/pages/1-1-real-numbers-algebra-essentials)</sup> 带符号的分数如 \( 4/5 \)、\( -7/8 \) 和 \( -20/3 \) 都是有理数，每个整数都可以用多种方式写成比：\( 3 = 3/1 = 6/2 = 9/3 \)，依此类推。<sup>[7](https://openstax.org/books/elementary-algebra-2e/pages/1-8-the-real-numbers)</sup> 同一个有理数有多种表示形式，初等算术的相当一部分内容就是判断两个分数何时相等；形式上，\( p/q = n/m \) 当且仅当 \( p \cdot m = n \cdot q \)。<sup>[8](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/08%3A_New_Page/8.03%3A_New_Page)</sup>

**什么不是有理数。** 如果一个小数既不是有限小数也不循环，那么它所表示的数就不是有理数。<sup>[1](https://openstax.org/books/contemporary-mathematics/pages/3-4-rational-numbers)</sup> 一类例子是非完全平方的整数或有理数的平方根，如 \( \sqrt{10} \) 和 \( \sqrt{25/6} \)。<sup>[1](https://openstax.org/books/contemporary-mathematics/pages/3-4-rational-numbers)</sup>

## 小数展开

每个有理数都有一个小数展开，或有限或最终循环；反之亦然：一个实数是有理数，当且仅当其小数展开属于这种类型。<sup>[3](https://digitalcommons.unl.edu/mathfacpub/48/)</sup><sup> • </sup><sup>[9](https://people.math.wisc.edu/~jwrobbin/221dir/CollegeAlgebra.pdf)</sup> 原因在于长除法。逐位计算 \( m/n \) 会产生一个余数序列，每个余数都小于 \( n \)；由于可能的余数只有有限多个，某个余数必然最终重复出现，从那时起数字序列便开始循环。<sup>[9](https://people.math.wisc.edu/~jwrobbin/221dir/CollegeAlgebra.pdf)</sup> 反过来，循环小数可以通过对等比级数求和转化回分数：将循环部分写成十的负幂乘以这样的级数，便得到两个整数之比。<sup>[9](https://people.math.wisc.edu/~jwrobbin/221dir/CollegeAlgebra.pdf)</sup>

**循环节长度。** 当 \( n/m \) 化为最简形式时，循环块（称为循环节）的位数仅取决于分母 \( m \)。所有分母为 7 的分数循环节长度均为 6，如 \( 2/7 = 0.\overline{285714} \)。<sup>[3](https://digitalcommons.unl.edu/mathfacpub/48/)</sup> 对于与基数 \( B \) 互素的分母 \( N \)，循环节长度等于 \( B \) 模 \( N \) 的阶，即满足 \( B^{e} \equiv 1 \pmod{N} \) 的最小正整数 \( e \)，且每个分数 \( x/N \) 都具有相同的循环节长度。<sup>[10](https://arxiv.org/abs/math/0605182)</sup>

**米迪定理。** 有些循环小数的循环节中隐藏着规律。对于 \( 1/7 = 0.\overline{142857} \)，将六位循环节分成两半，得到 \( 142 + 857 = 999 \)，一串 9；分母为 11、13 和 17 时也有同样的现象。<sup>[3](https://digitalcommons.unl.edu/mathfacpub/48/)</sup><sup> • </sup><sup>[10](https://arxiv.org/abs/math/0605182)</sup> 历史学家 L. E. 迪克森（L. E. Dickson）记载，这一结果由南特（Nantes）的 E. 米迪（E. Midy）于 1836 年发表，后来的工作将其推广到任意基数和将循环节分成两块以上的情形。<sup>[3](https://digitalcommons.unl.edu/mathfacpub/48/)</sup><sup> • </sup><sup>[10](https://arxiv.org/abs/math/0605182)</sup>

## 在数系中的位置

有理数位于整数与实数之间。形式上，\( \mathbb{Q} \) 由整数构造为有序对 \( (p, q) \)（其中 \( q \neq 0 \)）的等价类，当 \( p \cdot m = n \cdot q \) 时 \( (p, q) \sim (n, m) \)；然后在等价类上定义加法和乘法，得到的是一个有序域，其中的序在域运算下保持不变。<sup>[6](https://www.cs.cmu.edu/~bhiksha/courses/math.11691/fall2015/class2/rationals.html)</sup><sup> • </sup><sup>[8](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/08%3A_New_Page/8.03%3A_New_Page)</sup> 这一构造提供了整数所缺乏的除法。<sup>[8](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/08%3A_New_Page/8.03%3A_New_Page)</sup>

**稠密性与可数性。** 有理数在实数轴上稠密：任意两个不同实数之间总有一个有理数，而且有无穷多个。<sup>[4](https://www.cambridge.org/core/books/abs/real-analysis/countable-and-uncountable-sets/122E05E0D6C8B37B588B647FCE27CA98)</sup> 然而它们和整数一样是可数无限的，因此在这个意义上，它们在实数中分布稀疏，而大多数实数是无理数。<sup>[4](https://www.cambridge.org/core/books/abs/real-analysis/countable-and-uncountable-sets/122E05E0D6C8B37B588B647FCE27CA98)</sup><sup> • </sup><sup>[5](https://people.math.binghamton.edu/mfochler/bu-mfx/bu-math-arv/math-330-arv/math-330-2022-08/html/lec-notes/bu-ln-330-m330-solns-2022-09-07.pdf)</sup> 实数本身可以由有理数构造，或者作为戴德金分割，或者作为有理数柯西序列的等价类，由此得到的完备有序域正是分析学的工作场所。<sup>[11](https://mitocw.ups.edu.ec/courses/mathematics/18-100b-analysis-i-fall-2010/readings-notes/MIT18_100BF10_Const_of_R.pdf)</sup>

## 历史背景

分数概念古已有之。巴比伦人（Babylonians）用一种近乎位值制的六十进制写数，这使得分数易于表示；耶鲁（Yale）收藏的一块泥板记录了 \( \sqrt{2} \) 的近似值 \( 1 + 24/60 + 51/60^{2} + 10/60^{3} \)，约为 1.414222。<sup>[12](https://mathshistory.st-andrews.ac.uk/Miller/mathsym/fractions/)</sup> 最早的埃及和希腊分数通常是分子为 1 的单位分数，写成一个数字加一个表示分母的记号。<sup>[12](https://mathshistory.st-andrews.ac.uk/Miller/mathsym/fractions/)</sup> 公元前五世纪末和四世纪的希腊数学家将数论建立在整数和比例论之上，他们使用的首音记数法根本没有分数系统。<sup>[13](https://www.degruyterbrill.com/document/doi/10.1515/9783110565959-008/html)</sup> 欧几里得（Euclid）《几何原本》第十卷讨论可公度与不可公度量，这是有理数与无理数之别的几何对应物。<sup>[14](https://www.claymath.org/library/historical/euclid/book10.html)</sup>

## 应用

凡涉及测量、分配或比较量的地方，都会出现有理数。百分数是有理数的伪装：公立院校学生入学六年内的毕业率 57.6% 就是分数 \( 72/125 \)，而私立院校的 65.4% 则是 \( 327/500 \)；比较百分数很直观，但分数因为分母不同而较难解读。<sup>[1](https://openstax.org/books/contemporary-mathematics/pages/3-4-rational-numbers)</sup> 比、比率、概率和单位换算都建立在有理数运算之上，学校课程将分数、有限小数和循环小数以及百分数视为同一有理数值的不同表示。<sup>[15](https://stemtc.scimathmn.org/frameworks/712b-problem-solving-rational-numbers)</sup>

在计算领域，精确性至关重要：浮点表示会对小数分数进行舍入，因此美国国家标准与技术研究院（National Institute of Standards and Technology）已开发出方案，将输入的小数表示为整数，并在规定的位数限制内精确执行乘法、加法和减法。<sup>[16](https://www.nist.gov/publications/integer-representation-decimal-numbers-exact-computations)</sup>

## References

1. [Rational Numbers, Contemporary Mathematics, OpenStax](https://openstax.org/books/contemporary-mathematics/pages/3-4-rational-numbers)
2. [Real Numbers: Algebra Essentials, College Algebra, OpenStax](https://openstax.org/books/college-algebra/pages/1-1-real-numbers-algebra-essentials)
3. [William G. Leavitt, A Theorem on Repeating Decimals, The American Mathematical Monthly 74 (1967)](https://digitalcommons.unl.edu/mathfacpub/48/)
4. [Countable and Uncountable Sets, Real Analysis, Cambridge University Press](https://www.cambridge.org/core/books/abs/real-analysis/countable-and-uncountable-sets/122E05E0D6C8B37B588B647FCE27CA98)
5. [Math 330 Lecture Notes, Binghamton University](https://people.math.binghamton.edu/mfochler/bu-mfx/bu-math-arv/math-330-arv/math-330-2022-08/html/lec-notes/bu-ln-330-m330-solns-2022-09-07.pdf)
6. [Real Analysis: I, Constructing the Rationals, Carnegie Mellon University](https://www.cs.cmu.edu/~bhiksha/courses/math.11691/fall2015/class2/rationals.html)
7. [The Real Numbers, Elementary Algebra 2e, OpenStax](https://openstax.org/books/elementary-algebra-2e/pages/1-8-the-real-numbers)
8. [The Rational Numbers, Transition to Higher Mathematics, LibreTexts](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Transition_to_Higher_Mathematics_%28Dumas_and_McCarthy%29/08%3A_New_Page/8.03%3A_New_Page)
9. [Theorem 21.6, College Algebra notes, University of Wisconsin](https://people.math.wisc.edu/~jwrobbin/221dir/CollegeAlgebra.pdf)
10. [Midy's Theorem for Periodic Decimals, arXiv:math/0605182](https://arxiv.org/abs/math/0605182)
11. [Construction of R, MIT 18.100B Analysis I](https://mitocw.ups.edu.ec/courses/mathematics/18-100b-analysis-i-fall-2010/readings-notes/MIT18_100BF10_Const_of_R.pdf)
12. [Earliest Uses of Symbols for Fractions, MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Miller/mathsym/fractions/)
13. [Why Did the Greeks Develop Proportion Theory? A Conjecture, De Gruyter](https://www.degruyterbrill.com/document/doi/10.1515/9783110565959-008/html)
14. [Euclid's Elements, Book X, Clay Mathematics Institute](https://www.claymath.org/library/historical/euclid/book10.html)
15. [Problem Solving with Rational Numbers, Minnesota STEM Teacher Center](https://stemtc.scimathmn.org/frameworks/712b-problem-solving-rational-numbers)
16. [J. Bernal and C. J. Witzgall, Integer Representation of Decimal Numbers for Exact Computations, NIST Journal of Research (2006)](https://www.nist.gov/publications/integer-representation-decimal-numbers-exact-computations)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Arithmetic and number systems › Number systems › Integers and rational numbers

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/rational-number

English original: https://www.edgepedia.org/rational-number
