Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Distance Between Two Lines in Coordinate Geometry

ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon

Distance Between Two Parallel Lines Formula in 2D and 3D with Solved Examples

The concept of distance between two lines is essential in mathematics and helps in solving real-world and exam-level geometry and analytical problems efficiently. Understanding this concept makes coordinate geometry and vectors much easier for students, especially when preparing for board exams and entrance tests.


Understanding Distance Between Two Lines

A distance between two lines refers to the shortest length or separation between two straight lines in a plane or in space. This distance is especially important when the lines are parallel, as the gap between them remains constant everywhere, and also when lines are skew (not parallel and non-intersecting) in 3D geometry. You will commonly find distance between two lines used in analytical geometry, coordinate geometry, and vector mathematics. It helps calculate the minimum gap, perpendicular projections, and solve many syllabus-based questions from class 11 and 12 as well as competitive exams.


Formula Used in Distance Between Two Lines

The standard formula for the distance between two parallel lines in 2D (straight lines in the form Ax + By + C = 0) is:
\( d = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}} \)

For lines in the form y = mx + c, the formula becomes:
\( d = \frac{|c_1 - c_2|}{\sqrt{1 + m^2}} \)

In 3D, for skew lines (non-parallel, non-intersecting), the distance between two lines vector formula is:
\( d = \frac{|(\vec{a_2} - \vec{a_1}) \cdot (\vec{b_1} \times \vec{b_2})|}{|\vec{b_1} \times \vec{b_2}|} \), where \( \vec{a_1}, \vec{a_2} \) are position vectors on the two lines, and \( \vec{b_1}, \vec{b_2} \) are their direction vectors. This is crucial for the shortest distance between two lines in 3D.


Here’s a helpful table summarising key formulas for different cases of distance between two lines:


Distance Between Two Lines Table

Type of Lines Standard Form Distance Formula
Parallel Lines (2D) Ax + By + C1 = 0
Ax + By + C2 = 0
\( \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}} \)
Parallel Lines (Slope-Intercept) y = mx + c1, y = mx + c2 \( \frac{|c_1 - c_2|}{\sqrt{1 + m^2}} \)
Skew/Parallel (3D, Vector) Vector form \( \frac{|(\vec{a_2} - \vec{a_1}) \cdot (\vec{b_1} \times \vec{b_2})|}{|\vec{b_1} \times \vec{b_2}|} \)

This table shows how the pattern of distance between two lines can be solved in various scenarios using the appropriate formula.


Worked Example – Solving a Distance Between Parallel Lines Problem

Let’s solve a problem step by step to understand this concept clearly:

1. The equations of two lines are: 3x + 4y = 9 and 3x + 4y = 15/2

2. First, check if lines are parallel: Compare the coefficients. Both have A = 3 and B = 4, so the lines are parallel.

3. Standard form:
Line 1: 3x + 4y - 9 = 0 (C1 = -9)
Line 2: 3x + 4y - 15/2 = 0 (C2 = -15/2)

4. Use the formula:
\( d = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}} \)
Substitute values:
\( d = \frac{|-9 - (-15/2)|}{\sqrt{3^2 + 4^2}} \)
\( d = \frac{|-9 + 7.5|}{5} \)
\( d = \frac{1.5}{5} \)
5. Final Answer:
The distance between the lines is 0.3 units.


Practice Problems

  • Find the distance between the lines 2x - 3y + 7 = 0 and 2x - 3y - 11 = 0.
  • Calculate the shortest distance between two lines with equations x + y + 4 = 0 and x + y - 2 = 0.
  • In 3D, find the distance between skew lines: \( \vec{r_1} = \vec{a_1} + t\vec{b_1} \), \( \vec{r_2} = \vec{a_2} + s\vec{b_2} \), where
    \( \vec{a_1} = (1,0,0), \, \vec{b_1} = (1,1,0) \),
    \( \vec{a_2} = (0,1,1), \, \vec{b_2} = (0,1,1) \).
  • If the distance between lines 5x - 12y + 2 = 0 and 5x - 12y + k = 0 is 5/13, find the value of k.

Common Mistakes to Avoid

  • Confusing the formula for distance between parallel lines with the distance from a point to a line.
  • Not simplifying equations to standard form before applying the formula.
  • Switching values of C1 and C2 (always use absolute value in numerator).
  • Attempting to use parallel line formulas for non-parallel or intersecting lines.

Real-World Applications

