Distance of a Point From a Line - Definition and Examples

Distance of a Point From a Line - Definition and Examples

Edited By Komal Miglani | Updated on Jul 02, 2025 07:49 PM IST

The distance of a point from a line is the shortest distance between a point and a line. We can draw an infinite number of lines from a point but we have to draw the shortest line. The perpendicular distance between a point and al line is the shortest distance between them. In real life, we use the distance of a point from a line to find the shortest distance to reach a road or a place.

This Story also Contains
  1. What is the Distance of a Point From a Line?
  2. Perpendicular Distance of a Point From a Line
  3. Derivation of Distance of a Point From a Line
  4. Steps To Calculate Distance between the Point And the Line
  5. Solved Examples Based on the Distance of a Point From a Line
Distance of a Point From a Line - Definition and Examples
Distance of a Point From a Line - Definition and Examples

In this article, we will cover the concept of the Distance of a Point From a Line. This topic falls under the broader category of Three Dimensional Geometry, which is a crucial chapter in Class 12 Mathematics. This is very important not only for board exams but also for competitive exams, which even include the Joint Entrance Examination Main and other entrance exams: SRM Joint Engineering Entrance, BITSAT, WBJEE, and BCECE. A total of seven questions have been asked on this topic in JEE Main from 2013 to 2023 including one in 2019, three in 2022, and three in 2023.

What is the Distance of a Point From a Line?

The distance of a point from a line is the shortest between a point and a line. It measures the minimum distance or length required to move a point on the line.

Perpendicular Distance of a Point From a Line

The shortest distance of a point from a line is the length of the perpendicular drawn from the point to the line.

Let $L$ be $a$ line in the plane and let $M$ be any point not on the line. Then, we define distance $d$ from M to L as the length of the line segment $\overrightarrow{M P}$, where P is a point on L such that $\overrightarrow{M P}$ is perpendicular to L .


Derivation of Distance of a Point From a Line

The equation of line L is $\frac{x-x_0}{a}=\frac{y-y_0}{b}=\frac{z-z_0}{c}$
Let $P$ be the foot of the perpendicular drawn from the point $M(\alpha, \beta, \gamma)$ on the line $L$.
Let the coordinates of P be $\left(x_0+a \lambda, y_0+b \lambda, z_0+c \lambda\right)$
Then the direction ratio of MP are $\left(x_0+a \lambda-\alpha, y_0+b \lambda-\beta, z_0+c \lambda-\gamma\right)$.
The direction ratio of line $L$ is $(a, b, c)$

Since MP is perpendicular to line L ,

$
\begin{aligned}
& a\left(x_0+a \lambda-\alpha\right)+b\left(y_0+b \lambda-\beta\right)+c\left(z_0+c \lambda-\gamma\right)=0 \\
& \lambda=\frac{a\left(\alpha-x_0\right)+b\left(\beta-y_0\right)+c\left(\gamma-z_0\right)}{a^2+b^2+c^2}
\end{aligned}
$
Put the value of $\lambda$ in $\left(x_0+a \lambda, y_0+b \lambda, z_0+c \lambda\right)$.

we get the foot of the perpendicular. Now, we can get distance MP using the distance formula.

Steps To Calculate Distance between the Point And the Line

Consider the equation of line L is $\frac{x-x_0}{a}=\frac{y-y_0}{b}=\frac{z-z_0}{c}$

Step 1: Consider a point $\mathrm{P}\left(x_0+a \lambda, y_0+b \lambda, z_0+c \lambda\right)$ on line L such that P is the foot of the perpendicular drawn from the point $M(\alpha, \beta, \gamma)$ on line $L$.

Step 2: Find the direction ratio of the $MP$
Step 3: Since MP is perpendicular to line $L$, Find the value of $\lambda$
Step 4: Find the coordinates Of $P$
Step 5: Using the distance formula calculate the distance between a point and the line

Recommended Video Based on the Distance of a Point from a Line



Solved Examples Based on the Distance of a Point From a Line

Example 1: Let a line $L$ pass through the point $P(2,3,1)$ and be parallel to the line $x+3 y-2 z-2=0=x-y+2 z$. If the distance of $L$ from the point $(5,3,8)$ is $\alpha$, then $3 \alpha^2$ is equal to $\qquad$
[JEE MAINS 2023]

Solution:
The Direction ratio of the line

$
\begin{aligned}
\left|\begin{array}{ccc}
\mathrm{i} & \mathrm{j} & \mathrm{k} \\
1 & 3 & -2 \\
1 & -1 & 2
\end{array}\right| & =\mathrm{i}(6-2)-\mathrm{j}(2+2)+\mathrm{k}(-1-3) \\
& =4 \mathrm{i}-4 \mathrm{j}-4 \mathrm{k}
\end{aligned}
$

Equation of line $L$

$\begin{aligned} & \frac{\mathrm{x}-2}{1}=\frac{\mathrm{y}-3}{-1}=\frac{\mathrm{z}-1}{-1}=\lambda(\alpha \mathrm{d}) \\ & \text { Let } \mathrm{M}(\lambda+2,-\lambda+3,-\lambda+1) \\ & \text { DR's of MQ is }<\lambda+2-5,-\lambda+3-3,-\lambda+1-8> \\ & <\lambda-3,-\lambda \cdot-\lambda>7> \\ & \because \mathrm{L} \perp \mathrm{MQ} \\ & \Rightarrow(\lambda-3)(1)+(-\lambda)(-1)+(-\lambda-7)(-1)=0 \\ & \Rightarrow \lambda-3+\lambda+\lambda+7=0 \\ & \Rightarrow 3 \lambda=-4 \Rightarrow \lambda=-\frac{4}{3} \\ & \therefore \mathrm{M}\left(-\frac{4}{3}+2, \frac{+4}{3}+3, \frac{4}{3}+1\right)=\left(\frac{2}{3}, \frac{13}{3}, \frac{7}{3}\right) \\ & \mathrm{MQ}=\alpha \\ & \therefore 3 \alpha^2=3 \times\left(\left(5-\frac{2}{3}\right)^2+\left(3-\frac{13}{3}\right)^2+\left(8-\frac{7}{5}\right)^2\right) \\ & =3\left(\frac{169}{9}+\frac{16}{9}+\frac{289}{9}\right)^2 \Rightarrow \frac{474}{9}=158\end{aligned}$

Hence, the answer is 158

Example 2: Let $y(x)=(1+x)\left(1+x^2\right)\left(1+x^4\right)\left(1+x^8\right)\left(1+x^{16}\right)$. Then $y^{\prime}-y^{\prime \prime}$ at $x=-1$ is equal to
[JEE MAINS 2023]

Solution
$
\begin{aligned}
& f(x)=y=\frac{(1-x)(1+x)\left(1+x^2\right)\left(1+x^4\right)\left(1+x^8\right)\left(1+x^{16}\right)}{(1-x)} \\
& f(x)=y=\frac{\left(1-x^{32}\right)}{1-x} \Rightarrow f(-1)=0 \\
& (1-x) y=1-x^{32}
\end{aligned}
$

differentiate both sides

$
(1-x) y^{\prime}+y(-1)=-32 x^{31} \quad x=-1 \Rightarrow y^{\prime}=16
$

differentiate both sides

$
\begin{aligned}
& (1-x) y^{\prime}+y^{\prime}(-1)-y^{\prime}=-(32)(31) x 30 \\
& \text { Put } x=-1 \\
& 2 y^{\prime \prime}-2 y^{\prime}=-(32)(31) \\
& y^{\prime \prime}-y^{\prime}=-(16)(31) \\
& y^{\prime}-y^{\prime \prime}=496
\end{aligned}
$

Hence, the answer is 496

Example 3: Let Q and R be two points on the line $\frac{\mathrm{x}+1}{2}=\frac{\mathrm{y}+2}{3}=\frac{\mathrm{z}-1}{2}$ at a distance $\sqrt{26}$ from the point $P(4,2,7)$. Then the square of the area of the triangle $P Q R$ is
[JEE MAINS 2022]

Solution:
Let $(2 \lambda-1,3 \lambda-2,2 \lambda+1)$ be any point on the line.
$
\begin{aligned}
& \Rightarrow(2 \lambda-5)^2+(3 \lambda-4)^2+(2 \lambda-6)^2=26 \\
& \Rightarrow \lambda=1,3 \\
& \mathrm{Q}(1,1,3) ; \mathrm{R}(5,7,7) ; \mathrm{P}(4,2,7)
\end{aligned}
$
Area of triangle $\mathrm{PQR}=\frac{1}{2}|\mathrm{P} \vec{Q} \times \mathrm{P} \vec{R}|$

$
=\sqrt{153}
$

Hence, the answer is 153

Example 4: If two distinct points $\mathrm{Q}, \mathrm{R}$ lie on the line of intersection of the planes $-x+2 y-z=0$ and $3 x-5 y+2 z=0$ and $P Q=P R=\sqrt{18}$ where the point $P$ is $(1,-2,3)$, then the area of the triangle $PQR$ is equal to
[JEE MAINS 2022]

Solution: Let $\mathrm{z}=\mathrm{k}$

$
\begin{aligned}
& -x+2 y=k---(1) \\
& 3 x-5 y=-2 k---(2) \\
& \frac{(1) \times 3 \Rightarrow-3 \mathrm{x}+6 \mathrm{y}=3 \mathrm{k}---(3)}{(2)+(3) \Rightarrow \mathrm{y}=\mathrm{k} ; \quad \mathrm{x}=\mathrm{k}}
\end{aligned}
$

Also, both lines pass through $(0,0,0)$ So their line of intersection is

$
\frac{\mathrm{x}}{1}=\frac{\mathrm{y}}{1}=\frac{\mathrm{z}}{1}=\mathrm{k}
$

Let the Foot of Perpendicular from P to Line QR is

$
\begin{aligned}
& \mathrm{S}(\mathrm{k}, \mathrm{k}, \mathrm{k}) . \quad \mathrm{P}(1,-2,3) \\
& \overrightarrow{P S}=(\mathrm{k}-1, \mathrm{k}+2, \mathrm{k}-3) . \quad \overrightarrow{P S} \cdot \vec{b}=0 \\
& \Rightarrow \mathrm{k}-1+\mathrm{k}+2+\mathrm{k}-3=0 \Rightarrow \mathrm{k}=2 / 3 \\
& \mathrm{~S}\left(\frac{2}{3}, \frac{2}{3}, \frac{2}{3}\right), \quad|\overrightarrow{P S}|=\sqrt{\frac{1}{9}+\frac{64}{9}+\frac{49}{9}}=\frac{\sqrt{114}}{3} \\
& \mathrm{RS}=\mathrm{QS}=\sqrt{18-\frac{114}{9}}=\sqrt{\frac{48}{9}}=\frac{4}{\sqrt{3}}
\end{aligned}
$

Area of $\triangle \mathrm{PQR}=2 \times \frac{1}{2} \times \mathrm{RS} \times \mathrm{PS}=\frac{\sqrt{114}}{3} \times \frac{4}{\sqrt{3}}=\frac{4}{3} \sqrt{38}$

Hence, the answer is $\frac{4}{3} \sqrt{38}$

Example 5: If the length of the perpendicular from the point $(\beta, 0, \beta),(\beta \neq 0)$ to the line, $\frac{x}{1}=\frac{y-1}{0}=\frac{z+1}{-1}$ is $\sqrt{\frac{3}{2}}$,then $\beta$ is equal to
[JEE MAINS 2019]

Solution:
Let point $P(\beta, 0, \beta)$ given that length of the perpendicular distance from $P$ to the line is $\sqrt{\frac{3}{2}}$.


$\frac{x}{1}=\frac{y-1}{0}=\frac{z+1}{-1}$

$
R=(\lambda, 1,-\lambda-1)
$
Direction ratio of $P R=(\lambda-\beta, 1,-\lambda-\beta-1)$
PR is perpendicular to the line

$
\begin{aligned}
& \Rightarrow>(\lambda-\beta)(1)+(1) 0+(-1)(-\lambda-\beta-1)=0 \\
& =>\lambda-\beta+\lambda+\beta+1=0 \\
& =>\lambda=\frac{1}{2} \\
& P R=\sqrt{(\lambda-\beta)^2+1^2+(-\lambda-1-\beta)^2}=\sqrt{\frac{3}{2}} \\
& \quad=>2 \beta^2+2 \beta=0 \\
& \quad=>\beta=0, \beta=-1
\end{aligned}
$

Hence, the answer is -1

Frequently Asked Questions (FAQs)

1. What is the distance of a point from a line?

The shortest distance of a point from a line is the length of the perpendicular drawn from the point to the line.

2. What is the equation of the line?

The equation of line L is $\frac{x-x_0}{a}=\frac{y-y_0}{b}=\frac{z-z_0}{c}$

3. What are the coordinates of the foot of the perpendicular?

The coordinates of the foot of the perpendicular is given by


\begin{aligned}
& a\left(x_0+a \lambda-\alpha\right)+b\left(y_0+b \lambda-\beta\right)+c\left(z_0+c \lambda-\gamma\right)=0 \\
& \lambda=\frac{a\left(\alpha-x_0\right)+b\left(\beta-y_0\right)+c\left(\gamma-z_0\right)}{a^2+b^2+c^2}
\end{aligned}

Put the value of $\lambda$ in $\left(x_0+a \lambda, y_0+b \lambda, z_0+c \lambda\right)$

4. What is Direction Ratios?

Direction Ratios are any set of three numbers that are proportional to the Direction cosines.

5. What is the vector equation of the line?

The vector equation of a line $\overrightarrow{\mathbf{r}}=\overrightarrow{\mathbf{r}}_0+\lambda \overrightarrow{\mathbf{b}}$  

6. What is the distance of a point from a line in three-dimensional space?
The distance of a point from a line in three-dimensional space is the length of the shortest line segment that connects the point to any point on the line. It's the perpendicular distance between the point and the line.
7. Why do we use vector methods to find the distance of a point from a line in 3D?
Vector methods are used because they efficiently handle three-dimensional calculations. Vectors allow us to represent the line's direction and the relative position of the point, making it easier to compute the perpendicular distance.
8. Can the distance of a point from a line ever be negative?
No, the distance of a point from a line is always non-negative. Distance is a measure of length, which is always positive or zero. Even if a point is on the "negative" side of a line, its distance is still represented by a positive value.
9. What does it mean if the distance of a point from a line is zero?
If the distance of a point from a line is zero, it means the point lies exactly on the line. In other words, the point is a part of the line itself.
10. How is the formula for the distance of a point from a line in 3D different from 2D?
The formula for 3D is more complex as it involves cross products. In 2D, we use a simpler formula involving only the coefficients of the line equation and the point coordinates. The 3D formula accounts for the additional dimension and the line's direction vector.
11. How does the distance of a point from a line relate to the concept of projection?
The distance of a point from a line is closely related to projection. The point where the perpendicular from the given point meets the line is actually the projection of the point onto the line. The distance we calculate is the length of this perpendicular projection.
12. How does the distance of a point from a line change as the point moves parallel to the line?
The distance remains constant as the point moves parallel to the line. This is because the perpendicular distance doesn't change when movement is parallel to the line's direction.
13. Can the distance formula be used to determine if three points are collinear in 3D space?
Yes, the distance formula can be used to check collinearity. If the distance of the third point from the line formed by the other two points is zero, then all three points are collinear.
14. How does the concept of distance from a line in 3D relate to the distance between a point and a plane?
Both concepts involve finding the shortest distance between a point and an infinite geometric object. However, for a line, we use a direction vector, while for a plane, we use a normal vector. The formulas are similar but adapted for their respective dimensions.
15. How can you use the distance formula to find the point on a line closest to a given point?
To find the closest point, calculate the distance first. Then, use the direction vector and the calculated distance to move from the given point perpendicular to the line. This point of intersection is the closest point on the line.
16. How can you use the distance formula to determine if a point lies inside or outside a cylinder defined by a line and a radius?
Calculate the distance of the point from the line. If this distance is less than or equal to the radius, the point is inside or on the surface of the cylinder. If it's greater, the point is outside.
17. How does the distance formula account for lines that are not parallel to any coordinate axis?
The formula uses the direction vector of the line, which captures its orientation in 3D space regardless of its alignment with coordinate axes. This makes the formula applicable to lines in any orientation.
18. What's the relationship between the distance formula and the equation of a sphere?
The distance formula can be used to find points that are equidistant from a line, which forms a cylindrical surface. If we consider all points a fixed distance from a given point, we get a sphere. The distance formula is thus related to the equation of a sphere centered at the closest point on the line.
19. Can the distance formula be used to find the angle between a line and a vector from a point to the line?
Yes, once you have the distance and the vector from a point on the line to the given point, you can use trigonometry to find the angle. The distance forms the opposite side of a right triangle, with the vector as the hypotenuse.
20. How does the concept of distance from a line in 3D extend to finding the distance from a point to a line segment?
For a line segment, you first need to check if the perpendicular from the point falls on the segment. If it does, use the regular distance formula. If not, calculate the distance to both endpoints and take the minimum.
21. Can the distance formula be used to find the distance between two skew lines in 3D?
No, the distance formula for a point from a line cannot directly find the distance between two skew lines. However, it can be adapted to do so by considering points on both lines and minimizing the distance between them.
22. How does the concept of distance from a line extend to planes in 3D?
The concept is similar, but for planes, we calculate the perpendicular distance from the point to the plane. The formula is different and typically involves the normal vector of the plane instead of a direction vector.
23. How can you verify if your calculated distance is correct?
You can verify the calculated distance by:
24. What happens to the distance calculation if the direction vector is a zero vector?
If the direction vector is a zero vector, the distance calculation becomes undefined. A zero vector doesn't represent a valid line direction, as it doesn't point anywhere.
25. Can the distance formula be used to determine if four points in 3D space are coplanar?
Yes, you can use the distance formula to check if four points are coplanar. If the distance of the fourth point from the plane defined by the other three is zero, all four points are coplanar.
26. How does the distance formula in 3D geometry contribute to our understanding of higher-dimensional spaces?
The 3D distance formula serves as a stepping stone to understanding distance in higher dimensions. The principles of using direction vectors and cross products extend to higher dimensions, helping us conceptualize and work with multi-dimensional spaces.
27. How does the direction vector of a line affect the distance calculation?
The direction vector is crucial in the distance calculation as it defines the orientation of the line in 3D space. It's used in the cross product part of the formula to determine the perpendicular vector from the point to the line.
28. What is the geometric interpretation of the cross product in the distance formula?
The cross product in the distance formula gives a vector perpendicular to both the line's direction vector and the vector from a point on the line to the given point. The magnitude of this cross product, when divided by the magnitude of the direction vector, gives the perpendicular distance.
29. How does changing the magnitude of the direction vector affect the distance calculation?
Changing the magnitude of the direction vector doesn't affect the final distance calculation. The formula is designed to cancel out the effect of the direction vector's magnitude, ensuring that only its direction matters.
30. Why do we need a point on the line for the distance formula, and can we use any point on the line?
We need a point on the line to establish a reference point for our calculations. Any point on the line can be used because the formula calculates the perpendicular distance, which remains constant regardless of which point on the line we choose.
31. What's the difference between the vector approach and the scalar approach to finding the distance?
The vector approach uses cross products and vector operations, making it more suitable for 3D problems. The scalar approach, often used in 2D, relies on the coefficients of the line equation. The vector approach is generally more versatile in 3D space.
32. What role does the magnitude of vectors play in the distance calculation?
The magnitude of vectors is crucial in normalizing the direction vector and in calculating the final scalar distance. However, the formula is designed so that the magnitudes cancel out, ensuring the result is independent of the scale of the vectors used.
33. What's the geometric meaning of the vector from a point on the line to the given point in the distance formula?
This vector represents the displacement between the point on the line and the given point. It's used in the cross product with the direction vector to find the perpendicular component, which gives us the distance.
34. How does the distance formula relate to the concept of vector projection?
The distance formula essentially calculates the magnitude of the vector rejection (the perpendicular component) when projecting the point onto the line. The vector projection would give the parallel component, while we're interested in the perpendicular component for distance.
35. What's the significance of the unit vector in the direction of the line when calculating distance?
The unit vector simplifies calculations by normalizing the direction. It ensures that the magnitude of the direction vector doesn't affect the distance calculation, focusing solely on the line's orientation.
36. What's the relationship between the distance formula and the concept of a normal vector to a line?
The cross product in the distance formula essentially gives a vector normal to both the line's direction and the vector to the point. This normal vector, when normalized, provides the direction of the shortest path from the point to the line.
37. How does the distance formula behave when the point approaches the line?
As the point gets closer to the line, the calculated distance decreases, approaching zero. When the point is exactly on the line, the distance becomes zero.
38. Can the distance formula be used to find the distance between two parallel lines in 3D?
Yes, you can use the distance formula to find the distance between parallel lines. Choose any point on one line and calculate its distance from the other line. This distance will be constant for all points and represents the distance between the parallel lines.
39. How does the choice of coordinate system affect the distance calculation?
The choice of coordinate system doesn't affect the actual distance calculation. The formula is invariant under coordinate transformations, meaning you'll get the same result regardless of how you orient your axes, as long as you consistently use the same system.
40. What's the connection between the distance formula and the concept of a moment of a force about a line in physics?
The distance formula is closely related to calculating the moment of a force about a line in physics. The moment is the cross product of the force vector and the position vector, similar to how we use cross products in the distance formula.
41. How can you use the distance formula to determine if a line intersects a sphere?
Calculate the distance from the center of the sphere to the line. If this distance is less than the radius of the sphere, the line intersects the sphere. If it's equal, the line is tangent to the sphere. If it's greater, there's no intersection.
42. What's the relationship between the distance of a point from a line and the volume of a parallelepiped?
The distance formula uses a cross product, which geometrically represents the area of a parallelogram. If you multiply this by the magnitude of the direction vector, you get the volume of a parallelepiped formed by the three vectors involved.
43. How does the concept of distance from a line in 3D relate to finding the shortest path between two skew lines?
The shortest path between two skew lines is a line segment perpendicular to both lines. You can use the distance formula iteratively to find the points on each line where this perpendicular segment connects, thus finding the shortest path.
44. How does the distance formula relate to the concept of a normal plane to a line?
The distance formula essentially finds a point on the normal plane that passes through the given point. The normal plane is perpendicular to the line, and all points on this plane have the same distance from the line.
45. What's the significance of the scalar triple product in relation to the distance formula?
The scalar triple product appears in an alternative form of the distance formula. It represents the volume of a parallelepiped and can be used to calculate the distance, showing the geometric interpretation of the calculation.
46. How can you use the distance formula to find the equation of a cylinder with a given radius around a line?
The distance formula gives the perpendicular distance from any point to the line. Set this distance equal to the radius, and you have the equation of a cylinder with that radius around the line.
47. What's the relationship between the distance formula and the concept of torque in physics?
The distance formula is closely related to calculating torque in physics. Torque is the cross product of the force vector and the position vector, similar to how we use cross products in the distance formula. The perpendicular distance is crucial in both calculations.
48. How does the distance formula behave for points that are very far from the line?
For points very far from the line, the distance will be large. However, computational limitations may affect accuracy for extremely large distances due to potential rounding errors in floating-point calculations.
49. Can the distance formula be used to find the distance between a point and a ray (a line with a starting point but no end point)?
Yes, but with a modification. First, check if the perpendicular from the point to the line falls on the ray. If it does, use the regular formula. If not, the distance is simply the distance between the point and the ray's starting point.
50. How does the concept of distance from a line in 3D relate to the idea of a directional derivative?
While not directly related, both concepts involve directions in 3D space. The distance formula finds the minimum distance perpendicular to the line's direction, while a directional derivative considers how a function changes in a specific direction.
51. What's the connection between the distance formula and the concept of a cross-section of a surface?
The distance formula can be used to find points that are equidistant from a line, which forms a cylindrical surface. This cylindrical surface can be seen as a cross-section of more complex surfaces in 3D space.
52. How can you use the distance formula to determine if a line passes through a given rectangular prism?
Calculate the distances from the line to all eight vertices of the prism. If any of these distances is less than or equal to half the diagonal of the prism's cross-section, the line passes through or touches the prism.
53. What's the relationship between the distance formula and the concept of a skew symmetric matrix?
The cross product in the distance formula can be represented as a multiplication by a skew symmetric matrix. This connection highlights the geometric and algebraic interpretations of the distance calculation.
54. How does the distance formula relate to the concept of a line of closest approach between two skew lines?
The line of closest approach is perpendicular to both skew lines. You can use the distance formula iteratively to find the points on each line where this perpendicular line intersects, thus determining the line of closest approach.
55. Can the distance formula be used to find the distance between a point and a parabola in 3D space?
The distance formula for a line can't be directly used for a parabola. However, the concept of finding the minimum perpendicular distance is similar. For a parabola, you'd need to use calculus to minimize the distance function.

Articles

Back to top