Distance of a Point From a Line
As per Euclidean geometry, the distance from a point to a line can be considered as the shortest distance from a given point to a point on an infinite straight line. The length of the line segment joining the point to the nearest point on the line is the shortest distance from that point, which is the perpendicular distance of the point to the line. The formula for calculating the distance from a point to a line can be derived and expressed in many forms. Knowing the distance from a point to a line can be useful in various reallife situationsfor example, to find the distance between two objects like two trees.
In this article, we will study how to find the distance of a point from a line using derivation and solved examples.
1.  Definition of the Distance of a Point From a Line 
2.  Derivation of the Distance of a Point From a Line 
3.  Solved Examples 
4.  Practice Questions 
5.  FAQs on Distance of a Point From a Line 
Definition of the Distance of a Point From a Line
The distance between a point and a line is the shortest distance between them. It is the minimum length required to move from the point to a point on the line. This distance of minimum length can be shown as a line segment perpendicular to the line. Consider a Line L, and a point X that does not lie on L, as shown below:
How can we measure the distance of the point from a line when the point is not lying on the line? To answer the question, let us recall the equation of a straight line and the distance formula. Also, consider a triangle ABC, which is rightangled at B:
Note that since ∠B = 90°, it is the largest angle in the triangle, which means that AC (the hypotenuse) is the largest side. This will always be true. The hypotenuse AC will always be larger than the perpendicular from A to BC, which is AB. Returning to our point and line, let us drop a perpendicular from X onto L:
Y is the foot of this perpendicular, while Z is any other different point on L. Note that XY will always be smaller than XZ, no matter where Z is on the line. In other words: the shortest distance of a point from a line is along the perpendicular dropped from the point onto that line. Thus, the definition of the distance of a point X from a line L is: the length of the perpendicular dropped from X onto L.
Derivation of the Distance of a Point From a Line
Let’s derive the formula to measure the distance of the point from a line using the distance formula and the area of the triangle formula.
Consider a line L in XY−plane and K(\(x_{1}\),\(y_{1}\)) is any point at a distance d from the line L. This line is represented by Ax + By + C = 0. The distance of a point from a line, ‘d’ is the length of the perpendicular drawn from K to L. The x and yintercepts can be given as referred as (C/A) and (C/B) respectively.
The line L meets the x and the yaxes at points B and A respectively. KJ is the perpendicular distance of point K that meets the base AB of the Δ KAB at point J. For the three given points K, B, and A, the coordinates can be given as K(\(x_{1}\),\(y_{1}\)), B(\(x_{2}\),\(y_{2}\)), and A(\(x_{3}\),\(y_{3}\))
Here, (\(x_{2}\),\(y_{2}\)) = ((C/A), 0) and (\(x_{3}\),\(y_{3}\)) = (0, (C/B)).
We are required to find the perpendicular distance KJ = d
The area of the triangle is given by the formula: Area (Δ KAB) = ½ base × perpendicular height
Area (Δ KAB) = ½ AB × KJ
⇒ KJ = 2 × area (Δ KAB) / AB > (1)
In coordinate geometry, the area (Δ KAB) is calculated as:
Area A = ½ \(x_{1}\)(\(y_{2}\) − \(y_{3}\)) + \(x_{2}\)(\(y_{3}\) − \(y_{1}\)) + \(x_{3}\)(\(y_{1}\) − \(y_{2}\))
= ½  \(x_{1}\) (0  (C/B)) + (−C/A) ((−C/B) − \(y_{1}\)) +0 (\(y_{1}\) − 0)
= ½ (C/B) × \(x_{1}\)  C/A ((−C/B) \(y_{1}\)) + 0
= ½ (C/B) × \(x_{1}\)  C/A ((−CB\(y_{1}\))/B)
= ½ (C/B) × \(x_{1}\) + C^{2}/AB + ((BC\(y_{1}\))/AB)
= ½ (C/B) × \(x_{1}\) + (C/A) × \(y_{1}\) + (C^{2}/AB)
= ½ C( \(x_{1}\)/B + \(y_{1}\)/A + C/AB)
Multiply and divide the expression by AB, we get
= ½ C(AB\(x_{1}\)/AB^{2} + (AB\(y_{1}\))/BA^{2} + (ABC^{2})/(AB)^{2}
= ½ CA\(x_{1}\)/AB + CB\(y_{1}\)/AB + C^{2}/AB
=½ C/ (AB).A\(x_{1}\) + B\(y_{1}\) + C >(2)
As per the distance formula, the distance of the line AB with the coordinates A(\(x_{1}\),\(y_{1}\)), B(\(x_{2}\),\(y_{2}\)) can be calculated as:
AB = ((\(x_{2}\)_{ } \(x_{1}\))^{2 }+ (\(y_{2}\)_{ } \(y_{1}\))^{2})^{½}
Here, A(\(x_{1}\),\(y_{1}\)) = A(0, C/B) and B(\(x_{2}\),\(y_{2}\)) = B(C/A,0)
AB = (((C/A)^{2}  0) + (0  (C/B)^{2}))^{½}
= ((C/A)^{2} + (C/B)^{2})^{½}
Distance, AB = C/AB (A^{2} + B^{2})^{½} > (3)
Substituting (2) & (3) in (1), we have
The distance of the perpendicular KJ = d = A\(x_{1}\) + B\(y_{1}\) + C / (A^{2} + B^{2})^{½}
Hence, the distance from a point (\(x_{1}\),\(y_{1}\)) to the line Ax + By + C = 0 is given by = A\(x_{1}\) + B\(y_{1}\) + C / √(A^{2} + B^{2)}
The numerator in this formula needs to be enclosed with the absolute value sign, as the distance must be a positive value, and certain combinations of A\(x_{1}\), B\(y_{1}\), C can produce a negative number.
Related Articles on Distance of a Point from a Line
Check out the following pages related to the distance of a point from a line.
Important Notes
Here is a list of a few points that should be remembered while studying the distance of a point from a line:
 For deriving the formula to measure the distance of the point from a line, we use the distance formula and the area of the triangle formula.
 As per Euclidean geometry, the distance from a point to a line can be considered as the shortest distance from a given point to any point on an infinite straight line.
 The length of the line segment joining the point to the nearest point on the line is the shortest distance from that point, which is the perpendicular distance of the point to the line.
Solved Examples

Example 1. Find the perpendicular distance from the point P (5, 6) to the line AB ,2x + 3y + 4 = 0, using the distance of the point from a line formula.
Solution:
As per the distance of the point from the line formula, d = A\(x_{1}\) + B\(y_{1}\) + C / √(A^{2} + B^{2)}
Here, the coordinates of the point P is P(\(x_{1}\),\(y_{1}\))= (5, 6), and A = 2, B =3 and C = 4
d = ((2)(5) + (3)(6) + 4)/ √((2)^{2}+(3)^{2})
= 10 + 18 + 4/ √(4 + 9)
= 12/√(13)
= 3.328
So, the perpendicular distance from the point P (5, 6) to the line AB −2x + 3y + 4 = 0 is 3.328 units

Example 2. Find the distance from the point K(−3,7) to the line PQ y=(6/5) x + 2 using the distance of the point from a line formula
Solution:
Let us express the given line in the standard form first,
The line PQ can be simplified as:
y=(6/5) x + 2
5y = 6x +10
Thus, 6x  5y + 10 = 0
As per the distance of the point from the line formula, d = A\(x_{1}\) + B\(y_{1}\) + C / √(A^{2} + B^{2)}
Here, the coordinates of the point K is K(\(x_{1}\),\(y_{1}\)) = (3, 7), and A = 6, B =5 and C = 10
d = (6)(3) + (5)(7) + 10/ √((6)^{2}+(5)^{2})
= 18 35 + 10/ √(36 + 25)
= 43/√(61)
= 5.506
So, the perpendicular distance from the point K (3, 7) to the line PQ 6x  5y + 10 = 0 = 0 is 5.506 units
FAQs on Distance of a Point From a Line
How Do You Find the Distance From a Point to a Line?
The distance from a point (\(x_{1}\),\(y_{1}\)) to the line Ax + By + C = 0 can be calculated by using the formula A\(x_{1}\) + B\(y_{1}\) + C / √(A^{2} + B^{2)}
What Is the Distance From a Point to a Line?
As per Euclidean geometry, the distance from a point to a line can be considered as the shortest distance from a given point to any point on an infinite straight line. The length of the line segment joining the point to the nearest point on the line is the shortest distance from that point, which is the perpendicular distance of the point to the line.
How to Find the Perpendicular Distance of a Point From a Line in Cartesian Form?
Consider the equation of line DF as (x\(x_{1}\))/a = (y\(y_{1}\))/b = (z\(z_{1}\))/c. Let L be the foot of the perpendicular from K (α, β, γ) on the line DF. Let the coordinates of L be (\(x_{1}\) + aλ, \(y_{1}\) + bλ, \(z_{1}\) + cλ). Then the direction ratios of KL are (\(x_{1}\) + aλ – α, \(y_{1}\) + bλ – β, \(z_{1}\) + cλ – γ). Direction ratios of DF are (a, b, c). Since KL is perpendicular to DF, a (\(x_{1}\)+ aλ – α) + b (\(y_{1}\) + bλ – β) + c (\(z_{1}\) + cλ – γ) = 0. Putting the value of λ in (\(x_{1}\) + aλ, \(y_{1}\) + bλ, \(z_{1}\) + cλ) we get the foot of the perpendicular. Now we can get distance KL using the distance formula.
How Do You Find the Distance From a Point to a Line in 3D?
The distance from a point to a line in 3D can be found this way. If \(J_{0}\)(\(x_{0}\),\(y_{0}\),\(z_{0}\)) point coordinates, \begin{equation} \bar{s}=\{m ; n ; p\} \end{equation} directing vector of line l, \(J_{1}\)(\(x_{1}\),\(y_{1}\),\(z_{1}\))  coordinates of point on line l, then distance between point \(J_{0}\)(\(x_{0}\),\(y_{0}\),\(z_{0}\)) and line l can be found using the following formula: \begin{equation} d=\frac{\left\overline{J_{0} J_{1}} \times \bar{s}\right}{\bar{s}} \end{equation}
What's the Shortest Distance From a Point to a Line?
The shortest distance of a point from a line is along the perpendicular dropped from the point onto that line.
visual curriculum