Friday, September 4, 2026

27.7 - Distance Between Two Parallel Lines

In the previous section, we saw the shortest distance between two skew lines. In this section, we will see the distance between two parallel lines.

• If two lines in space intersect at a point, we can say that the shortest distance between the two lines is zero.
• If two lines in space are parallel, the shortest distance can be obtained in 3 steps:
(i) Mark any convenient point on one line.
(ii) Drop a perpendicular from that point onto the other line.
(iii) Length of that perpendicular is the shortest distance.


Now we will see the method to find the distance between parallel lines. The method can be explained in 10 steps:
1. In the fig.27.12 below, $\small{l_1~\text{and}~l_2}$ form a pair of parallel lines.
    ♦ Vector equation of $\small{l_1~\text{is:}~\vec{r}=\vec{u_1}+\lambda \vec{v}}$
    ♦ Vector equation of $\small{l_2~\text{is:}~\vec{r}=\vec{u_2}+\mu \vec{v}}$
• Note that both lines are parallel to $\small{\vec{v}}$. So the lines themselves are parallel to each other

Method to find the distance between parallel lines in 3D space
Fig.27.12

2. Next, we want a point on each line.
• Mark the point S on $\small{l_1}$ such that, the position vector of S is $\small{\vec{u_1}}$
• Mark the point T on $\small{l_2}$ such that, the position vector of T is $\small{\vec{u_2}}$

3. Based on the above two position vectors, we can write:
$\small{\vec{ST}=\vec{u_2} - \vec{u_1}}$

4. Next we concentrate on PT. It is obtained by dropping a perpendicular from T onto $\small{l_1}$. Point P is the foot of the perpendicular. PT is the shortest line between $\small{l_1~\text{and}~l_2}$
So we can write:
    ♦ PT is perpendicular to $\small{l_1}$
    ♦ PT is perpendicular to $\small{l_2}$ also

5. We want the distance TP.
• From the triangle STP,we get: $\small{TP = ST \sin \theta}$.
• If we use vectors, the above calculation can be easily done.

6. The lines $\small{l_1,~l_2,~ST~\text{and}~TP}$ lie in the same plane.
The cross product $\small{\left(\vec{v}\times\vec{ST} \right)}$ will be a vector which is perpendicular to that plane.

7. We have:
$\small{\vec{v}\times\vec{ST} = \left(\left|\vec{v} \right|\,\left|\vec{ST} \right|\,\sin\theta \right)\hat{n}}$
• Where $\small{\hat{n}}$ is the unit vector perpendicular to the plane.

8. Substituting for $\small{\vec{ST}}$ from (3), we get:
$\small{\vec{v}\times\left(\vec{u_2} - \vec{u_1} \right) = \left(\left|\vec{v} \right|\,\left|\vec{ST} \right|\,\sin\theta \right)\hat{n}}$
• $\small{\left|\vec{ST} \right|}$ can be written as the length ST. So we get:
$\small{\vec{v}\times\left(\vec{u_2} - \vec{u_1} \right) = \left(\left|\vec{v} \right|\,ST\,\sin\theta \right)\hat{n}}$
• $\small{ST\,\sin\theta = PT}$. So we get:
$\small{\vec{v}\times\left(\vec{u_2} - \vec{u_1} \right) = \left(\left|\vec{v} \right|PT \right)\hat{n}}$

9. The above result is the equality of two vectors. Their magnitudes will be the same. So we can write:
$\small{\left|\vec{v}\times\left(\vec{u_2} - \vec{u_1} \right) \right| = \left|\vec{v} \right|\,PT}$

10. Thus we get:
$\small{PT = \frac{\left|\vec{v}\times\left(\vec{u_2} - \vec{u_1} \right) \right|}{\left|\vec{v} \right|}}$


Let us see a solved example

Solved example 27.29
Find the distance between the lines $\small{l_1~\text{and}~l_2}$ whose vector equations are
$\small{\vec{r} = \hat{i}+2\hat{j}-4\hat{k}+\lambda\left(2\hat{i}+3\hat{j}+6\hat{k} \right)}$
and $\small{\vec{r} = 3\hat{i}+3\hat{j}-5\hat{k}+\mu\left(2\hat{i}+3\hat{j}+6\hat{k} \right)}$
Solution:
The given two lines are parallel because, both the lines are parallel to the vector $\small{2\hat{i}+3\hat{j}+6\hat{k} }$
1. We have:
Shortest distance
= Length of the line $\small{PT}$
= $\small{\frac{\left|\vec{v}\times\left(\vec{u_2} - \vec{u_1} \right) \right|}{\left|\vec{v} \right|}}$

2. Based on the given equations of the lines, we can write:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\vec{u_1}}    & {~=~}    &{\hat{i}+2\hat{j}-4\hat{k}}
\\ {~\color{magenta}    2    }    &{{}}    &{\vec{u_2}}    & {~=~}    &{3\hat{i}+3\hat{j}-5\hat{k}}
\\ {~\color{magenta}    3    }    &{{}}    &{\vec{v}}    & {~=~}    &{2\hat{i}+3\hat{j}+6\hat{k}}
\\ \end{array}}$

3. $\small{\vec{u_2} - \vec{u_1} = 2\hat{i}+\hat{j}-\hat{k}}$

4. Substituting the values, we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{PT}    & {~=~}    &{\frac{\left|\vec{v}\times\left(\vec{u_2} - \vec{u_1} \right) \right|}{\left|\vec{v} \right|}}
\\ {~\color{magenta}    2    }    &{{}}    &{}    & {~=~}    &{\frac{\left|\left(2\hat{i}+3\hat{j}+6\hat{k} \right)\times\left(2\hat{i}+\hat{j}-\hat{k} \right) \right|}{\left|2\hat{i}+3\hat{j}+6\hat{k} \right|}}
\\ {~\color{magenta}    3    }    &{{}}    &{}    & {~=~}    &{\frac{\left|-9\hat{i}+14\hat{j}-4\hat{k}  \right|}{\left|2\hat{i}+3\hat{j}+6\hat{k} \right|}}
\\ {~\color{magenta}    4    }    &{{}}    &{}    & {~=~}    &{\frac{\sqrt{293}}{\sqrt{49}}~=~\frac{\sqrt{293}}{7}}
\\ \end{array}}$

