Length of a line

Last updated: September 30, 2021  | 


What is a line segment?

A line segment is a section of the straight line that connects two points. Unlike a line, it does not extend in both directions of infinity.  To calculate the length, use the distance formula between the two points.  Line length is the width of a block of typeset text in typography, and it is usually measured in units of length such as inches, points, or characters per line.


E3.3: Calculate the length and the coordinates of the midpoint of a straight line from the coordinates of its end point.

Determine the length of a vertical or a horizontal line on a coordinate plane by measuring the coordinates. Here you can use the distance formula for calculating the length of such lines. Examples of length of line is  zebra crossing, chessboard, pencil, cricket bat, cord of the cell phone charger etc.

The distance formula is,

$$d=\sqrt{\left(x_{2}-x_{1}\right)^{2}+\left(y_{2}-y_{1}\right)^2}$$

Here, $$d$$ is the length of the line, $$\left ( x_{1},y_{1} \right )$$ is equal to the coordinates of the first end point of the line segment, and $$\left ( x_{2},y_{2} \right )$$ is equal to the second end of the line segment.


Worked examples of calculating the distance of a line segment

Example 1: Find the length of a line using the midpoint.  The starting point is $$\left ( -5 ,-11\right )$$,  and the end point is $$\left ( 3 ,7\right )$$.

Step 1: Write the given points.

It is given that the starting point is $$\left ( -5 ,-11\right )$$  and the end point is $$\left ( 3 ,7\right )$$.

Step 2: Recall the formula for the midpoint.

The formula for the midpoint is $$d=\sqrt{\left(x_{2}-x_{1}\right)^{2}+\left(y_{2}-y_{1}\right)^2}$$.

Step 3: Write the point of coordinates $$(x,y)$$.

$$\left( x,y\right )= \left(\frac{x_{1}+x_{2}}{2},\frac{y_{1}+y_{2}}{2}\right )$$

$$\left( x,y\right )= \left( \frac{-5+3}{2},\frac{-11+7}{2}\right )$$

$$\left( x,y\right )= \left( \frac{-2}{2},\frac{-4}{2}\right )$$

$$\left( x,y\right )= \left( -1,-2\right )$$

Step 4: Recall the coordinates of the midpoint and one end point of the line segment.

The line segment has the midpoint $$\left ( -1,-2 \right )$$ and an end point $$\left ( 7,2 \right )$$.

Step 5: Substitute the value of coordinates of the midpoint and an end point of the line segment.

$$d= \sqrt{\left ( x_{1}-x_{2} \right )^{2} + \left ( y_{2}-y_{1} \right )^{2}}$$

$$d= \sqrt{\left ( -1-7 \right )^{2} + \left ( -1-2 \right )^{2}}$$

$$\sqrt{ -8^{2} + -3^{2}}$$

$$d= \sqrt{64+9}= \sqrt{73}$$

So, the half-length of the line is $$d=\sqrt{73}$$.

Step 6: Write the length of the line. 

Multiply 2 by the half-length, $$d=\sqrt{73}$$.

The length of the line is $$\sqrt{73} \times 2$$.

Hence, the length of the line is $$2\sqrt{73}$$

Line segment

Example 2: Find the length of the line segment that has end points $$\left ( 2,4 \right )$$ and $$\left ( 6,2 \right )$$.

Step1: Write the given points.

$$\left ( x_{1},y_{1} \right )=\left ( -2,4 \right )$$ and $$\left ( x_{2},y_{2} \right )=\left ( 6,2 \right )$$

Step 2: Write the point of coordinates $$(x,y)$$.

$$\left( x,y\right )=\left(\frac{x_{1}+x_{2}}{2},\frac{y_{1}+y_{2}}{2}\right )$$

$$\left( x,y\right )=\left( \frac{2+6}{2},\frac{4+2}{2}\right )$$

$$\left( x,y\right )=\left( \frac{8}{2},\frac{6}{2}\right )$$

$$\left( x,y\right )=\left( 4,3\right )$$

Step 3: Recall the formula for the midpoint.

The formula for the midpoint is $$d=\sqrt{\left(x_{2}-x_{1}\right)^{2}+\left(y_{2}-y_{1}\right)^2}$$.

Step 4: Substitute the value of coordinates of midpoint and an end point of the line segment to find the half-length of the line.

$$d=\sqrt{\left ( x_{2}-x_{1} \right )^{2}+\left ( y_{2}-y_{1} \right )^{2}}$$

$$d=\sqrt{\left ( 6-4 \right )^{2}+\left ( 2-3 \right )^{2}}$$

$$d=\sqrt{2^{2}+\left ( -1 \right )^{2}}$$

$$d=\sqrt{5}

So, the half-length of the line is $$d=\sqrt{5}$$.

Step 5: Write the length of the line.

Multiply 2 by the half-length, $$d=\sqrt{5}$$.

The length of the line is $$\sqrt{5} \times 2$$.

Hence, the length of the line is $$2\sqrt{5}$$.

Line segment

Try QuickSense for free!

Everything you need to get an A+ in IGCSE, GCSE and O-Level Maths.

Just answer questions and you will get an A - A* - guaranteed