# Distance between Two Lines: Definition, Formula & Examples

What is \”Skew\” (Geometry #127)
What is \”Skew\” (Geometry #127)

Overview

Test Series

A line is a figure formed when two points lie on the same plane and are joined together within the lowest distance. To calculate the distance between two points, draw a perpendicular from one end of the first line to the second line. A straight line has no curves or bends in the middle. Therefore, a straight line can be defined as a line that extends infinitely without having any angle or curve.

Distance between two lines can be found by calculating the perpendicular distance between those lines. The segments with the same length are called congruent segments. The two lines can be parallel, non-parallel, intersecting, and skewed. We can find the shortest distance between two non-intersecting lines on the same plane by determining the shortest distance between the two points that lie on both lines.

The distance between two lines formula is $$d=\frac{\left|c_{2}-c_{1}\right|}{\sqrt{1+m^{2}}}$$

The shortest distance of a line is the perpendicular distance between the two lines drawn from one line to another line. This shortest line distance could be either two parallel lines, non-intersecting skewed lines, or intersecting lines.

Formula for the shortest distance between two lines is $$d=\left|\frac{c_2-c_1}{\sqrt {1+m^2}}\right|$$

Here, $$c_1$$ and $$c_2$$ are the two intercepts of lines $$y = mx + c_1$$ and $$y = mx + c_2latex] and m represents the slope of the lines. Now, let us assume the equation of two lines is given as \($$ax + by + d_1=0\) and $$ax + by + d_2 = 0$$, then the distance between two lines will be $$d=\frac{\mid d_2-d_1 \mid}{\sqrt {a^2 + b^2} }$$

For two parallel lines, in 3D Geometry. Let the first line $$l_{1}$$ be $$\vec{r}=\overrightarrow{a_{1}}+\lambda \vec{b}$$

Second line $$I_{2}$$ be $$\vec{r}=\overrightarrow{a_{2}}+\mu \vec{b}$$

\begin{aligned} \overrightarrow{A_{1} A_{2}}=\left(\overrightarrow{a_{2}}-\overrightarrow{a_{1}}\right) \\ \overrightarrow{A B}=\overrightarrow{A_{1} A_{2}} \cdot \mu_{\overrightarrow{A B}} \\ \overrightarrow{A B}=\left(\overrightarrow{a_{2}}-\overrightarrow{a_{1}}\right) \cdot \frac{\vec{b}}{|\vec{b}|} \\ \text { Then, }\left|\overrightarrow{A_{2} B}\right|^{2}=\frac{\left\{\left(\overrightarrow{a_{2}}-\overrightarrow{a_{1}} \cdot \vec{b}\right)\right\}}{\overrightarrow{b^{2}}} \\ d^{2}=\left|\overrightarrow{A_{1} B}\right|^{2}=\left|\overrightarrow{A_{1} A_{2}}\right|^{2}-\left|\overrightarrow{A_{2} B}\right|^{2} \end{aligned}

Therefore, the distance between two lines in 3D can be found by

$$d^{2}=\frac{\left|\left(\overrightarrow{a_{2}}-\overrightarrow{a_{1}}\right) \times \vec{b}\right|}{|\vec{b}|}$$

As in the case of 2D coordinate axes, the formula for distance between two points $$\left(x_{1}, y_{1}\right)$$ and $$\left(x_{2}, y_{2}\right)$$and $$d=\sqrt{\left(x_{2}-x_{1}\right)^{2}+\left(y_{2}-y_{1}\right)^{2}}$$ is given by

\begin{aligned} (\vec{a} . \vec{b})^{2}+|\vec{a} \times \vec{b}|^{2}=|\vec{a}|^{2} \\ d^{2}=\frac{\left|\left(\overrightarrow{a_{2}}-\overrightarrow{a_{1}}\right)\times \vec{b}\right|}{|\vec{b}|} \end{aligned}

If one of the points is origin and another is (x, y) then, the formula becomes:

$$d=\sqrt{x^{2}+y^{2}}$$

Similarly in 3D, if one of the point is given as (x, y, z)and another is the origin then, the distance formula becomes:

$$d=\sqrt{x^{2}+y^{2}+z^{2}}$$

Now, if $$a x+b y+c=0$$ is the line and, we need to find the distance between this line and the origin (0,0) then use the formula :

$$d=\frac{|c|}{\sqrt{a^{2}+b^{2}}}$$

In order to calculate the distance between two lines in space,

where the first line is t

Second-line is $$t^{\prime}$$

The distance can be denoted by $$d\left(t, t^{\prime}\right)$$

If the two lines are secant, then the distance between two lines in space would be zero

If the two lines in space are intersecting, then the formula to calculate the distance between them can be calculated by:

Consider, Taking a point D on line t

and a point $$D^{\prime}$$ on, line $$t^{\prime}$$

Let both the vectors for line t and $$t^{\prime}$$ be v and $$v^{\prime}$$

Then, the formula for calculating the distance between two intersecting lines in space,

$$d\left(t, t^{\prime}\right)=\frac{\left|\left[D D^{\prime}, \overrightarrow{v,} \overrightarrow{v^{\prime}}\right]\right|}{\left|\vec{v} \times \overrightarrow{v^{\prime}}\right|}$$

Where, $$\left|\left[D D^{\prime}, \vec{v}, \overrightarrow{v^{\prime}}\right]\right|$$ is the absolute value of mixed product of vectors $$D D^{\prime}, \overrightarrow{v,} \overrightarrow{v^{\prime}}$$

Get UGC NET SuperCoaching @ just

₹20999₹7760

Parallel lines are the two non-touching lines that are present between a plane. They are coplanar straight lines denoted by the “||” sign. We can calculate the distance between them by using the distance between two lines formula.

Therefore, the formula to find the distance between two parallel lines is

$$d=\frac{\left|c_{2}-c_{1}\right|}{\sqrt{1+m^{2}}}$$

The length of the perpendicular line segment between two parallel lines is the shortest distance between them.

The shortest distance between parallel lines is calculated as follows:

The distance d between a point P and a line L is the distance present between P and L. It is the shortest length required to move from point to line. Numerous lines can be drawn through the point P, however, the shortest distance occurs to be when the distance between the line through the point is perpendicular to the plane.

The distance between a point and a line is :

$$d=\frac{|a x+b y-c|}{\sqrt{a^{2}+b^{2}}}$$

Two lines in space are termed skew lines in Geometry. They are neither parallel nor intersecting. They are in 3-dimension. Some examples are the pair of opposite edges of a regular tetrahedron.

The shortest distance between the two skewed lines can be calculated by the following vector method:

Similarly, line $$I_{2}$$ be $$\overrightarrow{r_{2}}=\overrightarrow{a_{2}}+t \overrightarrow{b_{2}}$$

$$d=\frac{\left(\overrightarrow{a_{2}}-\overrightarrow{a_{1}}\right) \cdot\left(\overrightarrow{b_{1}}-\overrightarrow{b_{2}}\right)}{\left(\vec{b}_{1} \times \overrightarrow{b_{2}}\right)}$$

Example 1: Find the distance of the point (5,20) from the line 2x+1y+150=0

Solution: Given: The given equation of a line is 2x+1y+150=0

Comparing this equation with ax+by+c=0, we get,

a=2, b=1, c=150

Also, x=5 and y=20,

Now, on substituting the values in the distance formula:

\begin{aligned} d=\frac{|a x+b y-c|}{\sqrt{a^{2}+b^{2}}} \\ =\frac{\mid 2 \times 5+1 \times 20-150 \mid}{\sqrt{2^{2}}+\left(1^{2}\right)} \\ =\frac{180}{3} \\ d=60 \end{aligned}

\begin{aligned} d=\frac{180}{3} \end{aligned}

Hence, the distance of the point (5,20) from the line 2x+1y+150=0 is 60 units

Example 2: From the origin, how far is the point P=(2,4,5)?

Solution: Given: P=(2,4,5)

Formula: $$d=\sqrt{x^{2}+y^{2}+z^{2}}$$
$$d=\sqrt{2^{2}+4^{2}+5^{2}}$$

$$\therefore d=6.70 units$$

Hence, the distance between the point P=(2,4,5) from the origin is 6.70 units

Hope you got a better insight into the distance between the two lines. If you want to excel in the examinations and score good marks, download the Testbook App today for interactive concept-based learning. Be Exam ready with Testbook and enhance your learning journey!

 If you are checking Distance between Two Lines article, also check the related maths articles: Difference between Line and Line Segment Properties of Parallel Lines Addition on Number Line Concurrent Lines General Equation of a Line Vertical Line