• So the shortest distance = $\small{\frac{\sqrt{293}}{7}}$ units
• Therefore, the shortest distance = $\small{\frac{8}{\sqrt{29}}}$ units


The link below gives the exercise questions. All those exercise questions are already answered in our discussions.

Exercise 27.2


In the next section, we will see Plane.

Previous

Contents

Next

Copyright©2026 Higher secondary mathematics.blogspot.com

Wednesday, September 2, 2026

27.6 - Distance Between Two Skew Lines

In the previous section, we saw the conditions for two lines to be parallel or perpendicular. In this section, we will see the shortest distance between two lines.

• If two lines in space intersect at a point, we can say that the shortest distance between the two lines is zero.
• If two lines in space are parallel, the shortest distance can be obtained in 3 steps:
(i) Mark any convenient point on one line.
(ii) Drop a perpendicular from that point onto the other line.
(iii) Length of that perpendicular is the shortest distance.


Now we will see skew lines. It can be explained in 3 steps:
1. Consider two lines which satisfy the following two conditions:
(i) The two lines do not intersect at any point
(ii) The two lines are not parallel.
2. Two lines which satisfy both the conditions are called skew lines.
3. Skew lines will be lying in different planes. In other words, skew lines are non coplanar.


Let us try to visualize a pair of skew lines. It can be done in 2 steps:
1. Fig.27.10 below shows a room of size:
    ♦ 2 units width along the x-axis
    ♦ 5 units length along the y-axis
    ♦ 3 units height along the z-axis.

Skew lines are not parallel. They do not intersect at any point. They are non coplanar.
Fig.27.10

2. Two lines are shown in the fig.
    ♦ The yellow line is aligned with the diagonal BD of the wall ABED
    ♦ The green line is aligned with the diagonal EG of the ceiling EFGD
• Those two lines do not intersect at any point. Also, they are not parallel. So the yellow and green lines form a pair of skew lines


Now we will see the method to find the shortest distance between skew lines. This method make use of the fact that, the line of shortest distance between two skew lines, will be perpendicular to both the lines. The method can be explained in 8 steps:
1. In the fig.27.11 below, $\small{l_1~\text{and}~l_2}$ form a pair of skew lines.
    ♦ Vector equation of $\small{l_1~\text{is:}~\vec{r}=\vec{u_1}+\lambda \vec{v_1}}$
    ♦ Vector equation of $\small{l_2~\text{is:}~\vec{r}=\vec{u_2}+\mu \vec{v_2}}$

Method for finding the shortest distance between two skew lines by using projection of vectors.
Fig.27.11

2. Next, we want a point on each line.
• Mark the point S on $\small{l_1}$ such that, the position vector of S is $\small{\vec{u_1}}$
• Mark the point T on $\small{l_2}$ such that, the position vector of T is $\small{\vec{u_2}}$

3. Based on the above two position vectors, we can write:
$\small{\vec{ST}=\vec{u_2} - \vec{u_1}}$

4. Next we concentrate on PQ. It is the shortest line between $\small{l_1~\text{and}~l_2}$
So we can write:
    ♦ PQ is perpendicular to $\small{l_1}$
    ♦ PQ is perpendicular to $\small{l_2}$ also

5. Imagine that the vector $\small{\vec{PQ}}$ is present between the points P and Q.
• This vector will be perpendicular to both $\small{l_1~\text{and}~l_2}$

6. Next we want a vector with the same direction as $\small{\vec{PQ}}$. It can be obtained in 4 steps:
(i) Based on the vector equations of $\small{l_1~\text{and}~l_2}$, we can write:
    ♦ $\small{l_1}$ is parallel to $\small{\vec{v_1}}$
    ♦ $\small{l_2}$ is parallel to $\small{\vec{v_2}}$
(ii) So $\small{\left(\vec{v_1}\times\vec{v_2} \right)}$ will be a vector perpendicular to both $\small{\vec{v_1}~\text{and}~\vec{v_2}}$
(iii) Consequently, $\small{\left(\vec{v_1}\times\vec{v_2} \right)}$ will be a vector perpendicular to both $\small{l_1~\text{and}~l_2}$
(iv) That is., $\small{\left(\vec{v_1}\times\vec{v_2} \right)}$ will have the same direction as $\small{\vec{PQ}}$

7. Imagine that, $\small{\vec{ST}}$ is shifted in such a way that, the initial point S of $\small{\vec{ST}}$ coincides with the initial point P of $\small{\vec{PQ}}$
• In this situation, we can write:
The projection of $\small{\vec{ST}~\text{on}~\vec{PQ}}$
= Length of the line $\small{PQ}$

8. We can easily calculate the projection. See section 26.9.
• We can write:
Shortest distance
= Length of the line $\small{PQ}$
= $\small{\vec{ST}.\hat{PQ}}$
    ♦ We can obtain $\small{\vec{ST}}$ from (3)
    ♦ $\small{\hat{PQ}}$ is the unit vector in the direction of $\small{\vec{PQ}}$. We can obtain it from 6(iv)


Let us see some solved examples:

Solved example 27.24
Find the shortest distance between the lines $\small{l_1~\text{and}~l_2}$ whose vector equations are
$\small{\vec{r} = \hat{i}+\hat{j}+\lambda\left(2\hat{i}-\hat{j}+\hat{k} \right)}$
and $\small{\vec{r} = 2\hat{i}+\hat{j}-\hat{k}+\mu\left(3\hat{i}-5\hat{j}+2\hat{k} \right)}$
Solution:
1. We have:
Shortest distance
= Length of the line $\small{PQ}$
= Projection of $\small{\vec{ST}~\text{on}~\vec{PQ}}$
• The projection is given by: $\small{\vec{ST}.\hat{PQ}}$