The concept of distance between two lines is useful in urban planning (for shortest road distance), navigation (finding the minimal gap between paths), physics (distance between wires, rails), and even computer graphics. Vedantu helps students visualise and solve such geometric questions, making preparation easier for practical exams.


Page Summary

We explored the idea of distance between two lines, including 2D and 3D cases, formula applications, and worked examples. Practice more such problems on Vedantu and use these formulas for exam confidence and practical problem-solving skills.


Related Topics to Explore


FAQs on Distance Between Two Lines in Coordinate Geometry

1. What is the distance between two lines?

The distance between two lines is the shortest perpendicular distance from any point on one line to the other line. In geometry, this applies mainly to parallel lines (in 2D) or skew lines (in 3D).

  • If two lines intersect, their distance is 0.
  • If two lines are parallel, the distance is constant everywhere.
  • If two lines are skew (non-parallel and non-intersecting in 3D), the distance is the length of the common perpendicular.
This concept is widely used in coordinate geometry and vector algebra.

2. What is the formula for the distance between two parallel lines?

The distance between two parallel lines in the form ax + by + c₁ = 0 and ax + by + c₂ = 0 is |c₁ − c₂| / √(a² + b²).

  • The coefficients of x and y must be the same for both lines.
  • Take the absolute difference of the constants.
  • Divide by √(a² + b²).
For example, the distance between 2x + 3y + 4 = 0 and 2x + 3y − 5 = 0 is |4 − (−5)| / √(4 + 9) = 9/√13.

3. How do you find the distance between two lines in 3D?

The distance between two skew lines in 3D is given by |(a₂ − a₁) · (b₁ × b₂)| / |b₁ × b₂|, where b₁ and b₂ are direction vectors.

  • a₁ and a₂ are position vectors of points on each line.
  • b₁ and b₂ are direction vectors.
  • × denotes cross product, and · denotes dot product.
This formula gives the length of the common perpendicular between the two lines.

4. What is the distance between two intersecting lines?

The distance between two intersecting lines is 0 because they meet at a common point. When two lines intersect, the shortest distance between them is the intersection point itself. Therefore, no perpendicular separation exists between them.

5. How do you find the distance between two parallel lines step by step?

To find the distance between two parallel lines, use the standard formula after writing both equations in the same form.

  • Step 1: Write both lines as ax + by + c = 0.
  • Step 2: Ensure coefficients of x and y are equal.
  • Step 3: Apply the formula |c₁ − c₂| / √(a² + b²).
Example: For x + 2y + 3 = 0 and x + 2y − 1 = 0, distance = |3 − (−1)| / √(1 + 4) = 4/√5.

6. What is the difference between parallel lines and skew lines?

The main difference is that parallel lines lie in the same plane, while skew lines lie in different planes and never intersect.

  • Parallel lines have equal direction ratios and constant distance.
  • Skew lines are non-parallel and non-intersecting in 3D.
  • Distance between parallel lines uses a 2D formula.
  • Distance between skew lines uses vector cross product.
This distinction is important in coordinate geometry and vector algebra.

7. Can you give an example of distance between two lines?

Yes, the distance between 3x − 4y + 7 = 0 and 3x − 4y − 5 = 0 is 12/5.

  • Here, a = 3 and b = −4.
  • Use the formula |c₁ − c₂| / √(a² + b²).
  • Distance = |7 − (−5)| / √(9 + 16) = 12/5.
This is a standard example of distance between two parallel lines in coordinate geometry.

8. Why is the distance between two parallel lines constant?

The distance between two parallel lines is constant because their slopes are equal and they never intersect. Since parallel lines maintain the same direction, the perpendicular distance between them remains the same at every point. This property ensures a fixed separation in coordinate geometry.

9. What are direction ratios in distance between lines problems?

Direction ratios are the components of a line’s direction vector and help determine whether lines are parallel or skew.

  • For a 3D line (x − x₁)/l = (y − y₁)/m = (z − z₁)/n, the numbers l, m, n are direction ratios.
  • If two lines have proportional direction ratios, they are parallel.
  • Direction vectors are used in the skew lines distance formula.
They are essential in vector and 3D coordinate geometry.

10. What are common mistakes when finding the distance between two lines?

Common mistakes include using the wrong formula or not writing equations in standard form correctly.

  • Not converting both lines to ax + by + c = 0.
  • Forgetting absolute value in |c₁ − c₂|.
  • Applying 2D formula to skew lines in 3D.
  • Making errors in cross product calculations.
Carefully identifying whether lines are intersecting, parallel, or skew avoids most errors.