What are Rays, Lines and Line Segments?

A line is a thin straight mark made by a pencil and it extends indefinitely in both the directions. Here is the figure of a typical line.

Image

A ray starts at one point and goes indefinitely in one direction. Here is the figure of a ray.

image

We represent a ray by $\vec{AB}$. It is also shown in the following diagram. It tells us that the ray starts at point $A$ and goes indefinitely in one direction. 

image

The point at which the ray begins is called the end point of the ray. Here, $A$ will be the endpoint of this ray. We should note that this particular ray cannot be written as $\vec{BA}$.

A line segment is the fixed part of a line. It has a specified length and does not extend indefinitely in both the directions. If the end points are labelled as $A$ and $B$ then we can call the line segment as AB or  $\bar{AB}$ or $\bar{BA}$. 

image

What is the difference between a line and a segment?

The difference between a line and a segment can be tabulated as follows:

                                    Line                           Line Segment 
 A line goes on infinitely in both the directions    A line segment is contained by the endpoints 
 The length of a line is infinite and cannot be measured.    We can measure the length of line segment. 
 The symbol of a line is  $\vec{}$.  A line segment is represented by the symbol  $\bar{}$ . 

We can find the length of a line segment by using Pythagorean Theorem. If we have a line segment drawn in a coordinate plane as follows:

image

Then, in order to find its length we can draw a horizontal and vertical line so that a right angled triangle is formed. 

image

Now, if we label the sides as $"A", "B"$ and $"C"$, then by using the Pythagoras Theorem we can say: 

$C^2 = A^2 + B^2$

From this we can get the value of $C$ as:

$C = \sqrt {(A^2 + B^2)}$ 
We should note that the lengths $A$ and $B$ can be found by finding the coordinates of $A$ and $B$.
 
If the coordinates of $A$ is $(x_1, y_1)$ and that of $B$ is $(x_2, y_2)$ then the length $A$ will be $(y_2 - y_1)$ and that of $B$ will be $(x_2 - x_1)$. 

Now, we can rewrite the Pythagorean Theorem as:

$AB^2 = {(x_2 - x_1)}^2 + {(y_2 - y_1)}^2$

This implies that

$AB = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$ 

Question 1: 

Find the length of the line segment with coordinates of $A$ and $B$ as $(2, 4)$ and $(-2, 1)$.

Solution: 

image

Here, we can see that $(x_1, y_1) = (2, 4)$ and $(x_2, y_2) = (-2, 1)$

So, the distance $AB$ will be:

$AB = \sqrt{{(x_2 – x_1)}^2 + {(y_2 – y_1)}^2)}$
 
This implies

$AB = \sqrt{{(-2 – 2)}^2 + {(1 – 4)}^2)}$ = $\sqrt{{(-4)}^2 + {(-3)}^2)}$ = $\sqrt{(16 + 9)}$ = $\sqrt{25}$ = $5$
Hence, length of the line segment $AB$ will be $5$ units. 
Question 2: 

Find the length of the line segment with coordinates of $A$ and $B$ as $(-2, -4)$ and $(2, -1)$.

Solution: 

image

Here, we can see that $(x_1, y_1) = (-2, -4)$ and $(x_2, y_2) = (2, -1)$

So, the distance $AB$ will be:

$AB = \sqrt{{(x_2 – x_1)}^2 + {(y_2 – y_1)}^2)}$
 
This implies

$AB = \sqrt{ {(2 + 2)}^2 + {(-1 + 4)}^2)}$ = $\sqrt{(4)^2 + (3)^2)}$ = $\sqrt{(16 + 9)}$ = $\sqrt{25}$ = $5$
Hence, length of the line segment $AB$ will be $5$ units.
Question 3: 

Find the length of the line segment with coordinates of $A$ and $B$ as $(-2, -3)$ and $(-2, 2)$.

Solution: 

image

Here, we can see that $(x_1, y_1) = (-2, -3)$ and $(x_2, y_2) = (-2, 2)$

So, the distance $AB$ will be:

$AB = \sqrt{{(x_2 – x_1)}^2 + {(y_2 – y_1)}^2)}$ 

This implies

$AB = \sqrt{{(-2 + 2)}^2 + {(2 + 3)}^2)}$ = $\sqrt{(0)^2 + (5)^2)}$ = $\sqrt{(0 + 25)}$ = $\sqrt{25}$ = $5$
Hence, length of the line segment $AB$ will be $5$ units.