Download Careers360 App
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:34 PM IST

In this article, we will cover the concept of Distance of a point from a line. This category falls under the broader category of Coordinate Geometry, which is a crucial Chapter in class 11 Mathematics. It is not only essential for board exams but also for competitive exams like the Joint Entrance Examination(JEE Main) and other entrance exams such as SRMJEE, BITSAT, WBJEE, BCECE, and more. A total of eleven questions have been asked on JEE MAINS( 2013 to 2023) from this topic including one in 2014, one in 2015, three in 2019, two in 2020, one in 2021, and two in 2022.

This Story also Contains
  1. Distance of a Point From a Line
  2. Formula to Calculate the Distance of a Point From a Line
  3. Derivation of distance of a point to the line
  4. What is the distance between two parallel lines?
  5. Formula to calculate the distance between two parallel lines
  6. 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

Distance of a Point From a Line

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

Formula to Calculate the Distance of a Point From a Line

Perpendicular length from a point $\left(x_1, y_1\right)$ to the line $L: A x+B y+C=0$ is
$
\frac{\left|\mathrm{Ax}_1+\mathrm{By}_1+\mathrm{C}\right|}{\sqrt{\mathrm{A}^2+\mathrm{B}^2}}
$

The steps to derive the formula for finding the shortest distance between a point and line.

Step 1: Consider a line $L: A x+B y+C=0$ whose distance from the point $P$ $\left(\mathrm{x}_1, \mathrm{y}_1\right)$ is d .

Step 2: Draw a perpendicular PM from the point $P$ to the line $L$ as shown in the figure below.

Step 3: Let $Q$ and R be the points where the line meets the $x$-and $y$-axes, respectively.

Step 4: The coordinates of the points can be written as $Q(-C / A, 0)$ and $R(0,-$ C/B).

Derivation of distance of a point to the line

Let $\mathrm{L}: \mathrm{Ax}+\mathrm{By}+\mathrm{C}=0$ be a line, whose distance from the point $\mathrm{P}\left(\mathrm{x}_1, \mathrm{y}_1\right)$ is
d. Draw a perpendicular $P M$ from the point $P$ to the line $L$

The line meets the x -and y -axes at the points Q and R , respectively. Then, the coordinates of the points are $Q\left(-\frac{C}{A}, 0\right)$ and $R\left(0,-\frac{C}{B}\right)$. Thus, the area of the triangle PQR is given by
$
\begin{aligned}
\operatorname{area}(\triangle \mathrm{PQR})=\frac{1}{2} \mathrm{PM} & \cdot \mathrm{QR} \Rightarrow \mathrm{PM}=\frac{2(\text { area } \Delta \mathrm{PQR})}{\mathrm{QR}} \\
\text { also. area }(\triangle \mathrm{PQR}) & =\frac{1}{2}\left|\mathrm{x}_1\left(0+\frac{\mathrm{C}}{\mathrm{B}}\right)+\left(-\frac{\mathrm{C}}{\mathrm{A}}\right)\left(-\frac{\mathrm{C}}{\mathrm{B}}-\mathrm{y}_1\right)+0\left(\mathrm{y}_1-0\right)\right| \\
& =\frac{1}{2}\left|\mathrm{x}_1 \frac{\mathrm{C}}{\mathrm{B}}+\mathrm{y}_1 \frac{\mathrm{C}}{\mathrm{A}}+\frac{\mathrm{C}^2}{\mathrm{AB}}\right|
\end{aligned}
$
also. area $(\triangle \mathrm{PQR})=\frac{1}{2}\left|\mathrm{x}_1\left(0+\frac{\mathrm{C}}{\mathrm{B}}\right)+\left(-\frac{\mathrm{C}}{\mathrm{A}}\right)\left(-\frac{\mathrm{C}}{\mathrm{B}}-\mathrm{y}_1\right)+0\left(\mathrm{y}_1-0\right)\right|$
or $2 \times \operatorname{area}(\triangle P Q R)=\left|\frac{C}{A B}\right|\left|A x_1+B y_1+C_1\right|$
$
\mathrm{QR}=\sqrt{\left(0+\frac{C}{A}\right)^2+\left(\frac{C}{B}-0\right)^2}=\left|\frac{C}{A B}\right| \sqrt{A^2+B^2}
$

