A line segment is a piece of a line that has two distinct endpoints. Because of these endpoints, unlike a line, a line segment doesn't extend infinitely. Rather, it is finite, with a measurable length.
What Are the Subsets of a Line in Geometry?
Found This Helpful
In geometry, a line is a perfectly straight onedimensional figure extending infinitely in both directions. There are two subsets, or subcategories, of lines in geometry: line segments and rays.

Line Segments
Rays

A ray is essentially a hybrid between a line and a line segment. A ray has exactly one endpoint  called its origin  and extends infinitely in the other direction. Like lines, rays are infinite and therefore immeasurable. Rays may sometimes be referred to as halflines.


References
Resources
 Photo Credit taesmileland/iStock/Getty Images