2. Based on the given equations of the lines, we can write:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\vec{u_1}}    & {~=~}    &{\hat{i}+\hat{j}}
\\ {~\color{magenta}    2    }    &{{}}    &{\vec{u_2}}    & {~=~}    &{2\hat{i}+\hat{j}-\hat{k}}
\\ {~\color{magenta}    3    }    &{{}}    &{\vec{v_1}}    & {~=~}    &{2\hat{i}-\hat{j}+\hat{k}}
\\ {~\color{magenta}    4    }    &{{}}    &{\vec{v_2}}    & {~=~}    &{3\hat{i}-5\hat{j}+2\hat{k}}
\\ \end{array}}$

3. $\small{\vec{ST} = \vec{u_2} - \vec{u_1} = \hat{i}-\hat{k}}$

4. $\small{\hat{PQ} = \frac{\vec{v_1}\times\vec{v_2}}{\left|\vec{v_1}\times\vec{v_2} \right|}}$
= $\small{\frac{3\hat{i}-\hat{j}-7\hat{k}}{\sqrt{3^2 + (-1)^2 + 7^2}}}$
= $\small{\frac{3\hat{i}-\hat{j}+7\hat{k}}{\sqrt{59}}}$
• The reader may write all the steps related to the cross product

5. Substituting (3) and (4) in (1), we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\text{Projection}}    & {~=~}    &{\vec{ST}.\hat{PQ}}
\\ {~\color{magenta}    2    }    &{{}}    &{}    & {~=~}    &{\left(\hat{i}-\hat{k} \right).\left(\frac{3\hat{i}-\hat{j}-7\hat{k}}{\sqrt{59}} \right)}
\\ {~\color{magenta}    3    }    &{{}}    &{}    & {~=~}    &{\frac{(1)(3)+(0)(-1)+(-1)(-7)}{\sqrt{59}}}
\\ {~\color{magenta}    4    }    &{{}}    &{}    & {~=~}    &{\frac{10}{\sqrt{59}}}
\\ \end{array}}$

• So the shortest distance = $\small{\frac{10}{\sqrt{59}}}$ units 

Solved example 27.25
Find the shortest distance between the lines $\small{l_1~\text{and}~l_2}$ whose vector equations are
$\small{\vec{r} = \hat{i}+2\hat{j}+\hat{k}+\lambda\left(\hat{i}-\hat{j}+\hat{k} \right)}$
and $\small{\vec{r} = 2\hat{i}-\hat{j}-\hat{k}+\mu\left(2\hat{i}+\hat{j}+2\hat{k} \right)}$
Solution:
1. We have:
Shortest distance
= Length of the line $\small{PQ}$
= Projection of $\small{\vec{ST}~\text{on}~\vec{PQ}}$
• The projection is given by: $\small{\vec{ST}.\hat{PQ}}$

2. Based on the given equations of the lines, we can write:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\vec{u_1}}    & {~=~}    &{\hat{i}+2\hat{j}+\hat{k}}
\\ {~\color{magenta}    2    }    &{{}}    &{\vec{u_2}}    & {~=~}    &{2\hat{i}-\hat{j}-\hat{k}}
\\ {~\color{magenta}    3    }    &{{}}    &{\vec{v_1}}    & {~=~}    &{\hat{i}-\hat{j}+\hat{k}}
\\ {~\color{magenta}    4    }    &{{}}    &{\vec{v_2}}    & {~=~}    &{2\hat{i}+\hat{j}+2\hat{k}}
\\ \end{array}}$

3. $\small{\vec{ST} = \vec{u_2} - \vec{u_1} = \hat{i}-3\hat{j}-2\hat{k}}$

4. $\small{\hat{PQ} = \frac{\vec{v_1}\times\vec{v_2}}{\left|\vec{v_1}\times\vec{v_2} \right|}}$
= $\small{\frac{-3\hat{i}+3\hat{k}}{\sqrt{(-3)^2  + 3^2}}}$
= $\small{\frac{-3\hat{i}+3\hat{k}}{\sqrt{18}}}$
• The reader may write all the steps related to the cross product

5. Substituting (3) and (4) in (1), we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\text{Shortest distance}}    & {~=~}    &{\vec{ST}.\hat{PQ}}
\\ {~\color{magenta}    2    }    &{{}}    &{}    & {~=~}    &{\left(\hat{i}-3\hat{j}-2\hat{k} \right).\left(\frac{-3\hat{i}+3\hat{k}}{\sqrt{18}} \right)}
\\ {~\color{magenta}    3    }    &{{}}    &{}    & {~=~}    &{\frac{(1)(-3)+(-3)(0)+(-2)(3)}{\sqrt{18}}}
\\ {~\color{magenta}    4    }    &{{}}    &{}    & {~=~}    &{\frac{-9}{\sqrt{18}}=\frac{(-1)\sqrt{9}\,\sqrt{9}}{\sqrt{2}\,\sqrt{9}} = \frac{(-1)(3)}{\sqrt{2}}}
\\ {~\color{magenta}    5    }    &{{}}    &{}    & {~=~}    &{\frac{-3\sqrt{2}}{2}}
\\ \end{array}}$

• Projection is a distance. It cannot be −ve. So we need to take the absolute value.
• Therefore, the shortest distance = $\small{\left|\frac{-3\sqrt{2}}{2} \right|~=~\frac{3\sqrt{2}}{2}}$ units

Solved example 27.26
Find the shortest distance between the lines $\small{l_1~\text{and}~l_2}$ whose vector equations are
$\small{\vec{r} = \hat{i}+2\hat{j}+3\hat{k}+\lambda\left(\hat{i}-3\hat{j}+2\hat{k} \right)}$
and $\small{\vec{r} = 4\hat{i}+5\hat{j}+6\hat{k}+\mu\left(2\hat{i}+3\hat{j}+\hat{k} \right)}$
Solution:
1. We have:
Shortest distance
= Length of the line $\small{PQ}$
= Projection of $\small{\vec{ST}~\text{on}~\vec{PQ}}$
• The projection is given by: $\small{\vec{ST}.\hat{PQ}}$

