Line Segment
A line may have no beginning or end as it can be extended on both sides. What about a line segment? Obviously, we can not say the same for a line segment. A line segment is a part of a line and has definite characteristics  two endpoints and a fixed length. In this lesson, we will learn more about line segments and their length measurement in detail.
What is Line Segment?
It is the path between the two points with a definite length that can be measured. Since line segments have a defined length, they can form the sides of any polygon. The length of this line segment AB refers to the distance between its endpoints, A and B.
How to Measure Line Segments?
Line segments can be measured with the help of a ruler (scale). Let's see how to measure a line segment a given line segment, say PQ.
 Step 1: Place the tip of the ruler carefully so that zero is placed at the starting point of the given line segment. Mark it P.
 Step 2: Now start reading the values given on the ruler and spot the number which comes on the other endpoint Q.
 Step 3: Thus, the length of the line segment is 4 inches, which can be further mentioned as \(\overline{PQ}\) = 4 inches.
Constructing a Line Segment
To construct a line segment of any length, there are mainly two methods. One is, using a Ruler and the other is using a Ruler and Compasses.
Visit the Methods to Draw a Line Segment page for more detail.
Line Segment Formula
A line segment is denoted by a bar on top, which is the line segment symbol. As seen in the above example, the length of line segment PQ is 4 inches. This is written as \(\overline{PQ}\) = 4 inches. How to find the length of a line segment when coordinates of the two endpoints are given? Well, in that case we will use the distance formula, that is, D = √((\(x_{2}x_{1}\))^{2}+(\(y_{2}y_{1}\))^{2}).
For example, a line segment having coordinates (2, 1) and (4, –3), the length of the line segment = D =√((4(2))^{2}+(31)^{2}) = √((4+2)^{2}+(31)^{2}) = √(6^{2} + (4)^{2}) = √(36 + 16) = √52 units. Therefore, by distance formula, the length of the line segments with coordinates (2, 1) and (4, –3) is √52 units.
Difference Between Line, Line Segment, and Ray
Let's look at the figures below and try to understand the difference between a line, a line, and a ray.
Line  Line Segment  Ray 
A line is a set of points that extends in two opposite directions indefinitely. 
A line segment is a part of a line having a beginning point and an endpoint. 
A ray is a part of a line that has a start point but no definite endpoint. 
It is indicated with arrows at both ends to show that it continues forever.  It has a definite length and is indicated with two endpoints.  It shows one start point and an arrow at the other end which means that it goes on forever in one direction. 
It has no endpoints and is written as \(\overleftrightarrow{AB}\). 
It is denoted by a bar on top which is the line segment symbol. It is written as \(\overline{CD}\).  It is written as \( \overrightarrow{\mathrm{EF}}\). 
Important Notes
 A line has indefinite ends and cannot be measured.
 A line segment has a start point and an endpoint, and thus it can be measured.
 Line segments have a defined length, thus they form the sides of any polygon.
 A ray has just one start point and no endpoint, thus it cannot be measured.
 The concept of rays can be understood with the example of the rays of the sun, which have a beginning point but no endpoint.
Topics Related to Line Segment
Solved Examples on Line Segment

Example 1: Identify if the given figure is a line segment, a line, or a ray.
Solution:
The figure has one starting point but an arrow on the other end. This shows that it is not a line segment or a line, it is a ray. Therefore, LM is a ray.

Example 2: Name the line segments in the given triangle.
Solution:
The line segments which make up the triangle are \(\overline{PQ}\), \(\overline{QR}\), and \(\overline{PR}\).
Therefore, the line segments in the given triangle are \(\overline{PQ}\), \(\overline{QR}\), and \(\overline{PR}\). 
Example 3: Find the length of the line segment PQ if the coordinates of Q and P are (3, 4) and (2, 0).
Solution:
The coordinates of P and Q are (3, 4) and (2, 0). Let us assume the length of line segment PQ is D.
The length of the line segment, D =√((23)^{2}+(04)^{2}) = √((1)^{2}+(4)^{2}) = √(1 + 16) = √17 units.
Therefore \(\overline{PQ}\) = √17 Units.
FAQs on Line Segment
What is a Line Segment in Math?
A line segment is a part of a line that connects two points which are considered to be its endpoints. It is a part of a straight line whose length can be measured if the endpoints are given.
What is the Midpoint of a Line Segment?
The midpoint of a line segment refers to a point on the line segment that divides it into two congruent line segments. It is indicated at the center of the line segment thereby dividing the line segment into two equal halves.
How is a Line Segment Different from a Line?
A line can be extended in both directions infinitely whereas a line segment has two endpoints and thus can't be extended in any of the directions. This is the main difference that makes a line segment different from a line.
What are the Examples of Line Segments in Real Life?
As we already know that line segments have a fixed length or measure. Thus, the examples of line segments in real life include sides of a polygon, edges of a ruler, edges of a paper, etc.
What is the Symbol of a Line Segment?
A line segment is characterized as having a definite length and thus it is denoted by a bar on top (—) such as \(\overline{AB}\). This bar is considered as the line segment symbol.
How to Find the Length of a Line Segment?
In order to find the length of a line segment, one can use scale. If the coordinates of the endpoints of the line segment are given, then one can apply the distance formula, D = √((\(x_{2}x_{1}\))^{2}+(\(y_{2}y_{1}\))^{2}), where "D" is the distance between the endpoints of the line segment.
When are Line Segments Congruent?
As we know that two figures are considered congruent if they same size and shape. Thus, congruent line segments are referred to as the line segments that have the same length.
Can a line segment be extended?
While a line can be extended from both ends, even a ray can be extended from one end but a line segment cannot be extended because it has a fixed and definite length.
What is a Difference Between a Line, a Line Segment, and a Ray?
A line has no endpoints and can be extended from both ends whereas a line segment has two fixed endpoints, and a ray has just one starting point but no endpoint.