Substituting the values
$
\mathrm{PM}=\frac{\left|\mathrm{Ax}_1++\mathrm{By}_1+\mathrm{C}\right|}{\sqrt{\mathrm{A}^2+\mathrm{B}^2}}
$

What is the distance between two parallel lines?

The equation of two parallel lines is $a x+b y+c=0$ and $a x+b y+d=0$, then the distance between them is the perpendicular distance of any point on one line from the other line.

Formula to calculate the distance between two parallel lines

If $\left(\mathrm{x}_1, \mathrm{y}_1\right)$ is any point on the line $a x+b y+c=0$
Then, $a x_1+b y_1+c=0$
Now, the perpendicular distance of the point $\left(x_1, y_1\right)$ from the line $a x+b y+d=0$ is $\frac{\left|\mathrm{ax}_1+\mathbf{b y}_1+\mathrm{d}\right|}{\sqrt{\mathbf{a}^2+\mathrm{b}^2}}=\frac{|\mathbf{d}-\mathrm{c}|}{\sqrt{\mathbf{a}^2+\mathbf{b}^2}}$

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 R be the point $(3,7)$ and let P and Q be two points on the line $x+y=5$ such that PQR is an equilateral triangle. Then the area of $\triangle \mathrm{PQR}$ is:
[JEE MAINS 2022]

Solution

$
\begin{aligned}
& \sin 60^{\circ}=\frac{5 / \sqrt{2}}{\mathrm{a}} \\
& \mathrm{a}=\frac{5 \sqrt{2}}{3}
\end{aligned}
$

Area of $\triangle \mathrm{PQR}=\frac{\sqrt{3}}{4} \mathrm{a}^2=\frac{25}{2 \sqrt{3}}$
Hence the correct answer is $\frac{25}{2 \sqrt{3}}$

Example 2: Let a circle C of radius 5 lie below the x -axis. The line $\mathrm{L}_1: 4 \mathrm{x}+3 \mathrm{y}+2=0$ passes through the center P of the circle C and intersects the line $\mathrm{L}_2: 3 \mathrm{x}-4 \mathrm{y}-11=0$ at $Q$. The line $\mathrm{L}_2$ touches C at the point $Q$. Then the distance $P$ from the line $5 x-12 y+51=0$ is $\qquad$ [JEE MAINS 2022]

Solution: The point of intersection of $\mathrm{L}_1: 4 \mathrm{x}+3 \mathrm{y}+2=0$ and $\mathrm{L}_2: 3 \mathrm{x}-4 \mathrm{y}-11=0$ is
$
\mathrm{Q}(1,-2)
$

The Centre P of the circle lies on $\mathrm{L}_1$
Slope of $\mathrm{L}_1: \tan \theta=-\frac{4}{3} \Rightarrow \cos \theta: \frac{-3}{5}, \sin \theta=\frac{4}{5}$
Coordinates of $\mathrm{P}:(1-5 \cos \theta,-2-5 \sin \theta)$
$
=(4,-6)
$
distance of $\mathrm{P}(4,-6)$ from $5 \mathrm{x}-12 \mathrm{y}+51$ is
$
\mathrm{d}=\left|\frac{5 \times 4-12 \times(-6)+51}{\sqrt{5^2+122}}\right|=\frac{20+72+51}{13}=\frac{143}{13}=11
$

Hence, the answer is 11

Example 3: If p and q are the lengths of the perpendiculars from the origin on the lines, $x \operatorname{cosec} \alpha-y \sec \alpha=k \cot 2 \alpha$ and $x \sin \alpha+y \cos \alpha=k \sin 2 \alpha$ respectively, then $k^2$ is equal to :
[JEE MAINS 2021]

Solution:

$
\begin{aligned}
& p=\frac{|k \cot 2 \alpha|}{\sqrt{\operatorname{cosec}^2 \alpha+\sec ^2 \alpha}} \\
& \Rightarrow p^2=\frac{k^2 \frac{\cos ^2 2 \alpha}{\sin ^2 2 \alpha}}{\frac{\sin ^2 \alpha+\cos ^2 \alpha}{\left(\sin ^2 \alpha \cos ^2 \alpha\right)^2}}=\frac{k^2 \cos ^2 2 \alpha}{4 \sin ^2 \alpha \cos ^2 \alpha} \times \sin ^2 \alpha \cos ^2 \alpha \\
& \Rightarrow p^2=\frac{k^2}{4} \cos ^2 2 \alpha \\
& \Rightarrow \cos ^2 2 \alpha=\frac{4 p^2}{k^2}---(1) \\
& q=\left|\frac{k \sin 2 \alpha}{\sin ^2 \alpha+\cos ^2 \alpha}\right| \\
& \Rightarrow q=k^2 \sin ^2 2 \alpha \Rightarrow \sin ^2 2 \alpha=\frac{q^2}{k^2}---(2) \\
& (1)+(2) \Rightarrow \frac{4 p^2}{k^2}+\frac{q^2}{k^2}=1 \Rightarrow k^2=4 p^2+q^2
\end{aligned}
$

Hence, the answer is $4 p^2+q^2$

Example 4: The length of the perpendicular from the origin, on the normal to the curve, $x^2+2 x y-3 y^2=0$ at the point $(2,2)$ is :
[JEE MAINS 2020]

Solution: Perpendicular length from a point $(x 1, y 1)$ to the line $L$ : $A x+B y+C=0$ is
$
\begin{aligned}
& \frac{\left|\mathbf{A} \mathbf{x}_1++\mathbf{B} \mathbf{y}_1+\mathbf{C}\right|}{\sqrt{\mathbf{A}^2+\mathbf{B}^2}} \\
& x^2+2 x y-3 y^2=0 \\
& x^2+3 x y-x y-3 y^2=0 \\
& (x-y)(x+3 y)=0 \\
& x-y=0 \quad x+3 y=0
\end{aligned}
$
$(2,2)$ satisfy $x-y=0$
Normal
$
x+y=\lambda=4
$

Hence the perpendicular distance from the origin
$
=\left|\frac{0+0-4}{\sqrt{2}}\right|=2 \sqrt{2}
$

Example 5: If a variable line, $3 x+4 y-\lambda=0$ is such that the two circles $x^2+y^2-2 x-2 y+1=0$ and $x^2+y^2-18 x-2 y+78=0$ are on opposite sides, then the set of all values of $\lambda$ is the interval

Solution: Given $3 x+4 y-\lambda=0$
$(7-\lambda)(31-\lambda)<0 \quad$ (Since centers are on opposite sides)
$=>\lambda \epsilon(7,31)$ $\qquad$
$\left|\frac{7-\lambda}{5}\right| \geq 1$ and $\left|\frac{7-\lambda}{5}\right| \geq 2$
$
\begin{aligned}
& |7-\lambda| \geq 5 \text { and }|31-\lambda| \geq 10 \\
& =>\lambda \leq 2 \text { or } \lambda \geq 12
\end{aligned}
$
and
$
=>\lambda \leq 21 \text { or } \lambda \geq 41
$
$\qquad$
(1) $\cap(2) \cap(3)$
$
\lambda \in[12,21]
$

Hence, the answer is $[12,21]$.

Frequently Asked Questions (FAQs)

1. What is the shortest distance between a point and 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. How do you calculate the distance between a point and a line?

The distance between a point and a line is calculated by 

 Perpendicular length from a point $\left(x_1, y_1\right)$ to the line $L$ : $A x+B y+C=0$ is
$
\frac{\left|\mathrm{Ax}_1++\mathrm{By}_1+\mathrm{C}\right|}{\sqrt{\mathrm{A}^2+\mathrm{B}^2}}
 $

3. What are parallel lines?