2. Based on the given equations of the lines, we can write:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\vec{u_1}}    & {~=~}    &{\hat{i}+2\hat{j}+3\hat{k}}
\\ {~\color{magenta}    2    }    &{{}}    &{\vec{u_2}}    & {~=~}    &{4\hat{i}+5\hat{j}+6\hat{k}}
\\ {~\color{magenta}    3    }    &{{}}    &{\vec{v_1}}    & {~=~}    &{\hat{i}-3\hat{j}+2\hat{k}}
\\ {~\color{magenta}    4    }    &{{}}    &{\vec{v_2}}    & {~=~}    &{2\hat{i}+3\hat{j}+\hat{k}}
\\ \end{array}}$

3. $\small{\vec{ST} = \vec{u_2} - \vec{u_1} = 3\hat{i}-3\hat{j}+3\hat{k}}$

4. $\small{\hat{PQ} = \frac{\vec{v_1}\times\vec{v_2}}{\left|\vec{v_1}\times\vec{v_2} \right|}}$
= $\small{\frac{-9\hat{i}+3\hat{j}+9\hat{k}}{\sqrt{(-9)^2  + 3^2 + 9^2}}}$
= $\small{\frac{-9\hat{i}+3\hat{j}+9\hat{k}}{\sqrt{171}}}$
• The reader may write all the steps related to the cross product

5. Substituting (3) and (4) in (1), we get:

$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\text{Shortest distance}}    & {~=~}    &{\vec{ST}.\hat{PQ}}
\\ {~\color{magenta}    2    }    &{{}}    &{}    & {~=~}    &{\left(3\hat{i}-3\hat{j}+3\hat{k} \right).\left(\frac{-9\hat{i}+3\hat{j}+9\hat{k}}{\sqrt{171}} \right)}
\\ {~\color{magenta}    3    }    &{{}}    &{}    & {~=~}    &{\frac{(3)(-9)+(-3)(-3)+(3)(9)}{\sqrt{171}}}
\\ {~\color{magenta}    4    }    &{{}}    &{}    & {~=~}    &{\frac{9}{\sqrt{171}}=\frac{9}{3\,\sqrt{19}} }
\\ {~\color{magenta}    5    }    &{{}}    &{}    & {~=~}    &{\frac{3}{\sqrt{19}}}
\\ \end{array}}$

• Therefore, the shortest distance = $\small{\frac{3}{\sqrt{19}}}$ units

Solved example 27.27
Find the shortest distance between the lines $\small{l_1~\text{and}~l_2}$ whose vector equations are
$\small{\vec{r} = (1-t)\hat{i}+(t-2)\hat{j}+(3-2t)\hat{k}}$
and $\small{\vec{r} = (s+1)\hat{i}+(2s-1)\hat{j}-(2s+1)\hat{k}}$
Solution:
1. Let us convert the given vector equations to standard form:
• The vector equation of $\small{l_1}$ is:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\vec{r}}    & {~=~}    &{(1-t)\hat{i}+(t-2)\hat{j}+(3-2t)\hat{k}}
\\ {~\color{magenta}    2    }    &{{}}    &{}    & {~=~}    &{\hat{i}-t\hat{i}+t\hat{j}-2\hat{j}+3\hat{k}-2t\hat{k}}
\\ {~\color{magenta}    3    }    &{{}}    &{}    & {~=~}    &{\hat{i}-2\hat{j}+3\hat{k}-t\hat{i}+t\hat{j}-2t\hat{k}}
\\ {~\color{magenta}    4    }    &{{}}    &{}    & {~=~}    &{\hat{i}-2\hat{j}+3\hat{k}+t\left(-\hat{i}+\hat{j}-2\hat{k} \right)}
\\ \end{array}}$
• The vector equation of $\small{l_2}$ is:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\vec{r}}    & {~=~}    &{(s+1)\hat{i}+(2s-1)\hat{j}-(2s+1)\hat{k}}
\\ {~\color{magenta}    2    }    &{{}}    &{}    & {~=~}    &{s\hat{i}+\hat{i}+2s\hat{j}-\hat{j}-2s\hat{k}-\hat{k}}
\\ {~\color{magenta}    3    }    &{{}}    &{}    & {~=~}    &{\hat{i}-\hat{j}-\hat{k}+s\hat{i}+2s\hat{j}-2s\hat{k}}
\\ {~\color{magenta}    4    }    &{{}}    &{}    & {~=~}    &{\hat{i}-\hat{j}-\hat{k}+s\left(\hat{i}+2\hat{j}-2\hat{k} \right)}
\\ \end{array}}$

2. We have:
Shortest distance
= Length of the line $\small{PQ}$
= Projection of $\small{\vec{ST}~\text{on}~\vec{PQ}}$
• The projection is given by: $\small{\vec{ST}.\hat{PQ}}$

3. Based on the given equations of the lines, we can write:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\vec{u_1}}    & {~=~}    &{\hat{i}-2\hat{j}+3\hat{k}}
\\ {~\color{magenta}    2    }    &{{}}    &{\vec{u_2}}    & {~=~}    &{\hat{i}-\hat{j}-\hat{k}}
\\ {~\color{magenta}    3    }    &{{}}    &{\vec{v_1}}    & {~=~}    &{-\hat{i}+\hat{j}-2\hat{k}}
\\ {~\color{magenta}    4    }    &{{}}    &{\vec{v_2}}    & {~=~}    &{\hat{i}+2\hat{j}-2\hat{k}}
\\ \end{array}}$

4. $\small{\vec{ST} = \vec{u_2} - \vec{u_1} = \hat{j}-4\hat{k}}$

