Open In App

Distance Between Two Lines

Last Updated : 24 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Distance between two is the perpendicular distance between the two lines. Here, we consider finding distance between two parallel lines. Parallel lines are lines that have similar slopes. Parallel lines are non-intersecting lines, and they meet at infinity. The distance between two parallel lines is the shortest distance between two lines. In this article, we will learn about parallel lines, the Distance between Parallel Lines, Examples, and others in detail.

What is Distance Between Two Lines?

Distance between two parallel lines is the distance of the perpendicular drawn from one point of the line to a point on another line. It is the shortest distance between two lines. To measure the distance between two parallel lines. Let’s take two arbitrary parallel lines. Two parallel lines will have the same slope. The equation of a line is y = mx + c. Let equations of the two lines are,

  • y = mx + c1
  • y = mx + c2

The images for the same equations are added below,

Distance-between-two-lines

As shown in the above figure, the two lines are drawn with a slope equal to m. The distance between them has been taken as d.  The line y = mx + c1 intercepts the y-axis at the point A(0, c1) and the other line y = mx + c2 intercepts the y-axis at B(0, c2). The length AB is given by c2 – c1,  d can be calculated using trigonometry considering the triangle ABC. Considering the triangle ABC,  

d = AB × cos θ

d = (c2 – c1) × cos θ.

d = (c2 – c1)/ (sec θ); since, cos θ = 1/sec θ.

d = (c2 – c1) / √(1 + tan2 θ);  since, sec2 θ = 1 + tan2 θ.

d = (c2 – c1)/√(1 + m2)

What are Parallel Lines?

Parallel lines are two or more than two lines that are always parallel to each other, and they lie on the same plane. No matter how long parallel lines are extended, they never meet each other. Parallel lines and Intersecting lines are opposite each other. Parallel Lines are the lines that in no case meet or have any chance of meeting. In the diagram, parallel lines are shown in two ways, Line A is parallel to Line B, and Line X is parallel to Line Y.

Distance Between Two Parallel Lines

The distance d between two parallel lines is the shortest distance between two lines and their distance is the perpendicular distance between two line.

Formula for Distance between Two Lines

The distance between two lines is given by the formula,

d = (c2 – c1)/√(1 + m2)

where,

  • d is Distance between Two Lines
  • c1 is Intercept of Line 1
  • c2 is Intercept of Line 2
  • m is Slope of Parallel Lines

How to Find Distance Between Two Lines

Distance between two lines is calculated using the steps added below,

Step 1: Change the given equation into intercept form.

Step 2: Find the intercept of the given lines and mark them as c1 and c2

Step 3: Use the formula to find the distance between two lines,

d = (c2 – c1)/√(1 + m2)

Distance Between Two Lines in 3d

The distance between two lines in 3d is found using position vectors. If the shortest distance between two intersecting lines in 3d is required, it will be 0 as the lines will intersect at some point. If the short distance between two parallel lines in 3d is required, the intercept form of the position vectors will be used:

  • v1 = a1 + cb
  • v2 = a2 + db

The shortest distance between the parallel lines in 3d is given as:

Shortest Distance = |b × (a2 – a1)|/|b|

where,

  • b is Parallel vector to the vectors v1 and v2
  • a1, a2 is position vectors of some points on v1 and v2
  • c, d is Constants

Slope of Parallel Lines

The slope of parallel lines is defined as the rate of change of ordinate (y-coordinate) with respect to the abscissa (x-coordinate). It is denoted by the letter m. It basically tells by what factor the y-coordinate will change if x changes from x to x + a where a, is a real number. The formula to calculate the slope of a line is:

slope =  (y2 – y1)/(x2 – x1)

The slope (m) can also be expressed as a trigonometric function., in terms of θ the angle made by the line with the x-axis.

Slope m = tan θ = (y2 – y1)/(x2 – x1)

Shortest Distance Between Two Skew Lines

The lines in 3-D can be skew lines. Skew lines are the lines that are non parallel and non intersecting. Suppose we are given two lines,

\vec{r_1}~=~\vec{a_1}~+~t\vec{b_1}        and \vec{r_2}~=~\vec{a_2}~+~t\vec{b_2}

Then the distance between them is given using the formula,

d = |(\vec{a_2}~-~\vec{a_1}        ).(\vec{a_2}~×~\vec{a_1}        )|/(\vec{b_1}~×~\vec{b_2}        )

Read More

Examples on Distance Between Two Lines

Example 1: Check whether the lines 5y = 45x +15 and y = 9x + 3 are parallel or not.

Solution:  

Given,

  • Equation 1: 5y = 45x + 15
  • Equation 2: y = 9x + 3

In order to check if these two lines are parallel or not, compare their slope and check if its equal.

Equation 1: 5y = 45x + 9

5y = 5(9x + 3)

y = 9x + 3

comparing with y = mx + c

Slope(m1) = 9

Equation 2: y = 9x + 3

comparing with y = mx + c

Slope(m2) = 9

Now slope of both the lines m1 = m2 = 9 thus, both the lines are parallel

Example 2: Find the distance between the lines y = 2x + 5 and y = 2x + 10

Solution:

Given,

Equation of line, y = 2x + 5

  • m = slope = 2
  • c1 = 5
  • c2 = 10

Let distance between two lines is d, using the formula we get,

d = (c2 – c1)/√(1 + m2)

d = (10 – 5)/√(1 + 22)

d = √5 units

Example 3: Find the distance between the lines y = 2x + 5 and 5y = 10x + 20.

Solution:

Given,

Equation of line, y = 2x + 5

  • m = slope = 2
  • c1 = 5
  • c2 = 4

Let distance between two lines is d

d = (c2 – c1)/√(1 + m2)

d = (5-4)/√(1 + 22)

d = 1/√5 = 0.022 units

Practice Question on Distance Between Two Parallel Lines

Q1. Find the distance between the lines y = 11x + 5 and 5y = 55x – 23.

Q2. What is the distance between the lines 2y = 3x + 5 and 4y = 6x + 20.

Q3. Find the distance between the lines y = x – 5 and y = x – 2.

Q4. Find the distance between the lines y = x + 5 and 5y = 10x – 5.

Distance Between Two Lines – FAQs

1. What is Distance between Two Lines Formula?

The formula for distance ‘d’ between two parallel lines is given as,

d = (c2 – c1)/√(1 + m2)

where,

  • d is Distance between Two Lines
  • c1 is Intercept of Line 1
  • c2 is Intercept of Line 2
  • m is Slope of Parallel Lines

2. What is Distance between Two Lines in 3d?

The shortest distance between the parallel lines in 3d is given as:

Shortest Distance = |b × (a2 – a1)|/|b|

where,

  • b is Vector Parallel to Vectors v1 and v2
  • a1, a2 are Position Vectors
  • c, d are Constants

3. What is Shortest Distance between Two Points?

Suppose the co-ordinates of the two points given are (x1, y1) and (x2, y2), then the shortest distance between two points can be found using the formula:

d = √{(x2 – x1)2 + (y2 – y1)2}

4. What are Properties of Parallel Lines?

Variou properties of parallel lines are

  • Pairs of vertically opposite angles are equal.
  • Pairs of corresponding angles are equal.
  • Pairs of alternate exterior angles are equal.
  • Pairs of alternate interior angles are equal.
  • Pair of interior angles lying on the same side of the transversal are supplementary.

5. What is Shortest Distance Between Two Lines?

The shortest distance between the two line is the perpendicular distance between the line. That is it is the distance of the perpendicular from one line to other line.



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads