# 线段

线段是直线上介于两个端点之间的有限部分，包含端点本身；用现代术语来说，它是与无限直线的有限部分相对应的闭区间。<sup>[1](https://mathworld.wolfram.com/LineSegment.html)</sup> 线段是一维的：它具有可测量的长度但没有宽度，它既区别于向两个方向无限延伸的直线，也区别于只有一个端点并向一个方向无限延伸的射线。<sup>[2](https://www.mathopenref.com/linesegment.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 闭区间，即无限直线上介于两个端点之间的有限部分，端点为 A 和 B 时写作 AB<sup>[1](https://mathworld.wolfram.com/LineSegment.html)</sup> |
| 欧几里得的表述 | “线的端点是点”（第一卷，定义 3）；有限线有两个端点，而圆周没有端点<sup>[3](https://www.euclids-elements.org/elements/books/bookI/definitions/defI3/)</sup> |
| 作图 | 欧几里得的第一公设保证可以连接任意两点作一条直线段<sup>[4](https://proofwiki.org/wiki/Definition%3ALine/Segment)</sup> |
| 长度 | 线段的长度或度量是其两端点之间的距离<sup>[5](https://www.hufsd.edu/assets/pdfs/academics/geometry_text/Chapter01.pdf)</sup> |
| 代数形式 | 端点为 x 和 y 的线段是满足 α ≥ 0、β ≥ 0 且 α + β = 1 的所有点 αx + βy 的集合<sup>[6](https://www.sci.utah.edu/~shireen/pdfs/tutorials/Elhabian_hull10.pdf)</sup> |
| 基数 | 线段中点的数量等于整条直线以及 n 维空间中点的数量，这一事实最早由格奥尔格·康托尔（Georg Cantor）认识到<sup>[1](https://mathworld.wolfram.com/LineSegment.html)</sup> |

## 欧几里得的处理

欧几里得的《几何原本》在第一卷开篇给出了一系列定义，确定了线段的术语体系。点是“没有部分的东西”，线是“无宽度的长度”，定义 3 指出线的端点是点；定义 4 则称一条线是直线，当它“与其上的点均匀地放置”。<sup>[7](https://www.euclids-elements.org/elements/books/bookI/)</sup> 对欧几里得而言，“线”一词包含曲线，因此定义 3 也涵盖曲线的段；定义 3 的注释指出，该定义仅仅表明一个点可以是线的端点，并未说明端点是什么或一条线可以有多少个端点，并且有限线有两个端点而圆周没有端点。<sup>[3](https://www.euclids-elements.org/elements/books/bookI/definitions/defI3/)</sup> 自古以来的评论者都注意到，欧几里得在正文中从未再次提及这些基本定义，一些历史学家提出它们是在欧几里得写作之后添加的，可能取自一份单独的定义汇编。<sup>[8](https://mathshistory.st-andrews.ac.uk/HistTopics/Euclid_definitions/)</sup>

线段的存在性不是被定义的，而是被公设化的。欧几里得五条公设中的第一条保证可以连接任意两点作一条直线段。<sup>[4](https://proofwiki.org/wiki/Definition%3ALine/Segment)</sup> 第二条公设允许将一条有端点的直线沿直线方向任意延长，因此《几何原本》的几何学是由可以在两端延长的有限线段构建的。<sup>[9](https://mathshistory.st-andrews.ac.uk/Extras/Hudson_books/)</sup> 欧几里得将唯一性视为第一公设的隐含内容：任意两点之间只能作一条直线，这等价于说具有相同端点的两条直线在其整个长度上重合。<sup>[10](https://mathshistory.st-andrews.ac.uk/DSB/Euclid.pdf)</sup>

“段”一词还有第二种古典用法。当一条线在某点被切割时，切点与两端之间的截段被称为它的段；当切割点落在两端之间时，线被内分，等于其各段之和；当切割点落在端点之外时，线被外分，等于其各段之差。<sup>[11](https://www.maths.tcd.ie/~dwilkins/Euclid/Elements_Lardner1855/BookI/EuclidElementsBk01Prop47_Lardner1855.php)</sup>

## 命名与记号

线段通常以其端点命名，写作 AB 或 PQ，两个字母上方的横线用以将线段与经过同样两点的整条直线区分开来；在印刷体中，AB 的长度用字母上方的横线表示。<sup>[1](https://mathworld.wolfram.com/LineSegment.html)</sup><sup> • </sup><sup>[2](https://www.mathopenref.com/linesegment.html)</sup> 也使用单个小写字母，尤其是用于三角形和其他多边形的边。<sup>[2](https://www.mathopenref.com/linesegment.html)</sup> 两端的每个点都称为线段的端点。<sup>[4](https://proofwiki.org/wiki/Definition%3ALine/Segment)</sup>

两条线段相等——《几何原本》中所用的意义——当且仅当它们具有相同的长度。<sup>[4](https://proofwiki.org/wiki/Definition%3ALine/Segment)</sup> 欧几里得的第二命题展示了如何在给定点处作一条与给定线段等长的线段，这一作图之所以必要，是因为他的尺规作图的设定没有直接方法来转移长度。<sup>[12](https://www.maths.tcd.ie/~dwilkins/Courses/MAU23302/EuclidStudyNotes/StudyNote_EuclidElementsBk01Prop02.pdf)</sup>

## 坐标与代数中的线段

在坐标几何中，线段的位置由其两个端点的坐标确定，知道这些坐标便可以计算它们之间的距离，从而得到线段的长度。<sup>[13](https://www.mathopenref.com/coordsegment.html)</sup> 在代数上，实向量空间中连接点 x 和 y 的线段是端点所有凸组合的集合：形如 αx + βy 的点，其中 α ≥ 0、β ≥ 0 且 α + β = 1。中点对应于 α = β = 1/2，而端点本身则在其中一个权重为 1、另一个为 0 时达到。<sup>[6](https://www.sci.utah.edu/~shireen/pdfs/tutorials/Elhabian_hull10.pdf)</sup> 这一刻画可以推广：三角形是其三个顶点的凸组合的集合，而凸组合引出了重心坐标的概念。<sup>[6](https://www.sci.utah.edu/~shireen/pdfs/tutorials/Elhabian_hull10.pdf)</sup>

等价地，从 p₁ 到 p₂ 的线段上的任意点可以参数化地写作 p₁ + s(p₂ − p₁)，其中参数 s 在区间 [0, 1] 中；s = 0 给出 p₁，s = 1 给出 p₂。<sup>[14](https://persson.berkeley.edu/Programming_for_Mathematical_Applications/content/Computational_Geometry/Line_Segment_Interactions.html)</sup> 同样的参数化是凸集定义的基础：一个集合是凸的，恰好当其中任意两点之间的线段都落在该集合中。<sup>[15](https://see.stanford.edu/materials/lsocoee364a/transcripts/ConvexOptimizationI-Lecture02.html)</sup>

## 计算中的线段

线段是计算几何和计算机图形学的基本图元，而检测两条线段是否相交是几何建模、计算机图形学、地理信息系统和计算几何中的一个标准问题。<sup>[16](https://www.sciencedirect.com/science/article/abs/pii/S0010448500000506)</sup> 直接的方法令两个参数形式相等，即 p₁ + s(p₂ − p₁) = q₁ + t(q₂ − q₁)，并求解所得的 2 × 2 线性方程组；当解满足 s ∈ [0, 1] 和 t ∈ [0, 1] 时，线段相交。如果线段平行，系数矩阵奇异，没有唯一解，因此稳健的实现还必须处理共线重叠的情况。<sup>[14](https://persson.berkeley.edu/Programming_for_Mathematical_Applications/content/Computational_Geometry/Line_Segment_Interactions.html)</sup> 浮点舍入使端点情形变得复杂：本应恰好落在端点上的交点，s = 1，可能被计算为 s = 1.000000001，因此实现中引入一个小的容差 δ，接受 s 在 [−δ, 1 + δ] 中。<sup>[14](https://persson.berkeley.edu/Programming_for_Mathematical_Applications/content/Computational_Geometry/Line_Segment_Interactions.html)</sup>

图形管线在渲染之前将线段相对于视景体裁剪。在 OpenGL 中，点要么整体保留要么整体丢弃，但穿过裁剪体的线段会在裁剪点处生成新的顶点，并且边缘标志、颜色和纹理信息被赋予所有新顶点。<sup>[17](https://learn.microsoft.com/en-us/windows/win32/opengl/clipping)</sup>

## 一个反直觉的性质

尽管线段只是直线上的一小部分，它包含的点却与整条直线一样多，也与 n 维空间一样多；格奥尔格·康托尔最早认识到这种基数的相等。<sup>[1](https://mathworld.wolfram.com/LineSegment.html)</sup> 这一结果将长度的几何直觉与点集的集合论大小分离开来：一个有界线段和一条无界直线在其点之间支持相同的一一对应。

## References

1. [Line Segment, Wolfram MathWorld](https://mathworld.wolfram.com/LineSegment.html)
2. [Line Segment Definition, Math Open Reference](https://www.mathopenref.com/linesegment.html)
3. [Euclid's Elements, Book I, Definition 3](https://www.euclids-elements.org/elements/books/bookI/definitions/defI3/)
4. [Definition:Line/Segment, ProofWiki](https://proofwiki.org/wiki/Definition%3ALine/Segment)
5. [Chapter 1, Essentials of Geometry (school geometry text)](https://www.hufsd.edu/assets/pdfs/academics/geometry_text/Chapter01.pdf)
6. [Convex hulls tutorial, University of Utah, School of Computing](https://www.sci.utah.edu/~shireen/pdfs/tutorials/Elhabian_hull10.pdf)
7. [Euclid's Elements, Book I](https://www.euclids-elements.org/elements/books/bookI/)
8. [Euclid's definitions, MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/HistTopics/Euclid_definitions/)
9. [Hilda P Hudson's books, MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Extras/Hudson_books/)
10. [Euclid, Dictionary of Scientific Biography (MacTutor copy)](https://mathshistory.st-andrews.ac.uk/DSB/Euclid.pdf)
11. [Euclid, Elements, Book I, Proposition 47 (Lardner, 1855)](https://www.maths.tcd.ie/~dwilkins/Euclid/Elements_Lardner1855/BookI/EuclidElementsBk01Prop47_Lardner1855.php)
12. [Study Note, Euclid's Elements Book I, Proposition 2, Trinity College Dublin](https://www.maths.tcd.ie/~dwilkins/Courses/MAU23302/EuclidStudyNotes/StudyNote_EuclidElementsBk01Prop02.pdf)
13. [Line Segment (Coordinate Geometry), Math Open Reference](https://www.mathopenref.com/coordsegment.html)
14. [Finding Line-Segment Intersections, Programming for Mathematical Applications, UC Berkeley](https://persson.berkeley.edu/Programming_for_Mathematical_Applications/content/Computational_Geometry/Line_Segment_Interactions.html)
15. [Convex Optimization I, Lecture 2 transcript, Stanford](https://see.stanford.edu/materials/lsocoee364a/transcripts/ConvexOptimizationI-Lecture02.html)
16. [Reliable line segment intersection testing, ScienceDirect](https://www.sciencedirect.com/science/article/abs/pii/S0010448500000506)
17. [Clipping (OpenGL), Microsoft Learn](https://learn.microsoft.com/en-us/windows/win32/opengl/clipping)

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

Topic: 物质世界与数学 › 数学与统计学 › 几何学与拓扑学 › Elementary and Euclidean geometry › Points, lines, and angles

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/line-segment

English original: https://www.edgepedia.org/line-segment