5. $\small{\hat{PQ} = \frac{\vec{v_1}\times\vec{v_2}}{\left|\vec{v_1}\times\vec{v_2} \right|}}$
= $\small{\frac{2\hat{i}-4\hat{j}-3\hat{k}}{\sqrt{2^2  + (-4)^2 + (-3)^2}}}$
= $\small{\frac{2\hat{i}-4\hat{j}-3\hat{k}}{\sqrt{29}}}$
• The reader may write all the steps related to the cross product

6. Substituting (4) and (5) in (2), we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\text{Shortest distance}}    & {~=~}    &{\vec{ST}.\hat{PQ}}
\\ {~\color{magenta}    2    }    &{{}}    &{}    & {~=~}    &{\left(\hat{j}-4\hat{k} \right).\left(\frac{2\hat{i}-4\hat{j}-3\hat{k}}{\sqrt{29}} \right)}
\\ {~\color{magenta}    3    }    &{{}}    &{}    & {~=~}    &{\frac{(0)(2)+(1)(-4)+(-4)(-3)}{\sqrt{29}}}
\\ {~\color{magenta}    4    }    &{{}}    &{}    & {~=~}    &{\frac{8}{\sqrt{29}} }
\\ {~\color{magenta}    5    }    &{{}}    &{}    & {~=~}    &{\frac{3}{\sqrt{19}}}
\\ \end{array}}$

• Therefore, the shortest distance = $\small{\frac{8}{\sqrt{29}}}$ units


• In the above discussion, we were given the equations of the lines in vector form. If the equations were given in the Cartesian form, we can quickly convert them into vector form. See the "easy method" mentioned in Solved examples 27.11 and 27.22 of section 27.2

Let us see a solved example

Solved example 27.28
Find the shortest distance between the lines $\small{l_1~\text{and}~l_2}$ whose Cartesian equations are
$\small{\frac{x+1}{7}~=~\frac{y+1}{-6}~=~\frac{z+1}{1}}$
and $\small{\frac{x-3}{1}~=~\frac{y-5}{-2}~=~\frac{z-7}{1}}$
Solution:
1. Let us convert the given Cartesian equations to vector equations:
• The vector equation of $\small{l_1}$ is:
$\small{\vec{r} = -\hat{i}-\hat{j}-\hat{k}+\lambda\left(7\hat{i}-6\hat{j}+\hat{k} \right)}$
• The vector equation of $\small{l_2}$ is:
$\small{\vec{r} = 3\hat{i}+5\hat{j}+7\hat{k}+\mu\left(\hat{i}-2\hat{j}+\hat{k} \right)}$

2. We have:
Shortest distance
= Length of the line $\small{PQ}$
= Projection of $\small{\vec{ST}~\text{on}~\vec{PQ}}$
• The projection is given by: $\small{\vec{ST}.\hat{PQ}}$

3. Based on the given equations of the lines, we can write:

$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\vec{u_1}}    & {~=~}    &{-\hat{i}-\hat{j}-\hat{k}}
\\ {~\color{magenta}    2    }    &{{}}    &{\vec{u_2}}    & {~=~}    &{3\hat{i}+5\hat{j}+7\hat{k}}
\\ {~\color{magenta}    3    }    &{{}}    &{\vec{v_1}}    & {~=~}    &{7\hat{i}-6\hat{j}+\hat{k}}
\\ {~\color{magenta}    4    }    &{{}}    &{\vec{v_2}}    & {~=~}    &{\hat{i}-2\hat{j}+\hat{k}}
\\ \end{array}}$

4. $\small{\vec{ST} = \vec{u_2} - \vec{u_1} = 4\hat{i}+6\hat{j}+8\hat{k}}$

5. $\small{\hat{PQ} = \frac{\vec{v_1}\times\vec{v_2}}{\left|\vec{v_1}\times\vec{v_2} \right|}}$
= $\small{\frac{-4\hat{i}-6\hat{j}-8\hat{k}}{\sqrt{(-4)^2  + (-6)^2 + (-8)^2}}}$
= $\small{\frac{-4\hat{i}-6\hat{j}-8\hat{k}}{\sqrt{116}}}$
• The reader may write all the steps related to the cross product

6. Substituting (4) and (5) in (2), we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\text{Shortest distance}}    & {~=~}    &{\vec{ST}.\hat{PQ}}
\\ {~\color{magenta}    2    }    &{{}}    &{}    & {~=~}    &{\left(4\hat{i}+6\hat{j}+8\hat{k} \right).\left(\frac{-4\hat{i}-6\hat{j}-8\hat{k}}{\sqrt{116}} \right)}
\\ {~\color{magenta}    3    }    &{{}}    &{}    & {~=~}    &{\frac{(4)(-4)+(6)(-6)+(8)(-8)}{\sqrt{116}}}
\\ {~\color{magenta}    4    }    &{{}}    &{}    & {~=~}    &{\frac{-116}{\sqrt{116}}=(-1)\sqrt{116}}
\\ {~\color{magenta}    5    }    &{{}}    &{}    & {~=~}    &{-2\sqrt{29}}
\\ \end{array}}$

• Projection is a distance. It cannot be −ve. So we need to take the absolute value.
• Therefore, the shortest distance = $\small{\left|-2\sqrt{29} \right|~=~2\sqrt{29}}$ units


In the next section, we will see distance between parallel lines.

Previous

Contents

Next

Copyright©2026 Higher secondary mathematics.blogspot.com

Sunday, August 23, 2026

27.5 - Two Lines Parallel or Perpendicular

In the previous section, we saw the angle between lines in 3D. In this section, we will see the conditions for two lines to be parallel or perpendicular to each other.

First we will see angle in terms of direction cosines. It can be explained in 7 steps:
1. For $\small{L_1}$:
    ♦ Let the direction ratios be $\small{a_1,~b_1,~c_1}$
    ♦ Let the direction cosines be $\small{l_1,~m_1,~n_1}$
• Then we can write:
$\small{\frac{l_1}{a_1}~=~\frac{m_1}{b_1}~=~\frac{n_1}{c_1}~=~\lambda_1}$

