Line Segment
A line segment is a part of a line that has two endpoints and a fixed length. It is different from a line that can be extended in both directions and which does not have a beginning or an end. In this lesson, let us learn more about the line segment definition, the line segment symbol, and how to find the length of a line segment.
1.  What is a Line Segment? 
2.  How to Measure Line Segments? 
3.  Line Segment Formula 
4.  Difference Between Line, Line Segment, and Ray 
5.  FAQs on Line Segment 
What is a Line Segment?
A line segment is a 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.
Line Segment Definition
A line segment can be defined as a part of a line which a fixed length that can be measured.
Line Segment Symbol
A line segment is represented by a bar on top which is the line segment symbol. It is written as \(\overline{AB}\).
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.
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 and has 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.
☛Related Topics
Check out the following pages related to the line segment.
Line Segment Examples

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) respectively.
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 Difference Between a Line and a Line Segment?
A line has no endpoints and can be extended in both ends, whereas, a line segment has two fixed endpoints. A line is infinite, whereas, a line segment has a defined length and so, it can be measured.
How to Draw a Line Segment?
There are mainly two methods to construct a line segment of any length. The first method of constructing a line segment is simple in which we take a ruler (scale) and mark the starting point as P, then we need to mark the endpoint as Q, with the required length of the line segment. For example, if the required length is 4 inches, we mark Q at 4 inches with the help of the ruler. After this step, the two points are joined together which shows the line segment of the desired length. Visit the Methods to Draw a Line Segment page for a detailed explanation.
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 to Find the Midpoint of a Line Segment?
The midpoint of a line segment can be calculated if the coordinates of the endpoints are given. For example, if (x_{1}, y_{1}) and (y_{1, }y_{2}) are the two endpoints, then the midpoint of the line segment can be calculated by the formula, Midpoint = [(x_{1} + x_{2})/2, (y_{1} + y_{2})/2]
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 the sides of a polygon, the edges of a ruler, the 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?
No, a line segment cannot be extended because it has a fixed and definite length. Although a line can be extended in two opposite directions indefinitely, and a ray can also be extended from one end.
What does a Line Segment Look Like?
A line segment looks like a straight line with fixed endpoints. For example, if we observe the sides of any polygon, like a triangle, or a square, or even a pentagon, we can see that the sides of these polygons are line segments.
visual curriculum