Line Segment
A line does not have a beginning or an end because it can be extended in both directions. However, a line segment is a part of a line that has definite characteristics  two end points and a fixed length. In this lesson, we will learn more about line segments and their length measurement in detail.
1.  What is Line Segment? 
2.  How to Measure a Line Segment? 
3.  Line Segment Formula 
4.  Difference Between Line, Line Segment, and Ray 
5.  FAQs on Line Segment 
What is Line Segment?
Line segment is the path between two points that can be measured. Since line segments have a defined length, they can form the sides of any polygon. The figure given below shows a line segment AB, where the length of 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 us see how to measure a given line segment and name it PQ.
 Step 1: Place the tip of the ruler carefully so that zero is placed at the starting point P of the given line segment.
 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 written 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 a compass. Visit the Methods to Draw a Line Segment page for a detailed explanation.
Line Segment Formula
In the above example, we measured the length of line segment PQ to be 4 inches. This is written as \(\overline{PQ}\) = 4 inches. Now, let us see how to find the length of a line segment when the coordinates of the two endpoints are given. In this case, we use the distance formula, that is, D = √[(\(x_{2}x_{1}\))^{2} + (\(y_{2}y_{1}\))^{2}]. Here, (\(x_{1}\), \(y_{1}\)) and (\(x_{2}\), \(y_{2}\)) are the coordinates of the given points.
For example, a line segment has the following coordinates: (2, 1) and (4, –3). Let us apply the distance formula to find the length of the line segment. Here, \(x_{1}\) = 2; \(x_{2}\) = 4; \(y_{1}\) = 1; \(y_{2}\) = 3. After substituting these values in the distance formula we get: D =√[(4(2))^{2 }+ (31)^{2}) = √((4+2)^{2 }+ (31)^{2}] = √(6^{2} + (4)^{2}) = √(36 + 16) = √52 = 7.21 units. Therefore, using the distance formula, we found that the length of the line segment with coordinates (2, 1) and (4, –3) is 7.21 units.
Difference Between Line, Line Segment, and Ray
Observe the figures given below to understand the difference between a line, a line segment, 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, thus, it can be measured.
 Line segments have a defined length, hence, they form the sides of any polygon.
 A ray has just one start point and no endpoint, therefore, 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
Check out the following pages related to the 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 P and Q are (3, 4) and (2, 0).
Solution:
The coordinates of P and Q are (3, 4) and (2, 0). Let us apply the distance formula: D = √[(\(x_{2}x_{1}\))^{2} + (\(y_{2}y_{1}\))^{2}]. Here, \(x_{1}\) = 3; \(x_{2}\) = 2; \(y_{1}\) = 4; \(y_{2}\) = 0. Therefore, the length of the line segment, D =√[(23)^{2}+(04)^{2}] = √((1)^{2}+(4)^{2}) = √(1 + 16) = √17 = 4.123 units.
Therefore \(\overline{PQ}\) = 4.123 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 the distance between two points that can be measured. Since line segments have a defined length, they can form the sides of any polygon.
What is the Midpoint of a Line Segment?
The midpoint of a line segment refers to a point that divides it into two equal parts and is located in the middle of the line segment.
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, therefore, it cannot 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?
We 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 denoted by a bar on top (—) like \(\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, we use a scale (ruler) to measure its dimensions. In some cases, if the coordinates of the endpoints of the line segment are given, then we 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 and (\(x_{1}\), \(y_{1}\)) and (\(x_{2}\), \(y_{2}\)) are the coordinates of the two points.
When are Line Segments Congruent?
Two figures are said to be congruent if they are of the same size and shape. Thus, any two line segments can be considered to be congruent if they are of the same length.
Can a Line Segment be Extended?
While a line can be extended in two opposite directions indefinitely, 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 the Difference Between a Line, a Line Segment, and a Ray?
A line has no endpoints and can be extended in both ends, whereas, a line segment has two fixed endpoints, and a ray has just one starting point but no endpoint.