2. For $\small{L_2}$:
    ♦ Let the direction ratios be $\small{a_2,~b_2,~c_2}$
    ♦ Let the direction cosines be $\small{l_2,~m_2,~n_2}$
• Then we can write:
$\small{\frac{l_2}{a_2}~=~\frac{m_2}{b_2}~=~\frac{n_2}{c_2}~=~\lambda_2}$

3. Now we can write:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{a_1 a_2 ~+~ b_1 b_2~+~c_1 c_2}    & {~=~}    &{\left(\frac{l_1}{\lambda_1} \right)\left(\frac{l_2}{\lambda_2} \right)+\left(\frac{l_1}{\lambda_1} \right)\left(\frac{l_2}{\lambda_2} \right)+\left(\frac{l_1}{\lambda_1} \right)\left(\frac{l_2}{\lambda_2} \right)}
\\ {~\color{magenta}    2    }    &{}    &{}    & {~=~}    &{\frac{l_1 l_2~+~m_1 m_2~+~n_1 n_2}{\lambda_1\lambda_2}}
\\ \end{array}}$

4. Also we can write:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{a_1^2 ~+~ b_1^2~+~c_1^2}    & {~=~}    &{\left(\frac{l_1}{\lambda_1} \right)^2~+~\left(\frac{m_1}{\lambda_1} \right)^2~+~\left(\frac{n_1}{\lambda_1} \right)^2}
\\ {~\color{magenta}    2    }    &{}    &{}    & {~=~}    &{\frac{l_1^2~+~m_1^2~+~n_1^2}{\lambda_1^2}}
\\ {~\color{magenta}    3    }    &{\Rightarrow}    &{\sqrt{a_1^2 ~+~ b_1^2~+~c_1^2}}    & {~=~}    &{\frac{\sqrt{l_1^2~+~m_1^2~+~n_1^2}}{\lambda_1}}
\\ \end{array}}$

5. Also we can write:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{a_2^2 ~+~ b_2^2~+~c_2^2}    & {~=~}    &{\left(\frac{l_2}{\lambda_2} \right)^2~+~\left(\frac{m_2}{\lambda_2} \right)^2~+~\left(\frac{n_2}{\lambda_2} \right)^2}
\\ {~\color{magenta}    2    }    &{}    &{}    & {~=~}    &{\frac{l_2^2~+~m_2^2~+~n_2^2}{\lambda_2^2}}
\\ {~\color{magenta}    3    }    &{\Rightarrow}    &{\sqrt{a_2^2 ~+~ b_2^2~+~c_2^2}}    & {~=~}    &{\frac{\sqrt{l_2^2~+~m_2^2~+~n_2^2}}{\lambda_2}}
\\ \end{array}}$

6. In the previous section, we derived the formula:
$\small{\cos\theta~=~\frac{a_1 a_2 ~+~ b_1 b_2~+~c_1 c_2}{\sqrt{a_1^2 + b_1^2 + c_1^2}\,\sqrt{a_2^2 + b_2^2 + c_2^2}}}$

7. Substituting from (3), (4) and (5), we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\cos\theta}    & {~=~}    &{\frac{\frac{l_1 l_2~+~m_1 m_2~+~n_1 n_2}{\lambda_1\lambda_2}}{\left(\frac{\sqrt{l_1^2~+~m_1^2~+~n_1^2}}{\lambda_1} \right)\left(\frac{\sqrt{l_2^2~+~m_2^2~+~n_2^2}}{\lambda_2} \right)}}
\\ {~\color{magenta}    2    }    &{}    &{}    & {~=~}    &{\frac{l_1 l_2~+~m_1 m_2~+~n_1 n_2}{\left(\sqrt{l_1^2~+~m_1^2~+~n_1^2} \right)\left(\sqrt{l_2^2~+~m_2^2~+~n_2^2} \right)}}
\\ {~\color{magenta}    3    }    &{}    &{}    & {~=~}    &{\frac{l_1 l_2~+~m_1 m_2~+~n_1 n_2}{\left(1 \right)\left(1 \right)}}
\\ {~\color{magenta}    4    }    &{}    &{}    & {~=~}    &{l_1 l_2~+~m_1 m_2~+~n_1 n_2}
\\ \end{array}}$

◼ Remarks:
3 (magenta color): Here we use the fact that:
$\small{l^2 + m^2 +n^2 = 1}$


Now we will see the condition for two lines to be perpendicular. It can be explained in 4 steps:
1. We have seen that $\small{\cos \theta = l_1 l_2~+~m_1 m_2~+~n_1 n_2}$ 

2. When the two lines are perpendicular, we can write:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\cos\left(\frac{\pi}{2} \right)}    & {~=~}    &{l_1 l_2~+~m_1 m_2~+~n_1 n_2}
\\ {~\color{magenta}    2    }    &{\Rightarrow}    &{0}    & {~=~}    &{l_1 l_2~+~m_1 m_2~+~n_1 n_2}
\\ \end{array}}$

3. So the condition for two lines to be perpendicular is:
$\small{l_1 l_2~+~m_1 m_2~+~n_1 n_2~=~0}$

4. The above condition is in terms of direction cosines. We can write it in terms of direction ratios also:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{l_1 l_2~+~m_1 m_2~+~n_1 n_2}    & {~=~}    &{0}
\\ {~\color{magenta}    2    }    &{\Rightarrow}    &{\left(\lambda_1 a_1 \right)\left(\lambda_2 a_2 \right)~+~\left(\lambda_1 b_1 \right)\left(\lambda_2 b_2 \right)~+~\left(\lambda_1 c_1 \right)\left(\lambda_2 c_2 \right)}    & {~=~}    &{0}
\\ {~\color{magenta}    3    }    &{\Rightarrow}    &{\lambda_1 \lambda_2\left(a_1 a_2~+~b_1 b_2~+~c_1 c_2 \right)}    & {~=~}    &{0}
\\ {~\color{magenta}    4    }    &{\Rightarrow}    &{a_1 a_2~+~b_1 b_2~+~c_1 c_2}    & {~=~}    &{0}
\\ \end{array}}$


