Line Segment
A line segment is a part of a line with two definite endpoints, having a measurable length.
Formula
\text{Length} = \text{distance between endpoints}
Definition
A line segment is a straight path between two endpoints; unlike a line, it does not go on forever, it starts at one point and stops at another, so we can measure its length. Formally, it is the set of all points between two endpoints $A$ and $B$ (including the endpoints themselves), written with a bar above $AB$, and its length, denoted $AB$ or $|AB|$, is the distance between the endpoints. In $\mathbb{R}^n$ it is the convex hull of two distinct points, segment $AB = \{A + t(B - A) : t \in [0, 1]\}$, with length equal to the Euclidean norm $|B - A|$, and in metric geometry segments are geodesics of finite length between two points.
Example
The side of a triangle, the edge of a notebook, or a piece of string pulled tight between two thumbtacks can all be modeled as line segments. If $A = (1, 1)$ and $B = (4, 5)$, then $|AB| = \sqrt{(4-1)^2 + (5-1)^2} = \sqrt{9 + 16} = \sqrt{25} = 5$, and the midpoint of $AB$ is $(2.5, 3)$. The parametric form $A + t(B - A)$ for $t \in [0,1]$ traces the segment from $A$ ($t=0$) to $B$ ($t=1$); letting $t$ range over all real numbers instead gives the full line through $A$ and $B$.
Key Insight
The key difference between a line and a line segment is the endpoints: a line goes forever, a segment has a definite start and stop, and that is why it can be measured. Congruent segments have equal lengths, and a midpoint divides a segment into two congruent halves, ideas foundational to triangle congruence and similarity proofs. The segment is also the simplest example of a geodesic, the shortest path between two points; in non-Euclidean spaces, such as on a sphere, geodesics are arcs of great circles rather than straight segments, showing how curvature changes what "shortest path" means.