The equation of two parallel lines is $a x+b y+c=0$ and $a x+b y+d=0$, then the distance between them is the perpendicular distance of any point on one line from the other line.

4. How we should measure the length between a point and a line so that the shortest distance is measured?

The shortest distance between a point and a line is perpendicular distance.

5. How do you calculate the distance between two parallel lines?

If $\left(\mathrm{x}_1, \mathrm{y}_1\right)$ is any point on the line $\mathrm{ax}+\mathrm{by}+\mathrm{c}=0$. Then, $a \mathrm{x}_1+\mathrm{by}_1+\mathrm{c}=0$

Now, the perpendicular distance of the point $\left(x_1, y_1\right)$ from the line $a x+$ by $+d=0$ is
$
\frac{\left|\mathbf{a x}_1+\mathbf{b y}_1+\mathbf{d}\right|}{\sqrt{\mathbf{a}^2+\mathbf{b}^2}}=\frac{|\mathbf{d}-\mathbf{c}|}{\sqrt{\mathbf{a}^2+\mathbf{b}^2}}
 $

6. How is the distance formula for a point from a line derived?
The distance formula is derived using the concept of perpendicular distance and the general equation of a line. It involves finding the perpendicular from the point to the line and calculating its length using coordinate geometry.
7. Why is the absolute value used in the distance formula?
The absolute value is used to ensure the distance is always positive, regardless of whether the point is above or below the line. It accounts for the fact that distance is a magnitude, not a directed quantity.
8. What happens to the distance when a point lies on the line itself?
When a point lies on the line itself, the distance between the point and the line is zero. This is because there is no separation between the point and the line.
9. Can the distance of a point from a line ever be negative?
No, the distance of a point from a line can never be negative. Distance is always a positive quantity or zero, representing the shortest length between the point and the line.
10. How does changing the slope of a line affect the distance of a point from it?
Changing the slope of a line can increase or decrease the distance of a point from it, depending on the point's position. The distance formula accounts for this through the coefficients of x and y in the line equation.
11. What is the distance of a point from a line?
The distance of a point from a line is the shortest length between the point and any point on the line. It's measured along a perpendicular line from the given point to the line.
12. How can you use the distance formula to determine if three points are collinear?
To check if three points are collinear, calculate the distance of the third point from the line formed by the first two. If this distance is zero, all three points lie on the same line and are therefore collinear.
13. How is the distance formula related to the concept of residuals in linear regression?
In linear regression, residuals represent the vertical distances between data points and the regression line. While not identical to the perpendicular distance, residuals are closely related to the concept of point-to-line distance.
14. Why doesn't the distance formula depend on the specific form of the line equation used?
The distance formula works with any form of the line equation (standard, slope-intercept, etc.) because it uses the general form Ax + By + C = 0. This makes it versatile and applicable to all linear equations.
15. What's the connection between the distance formula and the Hesse normal form of a line?
The Hesse normal form of a line equation directly gives the perpendicular distance of the origin from the line. The distance formula is a generalization of this concept for any point, not just the origin.
16. Is the distance of a point from a line always unique?
Yes, the distance of a point from a line is always unique. There is only one shortest path from a point to a line, which is along the perpendicular to the line passing through the point.
17. How does the concept of perpendicular distance relate to the distance formula?
The distance formula calculates the perpendicular distance from a point to a line. It's based on the principle that the shortest distance between a point and a line is always along the perpendicular from the point to the line.
18. What's the relationship between the distance formula and the general equation of a line?
The distance formula directly incorporates the coefficients A, B, and C from the general equation of a line (Ax + By + C = 0). This shows how the line's equation influences the distance calculation.
19. How does the distance formula change for vertical and horizontal lines?
For vertical lines (x = a), the distance formula simplifies to |x - a|. For horizontal lines (y = b), it becomes |y - b|. These simplified forms reflect the straightforward nature of measuring distance from these special cases.
20. What's the geometric interpretation of the numerator in the distance formula?
The numerator of the distance formula (|Ax₁ + By₁ + C|) represents the result of substituting the point's coordinates into the left side of the line equation. Geometrically, it relates to how far the point is from satisfying the line equation.
21. Can you use the distance formula to find how far apart two parallel lines are?
Yes, you can use the distance formula to find the distance between two parallel lines. Choose any point on one line and calculate its distance from the other line using the formula. This distance will be constant for all points.
22. How does the distance of a point from a line change as you move the point parallel to the line?
Moving a point parallel to a line doesn't change its distance from the line. The perpendicular distance remains constant, which is a key property of parallel lines.
23. What happens to the distance when you translate a line parallel to itself?
Translating a line parallel to itself changes its y-intercept (or x-intercept for vertical lines) but doesn't affect its slope. This changes the constant term C in the general equation, directly impacting the calculated distance.
24. Can the distance formula be used to find the distance between two skew lines in 3D space?
No, the standard distance formula for a point from a line doesn't directly apply to finding the distance between skew lines in 3D. A different approach involving cross products and dot products is needed for skew lines.
25. How does the distance formula change in three-dimensional space?
In 3D space, the distance formula extends to include the z-coordinate and becomes more complex. It involves the plane equation instead of a line equation and uses the normal vector to the plane.
26. How is the distance formula used in the context of linear programming and optimization?
In linear programming, the distance formula can be used to find the distance between a point and the constraint lines or planes. This is crucial in determining feasible regions and optimizing objective functions.
27. What role does the distance formula play in defining the concept of a line's "thickness" in computer graphics?
In computer graphics, a line's thickness can be visualized as a region around the line where points are within a certain distance from it. The distance formula helps define this region by determining which pixels should be colored.
28. Can the distance formula be used to determine if two lines are perpendicular?
While the distance formula itself isn't directly used to determine perpendicularity, the concepts it's based on are related. Two lines are perpendicular if the dot product of their normal vectors (derived from their A and B coefficients) is zero.
29. What's the relationship between the distance formula and the concept of a line's normal equation?
The normal equation of a line is closely related to the distance formula. It expresses the line in terms of its perpendicular distance from the origin and the angle this perpendicular makes with the positive x-axis.
30. What's the connection between the distance formula and the concept of a normal vector to a line?
The coefficients A and B in the general line equation (Ax + By + C = 0) form a normal vector to the line. The distance formula uses this normal vector in its denominator, showing the close relationship between distance and line orientation.
31. How does the distance formula change if we use a different coordinate system, like polar coordinates?
In polar coordinates, the distance formula would need to be reformulated. It would involve the radial distance and angle of both the point and the line, requiring trigonometric functions in its expression.
32. How does the distance formula change for lines in higher-dimensional spaces?
In higher dimensions, the distance formula generalizes to involve more terms in both the numerator and denominator, corresponding to the additional coordinates. The basic structure remains similar, using the generalized equation of a hyperplane.
33. How does the distance formula relate to the concept of a line's intercept form?
The intercept form of a line equation can be converted to general form, which is used in the distance formula. The x and y intercepts in this form contribute to determining the A, B, and C coefficients in the distance calculation.
34. Can the distance formula be used to find the distance between a point and a plane in 3D space?
Yes, the distance formula for a point from a plane in 3D is a direct extension of the 2D formula. It uses the general equation of a plane (Ax + By + Cz + D = 0) in a similar structure to the 2D formula.
35. How does the denominator of the distance formula relate to the line's slope?
The denominator of the distance formula (√(A² + B²)) is related to the line's direction vector (A, B). It normalizes the distance calculation, ensuring it works correctly regardless of the line's slope.
36. How can you use the distance formula to find the area of a triangle?
To find the area of a triangle, you can use the distance formula to calculate the height of the triangle (the perpendicular distance from a vertex to the opposite side) and then apply the formula: Area = ½ * base * height.
37. What's the relationship between the distance formula and the concept of a signed distance?
The standard distance formula gives the absolute (unsigned) distance. A signed distance would indicate which side of the line the point is on. This can be achieved by removing the absolute value signs from the numerator of the formula.
38. How does the distance formula relate to the concept of level sets in multivariable calculus?
The set of points at a constant distance from a line forms a level set. In 2D, these are parallel lines on either side of the original line. The distance formula essentially defines these level sets.
39. Can the distance formula be used to find the distance between a point and a curve?
The standard distance formula is specific to lines. For curves, more advanced techniques like optimization or numerical methods are typically needed to find the shortest distance from a point to the curve.
40. How can you use the distance formula to find the point on a line closest to a given point?
To find the closest point, you can use the distance formula to set up an equation for the perpendicular line passing through the given point. The intersection of this perpendicular line with the original line gives the closest point.
41. How does the distance formula relate to the concept of orthogonal projection?
The distance formula essentially calculates the length of the orthogonal projection of the vector from any point on the line to the given point, onto the normal vector of the line.
42. What's the connection between the distance formula and the concept of a line's direction cosines?
Direction cosines are the cosines of the angles that a line makes with the coordinate axes. They're related to the A and B coefficients in the line equation, which appear in the denominator of the distance formula.
43. How can the distance formula be used to define regions in the plane?
The distance formula can define regions like "all points within distance d of a line" or "all points farther than distance d from a line". These regions are bounded by lines parallel to the original line.
44. What role does the distance formula play in computational geometry algorithms?
In computational geometry, the distance formula is fundamental to many algorithms, including those for finding closest pairs of points, constructing Voronoi diagrams, and solving proximity problems.
45. How is the distance formula related to the concept of a line's parametric equation?
While the distance formula uses the general form of a line equation, it can be adapted for parametric equations. The process involves finding the parameter value that minimizes the distance to the given point.
46. Can the distance formula be used to find the angle between a line and a vector?
The distance formula itself doesn't directly give the angle, but the concepts it's based on are related. The angle can be found using the dot product of the line's normal vector and the given vector.
47. How does the distance formula relate to the concept of a line's implicit equation?
The distance formula is directly derived from the implicit equation of a line (Ax + By + C = 0). It uses the left-hand side of this equation in its numerator, showing how a point's coordinates satisfy or deviate from the line equation.
48. What's the relationship between the distance formula and the concept of a line's slope-intercept form?
The distance formula can be derived from the slope-intercept form (y = mx + b) by converting it to general form. The slope m and y-intercept b are incorporated into the A, B, and C coefficients used in the distance formula.
49. How can the distance formula be used in error analysis for linear regression models?
In linear regression, the distance formula can be used to calculate the perpendicular distances of data points from the regression line. These distances provide a measure of model fit that's different from the usual vertical residuals.
50. What role does the distance formula play in defining the concept of a line's "width" in vector graphics?
In vector graphics, a line's width can be conceptualized as a region extending perpendicular to the line on both sides. The distance formula helps define the boundaries of this region based on the specified line width.
51. How is the distance formula used in collision detection algorithms in computer simulations?
In collision detection, the distance formula can be used to determine if a point (representing an object) is within a certain distance of a line (representing a boundary or obstacle). This is crucial for detecting potential collisions.
52. What's the connection between the distance formula and the concept of a line's point-slope form?
The point-slope form of a line can be converted to general form, from which the distance formula is derived. The point and slope in this form determine the A, B, and C coefficients used in the distance calculation.
53. How is the distance formula used in computer vision algorithms for line detection?
In computer vision, the distance formula is often used in algorithms like the Hough transform for line detection. It helps in determining how well potential lines fit the edge points detected in an image.
54. What's the relationship between the distance formula and the concept of a line's normal vector?
The normal vector to a line is directly related to the A and B coefficients in the general line equation used in the distance formula. The denominator √(A² + B²) represents the magnitude of this normal vector.
55. How can the distance formula be used to determine if a point lies inside or outside a polygon?
While not directly used for this purpose, the distance formula can be part of algorithms that determine if a point is inside or outside a polygon. It can be used to calculate distances from the point to the polygon's edges, which is useful in some point-in-polygon algorithms.

Articles

Back to top