We have already seen the condition for two lines to be parallel in a previous section 27.1.
1. The condition in terms of direction cosines is:
$\small{\frac{l_1}{l_2}~=~\frac{m_1}{m_2}~=~\frac{n_1}{n_2}}$

2. The condition in terms of direction ratios is:
$\small{\frac{a_1}{a_2}~=~\frac{b_1}{b_2}~=~\frac{c_1}{c_2}}$


Now we will see some solved examples

Solved example 27.19
Show that the three lines with direction cosines
$\small{\frac{12}{13},~\frac{-3}{13},~\frac{-4}{13};~~~~~~\frac{4}{13},~\frac{12}{13},~\frac{3}{13};~~~~~~\frac{3}{13},~\frac{-4}{13},~\frac{12}{13}}$
are mutually perpendicular.
Solution:
1. Let us name the three lines and classify the direction cosines:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{L_1}    & {~:~}    &{\frac{12}{13},~\frac{-3}{13},~\frac{-4}{13}}
\\ {~\color{magenta}    2    }    &{}    &{L_2}    & {~:~}    &{\frac{4}{13},~\frac{12}{13},~\frac{3}{13}}
\\ {~\color{magenta}    3    }    &{}    &{L_3}    & {~:~}    &{\frac{3}{13},~\frac{-4}{13},~\frac{12}{13}}
\\ \end{array}}$

2. If two lines $\small{L_1~\text{and}~L_2}$ are perpendicular, we have:
$\small{l_1 l_2~+~m_1 m_2~+~n_1 n_2~=~0}$

3. Let us check the given $\small{L_1~\text{and}~L_2}$:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{l_1 l_2~+~m_1 m_2~+~n_1 n_2}    & {~=~}    &{\left(\frac{12}{13} \right)\left(\frac{4}{13} \right)+\left(\frac{-3}{13} \right)\left(\frac{12}{13} \right)+\left(\frac{-4}{13} \right)\left(\frac{3}{13} \right)}
\\ {~\color{magenta}    2    }    &{}    &{}    & {~=~}    &{\frac{48 -36 - 12}{169}~=~\frac{0}{169}}
\\ {~\color{magenta}    3    }    &{}    &{}    & {~=~}    &{0}
\\ \end{array}}$
• So $\small{L_1~\text{and}~L_2}$ are mutually perpendicular.

4. Let us check the given $\small{L_2~\text{and}~L_3}$:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{l_2 l_3~+~m_2 m_3~+~n_2 n_3}    & {~=~}    &{\left(\frac{4}{13} \right)\left(\frac{3}{13} \right)
+\left(\frac{12}{13} \right)\left(\frac{-4}{13} \right)
+\left(\frac{3}{13} \right)\left(\frac{12}{13} \right)}
\\ {~\color{magenta}    2    }    &{}    &{}    & {~=~}    &{\frac{12 -48 + 36}{169}~=~\frac{0}{169}}
\\ {~\color{magenta}    3    }    &{}    &{}    & {~=~}    &{0}
\\ \end{array}}$
• So $\small{L_2~\text{and}~L_3}$ are mutually perpendicular.

5. Let us check the given $\small{L_3~\text{and}~L_1}$:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{l_3 l_1~+~m_3 m_1~+~n_3 n_1}    & {~=~}    &{\left(\frac{3}{13} \right)\left(\frac{12}{13} \right)
+\left(\frac{-4}{13} \right)\left(\frac{-3}{13} \right)
+\left(\frac{12}{13} \right)\left(\frac{-4}{13} \right)}
\\ {~\color{magenta}    2    }    &{}    &{}    & {~=~}    &{\frac{36 +12 - 48}{169}~=~\frac{0}{169}}
\\ {~\color{magenta}    3    }    &{}    &{}    & {~=~}    &{0}
\\ \end{array}}$
• So $\small{L_3~\text{and}~L_1}$ are mutually perpendicular.

6. Based on (3), (4) and (5), we can write:
The three lines are mutually perpendicular.

Solved example 27.20
Show that the line through the points (1,−1,2) and (3,4,−2) is perpendicular to the line through the points (0,3,2) and (3,5,6)
Solution:
1. For a line through two points $\small{U\left(x_1,y_1,z_1 \right)~\text{and}~V\left(x_2,y_2,z_2 \right)}$, we can consider $\small{\left(x_2 - x_1 \right),~\left(y_2 - y_1 \right)~\text{and}~\left(z_2 - z_1 \right)}$ as a set of direction ratios.

2. So for the first line, the direction ratios $\small{a_1,b_1,c_1}$ are:
2, 5 and −4

3. Similarly, for the second line, the direction ratios $\small{a_2,b_2,c_2}$ are:
3, 2 and 4

4. If two lines $\small{L_1~\text{and}~L_2}$ are perpendicular, we have:
$\small{a_1 a_2~+~b_1 b_2~+~c_1 c_2~=~0}$

5. Substituting the values, we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{a_1 a_2~+~b_1 b_2~+~c_1 c_2}    & {~=~}    &{\left(2 \right)\left(3 \right)+\left(5 \right)\left(2 \right)+\left(-4 \right)\left(4 \right)}
\\ {~\color{magenta}    2    }    &{}    &{}    & {~=~}    &{6+10-16}
\\ {~\color{magenta}    3    }    &{}    &{}    & {~=~}    &{0}
\\ \end{array}}$

6. So the two lines are perpendicular to each other.

Solved example 27.21
Show that the line through the points (4,7,8) and (2,3,4) is  parallel to the line through the points (−1,−2,1) and (1,2,5)
Solution:
1. For a line through two points $\small{U\left(x_1,y_1,z_1 \right)~\text{and}~V\left(x_2,y_2,z_2 \right)}$, we can consider $\small{\left(x_2 - x_1 \right),~\left(y_2 - y_1 \right)~\text{and}~\left(z_2 - z_1 \right)}$ as a set of direction ratios.

2. So for the first line, the direction ratios $\small{a_1,b_1,c_1}$ are:
−2, −4 and −4

3. Similarly, for the second line, the direction ratios $\small{a_2,b_2,c_2}$ are:
2, 4 and 4

4. If two lines $\small{L_1~\text{and}~L_2}$ are parallel, we have:
$\small{\frac{a_1}{a_2}~=~\frac{b_1}{b_2}~=~\frac{c_1}{c_2}}$

5. Substituting the values, we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\frac{-2}{2}}& {~=~}    &{\frac{-4}{4}}    & {~=~}    &{\frac{-4}{4}}
\\ {~\color{magenta}    2    }    &{{\Rightarrow}}    &{-1}& {~=~}    &{-1}    & {~=~}    &{-1}
\\ \end{array}}$ 

6. So the two lines are parallel.

Solved example 27.22
Show that the lines
$\small{\frac{x-5}{7}~=~\frac{y+2}{-5}~=~\frac{z}{1}}$ and
$\small{\frac{x}{1}~=~\frac{y}{2}~=~\frac{z}{3}}$
are perpendicular to each other
Solution:
1. When the equation of the line is in Cartesian form, the denominators can be considered as a set of direction ratios.

2. So for the first line, the direction ratios $\small{a_1,b_1,c_1}$ are:
7, −5 and 1

3. Similarly, for the second line, the direction ratios $\small{a_2,b_2,c_2}$ are:
1, 2 and 3

4. If two lines $\small{L_1~\text{and}~L_2}$ are perpendicular, we have:
$\small{a_1 a_2~+~b_1 b_2~+~c_1 c_2~=~0}$

5. Substituting the values, we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{a_1 a_2~+~b_1 b_2~+~c_1 c_2}    & {~=~}    &{\left(7 \right)\left(1\right)+\left(-5 \right)\left(2 \right)+\left(1 \right)\left(3 \right)}
\\ {~\color{magenta}    2    }    &{}    &{}    & {~=~}    &{7-10+3}
\\ {~\color{magenta}    3    }    &{}    &{}    & {~=~}    &{0}
\\ \end{array}}$

6. So the two lines are perpendicular to each other.

Solved example 27.23
Find the value of $\small{p}$ so that the lines
$\small{\frac{1-x}{3}~=~\frac{7y-14}{2p}~=~\frac{z-3}{2}}$ and
$\small{\frac{7-7x}{3p}~=~\frac{y-5}{1}~=~\frac{6-z}{5}}$
are perpendicular to each other
Solution:
1. When the equation of the line is in Cartesian form, the denominators can be considered as a set of direction ratios.
• But we need to convert the equations into standard form.
• For the first line, we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\frac{1-x}{3}}& {~=~}    &{\frac{7y-14}{2p}}    & {~=~}    &{\frac{z-3}{2}}
\\ {~\color{magenta}    2    }    &{{\Rightarrow}}    &{\frac{(-1)(1-x)}{(-1)(3)}}& {~=~}    &{\frac{(7y-14)/7}{(2p)/7}}    & {~=~}    &{\frac{z-3}{2}}
\\ {~\color{magenta}    3    }    &{{\Rightarrow}}    &{\frac{x-1}{-3}}& {~=~}    &{\frac{y-2}{(2/7)p}}    & {~=~}    &{\frac{z-3}{2}}
\\ \end{array}}$
• For the second line, we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{\frac{7-7x}{3p}}& {~=~}    &{\frac{y-5}{1}}    & {~=~}    &{\frac{6-z}{5}}
\\ {~\color{magenta}    2    }    &{{\Rightarrow}}    &{\frac{(-1)(1/7)(7-7x)}{(-1)(1/7)(3p)}}& {~=~}    &{\frac{y-5}{1}}    & {~=~}    &{\frac{(-1)(6-z)}{(-1)(5)}}
\\ {~\color{magenta}    3    }    &{{\Rightarrow}}    &{\frac{x-1}{(-3/7)p}}& {~=~}    &{\frac{y-5}{1}}    & {~=~}    &{\frac{z-6}{-5}}
\\ \end{array}}$ 

2. So for the first line, the direction ratios $\small{a_1,b_1,c_1}$ are:
−3, (2/7)p and 2

3. Similarly, for the second line, the direction ratios $\small{a_2,b_2,c_2}$ are:
(−3/7)p, 1 and −5

4. If two lines $\small{L_1~\text{and}~L_2}$ are perpendicular, we have:
$\small{a_1 a_2~+~b_1 b_2~+~c_1 c_2~=~0}$

5. Substituting the values, we get:
$\small{\begin{array}{ll} {~\color{magenta}    1    }    &{{}}    &{a_1 a_2~+~b_1 b_2~+~c_1 c_2}    & {~=~}    &{0}
\\ {~\color{magenta}    2    }    &{\Rightarrow}    &{\left(-3 \right)\left((-3/7)p\right)+\left((2/7)p \right)\left(1 \right)+\left(2 \right)\left(-5 \right)}    & {~=~}    &{0}
\\ {~\color{magenta}    3    }    &{\Rightarrow}    &{\frac{9p}{7} + \frac{2p}{7} - 10}    & {~=~}    &{0}
\\ {~\color{magenta}    4    }    &{\Rightarrow}    &{\frac{11p - 70}{7}}    & {~=~}    &{0}
\\ {~\color{magenta}    5    }    &{\Rightarrow}    &{11p - 70}    & {~=~}    &{0}
\\ {~\color{magenta}    6    }    &{\Rightarrow}    &{p}    & {~=~}    &{\frac{70}{11}}
\\ \end{array}}$


In the next section, we will see the shortest distance between two lines.

Previous

Contents

Next

Copyright©2026 Higher secondary mathematics.blogspot.com