Distance between Point and Line: Formula, Definition, Examples

Home » Math Vocabulary » Distance between Point and Line: Formula, Definition, Examples

What Is the Distance between a Point and a Line?

The distance between point and line is the shortest distance between the point and the straight line. 

Consider a line BF and a point A as shown in the diagram below. We can draw an infinite number of line segments from the line to the point A. So, what is the actual distance between the given line and the point A?

Distance between a point and a line

It is the shortest distance from A to the line. How can we find this shortest distance? The shortest distance from a point and a line is the length of the perpendicular drawn from the point to the line. Thus, the line segment AD defines the distance between the point and a line. 

Distance from a Point to a Line Definition in Geometry

The distance between point and line is the shortest distance between the point and a point on the line. The length of a perpendicular drawn from a point to a point on the line defines the shortest distance between them. 

Distance from Point to Line Formula

The distance between point and line for a line Ax+By+C=0 and a point with the coordinates (x,y) is calculated by the following formula 

d=|Ax+By+C|A²+B²

where,

A, B, and C are real numbers.

A and B cannot be equal to zero.

The formula has an absolute zero or modulus sign in the numerator which indicates that the value of the numerator would always be a positive number or zero.

How to Find the Distance Between Point and Line

Step 1: Compare the given equation of a line with the standard equation Ax+By+C=0 to find the values of A, B, and C.

Step 2: Compare the coordinates of the given point with (x,y) to find the values of x and y.

Step 3: Substitute the values in the formula

d=Ax+By+CA²+B²

Perpendicular Distance from Point to Line

The shortest distance between point and line is calculated by finding the length of the perpendicular drawn from the point to the line. 

Consider the line l: Ax+By+C=0 and point P(x,y).

Note that PQ is the perpendicular from point P to line l. Let l(PQ)=d.

Perpendicular distance between point and line

M and N are the points of intersection of the line on the x-axis and y-axis. 

M is the y-intercept of line l. Putting x=0 in Ax+By+C=0, we get y=CB

Thus, M(0,CB)

N is the x-intercept of line l. Putting y=0 in Ax+By+C=0, we get x=CA.

Thus, N(CA,0).

Here, PQ is the height of the  triangle PMN. We use the formula of area of triangle and the distance formula to derive the formula for perpendicular distance between point and line. 

Derivation of the Distance from Point to Line

We have 

l: Ax+By+C=0 and P(x,y)

M(0,CB)

N(CA,0)

Perpendicular distance between point and line

To find: distance between point P and line l, which is defined by the length d or length(PQ)

As mentioned earlier, PQ is the height of the ΔPMN.

The formula for the area of a triangle is given by

Area of triangle =12×base × height

Area of PMN =12× MN × PQ

PQ=AreaofΔPMN×2AB  ———— (i)

Let’s find these two values on the R.H.S.

According to coordinate geometry, the area of PMN can be given as 

AreaofΔPMN=12|x(yy)+x(yy)+x(yy)|

=12|x(0(CB))+(CA)((CB)y)+0(y0)

=12|xCB+(CA)(CByB)|

=12|xCB+(C²AB+BCyAB)|

=12|xCB+CyA+C²AB)|

=12|C(xB+yA+CAB)| ————- (ii)

Multiple and divide the equation (ii) by AB 

AreaofΔPMN=12|C(ABxAB²+AByA²B+ABCA²B²)|

=12|CAxAB+CByAB+C²AB)|

=12|CAB|(Ax+By+C) ————– (iii)

Next, the distance of the line AB with coordinates M(x,y) and N(x,y) can be given by distance formula as  MN=((xx)²+(yy)²)

In our case, M(x,y)=(0,CB) and N(x,y)=(CA,0)

MN=((CA)0)²+(0(CB))²)

MN=(CA)²+(CB)²)

MN=|CAB|(A²+B²) ————- (iv)

Substituting equations (ii) and (iv) in equation (i) 

$PQ = \frac{1}{2} \times \frac{|\frac{CA}{B}| (Ax₁ + By₁ + C) \times 2}{|\frac{C}{AB}| (\sqrt{A²+ B²})$

PQ=d=|(Ax+By+C)|A²+B²

Hence, we get that the distance between a point (x,y) and a line Ax+By+C=0 is given 

d=|(Ax+By+C)|A²+B²

Facts about the Distance between Point and Line

  • The distance between a point and a line can never be negative. 
  • The formula for distance between point and line has many practical applications in map navigation, construction, and sports.
  • The distance between origin and a line Ax+By+C=0 is d=|C|A²+B².

Conclusion

The distance between point and line is a basic yet essential concept in coordinate geometry. We learned about the formula for finding the distance between a point and a line along with its derivation. Let’s solve a few examples.

Solved Examples on Distance between Point and Line

Example 1: Find the distance between the point (0, 0) and the line 4x3y+25=0

Solution:

We have P(x,y)=(0,0) and the line 4x3y+25=0

x=0 and y=0

A=4,B=3,C=25

Using the formula for distance between point and line,

d=|(Ax+By+C)|A²+B²

d=(4×0)+(3×0)+25|sqrt4²+(3)² 

d=|0+0+25|16+9

d=2516+9

d=2525 

d=255

d=5 units

Example 2: Find the distance between the point (4,6) and line y=13x3.

Solution:

(4,6)=(x,y)

$x1 = 4,\; y1 = 6$

y=13x3

Add 3 on both sides of the equation.

y+3=13x3+3

y+3=13x 

13xy+3=0

Multiply both sides of the equation by 3

x3y+9=0 ———- (i)

Comparing equation (i) with Ax+By+C=0, we get

A=1,B=3,C=9

Using the formula for distance between point and line 

d=|(Ax+By+C)|A²+B²

d=|(1×4)+(3×6)+9|(1)²+(3)² 

d=|418+9|1+9

d=|18+13|10

d=510   

d=510  units

Example 3: Find the distance between point P(6, 9) and line 2x5y+7=0.

Solution:

P(6,9):x1=6,y1=9

Comparing equation (i) with Ax+By+C=0, we get

A=2,B=5,C=7

Using the formula for distance between point and line 

d=|(Ax+By+C)|A²+B²

d=|(2×6)+(5×9)+7|(2)²+(5)²

d=|1245+7|4+25

d=|45+19|29

d=|26|29 

d=2629 

d=2629  units

Practice Problems on Distance Between Point and Line

Distance between Point and Line: Formula, Definition, Examples

Attend this quiz & Test your knowledge.

1

Find the distance between the point (0, 7) and line 3x+2y4=0.

917 units
185 units
1013 units
1813 units
CorrectIncorrect
Correct answer is: 1013 units
A=3,B=2,C=4;(x,y)=(0,7)
d=|(Ax+By+C)|A²+B²=|(3(0)+2(7)4)|3²+2²=1013
2

What is the formula for finding the distance between a point(x,y) and a line Ax+By+C=0?

d=|(Ax+By+C)|A²+B²
d=|(Ax+By)|A²+B²
d=|(Ax+By+C)|A²B²
d=|(Ax+By)|A²+B²
CorrectIncorrect
Correct answer is: d=|(Ax+By+C)|A²+B²
The formula for finding the distance between a point (x,y) and a line Ax+By+C=0 is
d=|(Ax+By+C)|A²+B²
3

The distance of the point (0, 1) from x-axis is

2 units
1 unit
2
1.1 unit
CorrectIncorrect
Correct answer is: 1 unit
Equation of x-axis: y=0
Comparing with Ax+By+C=0, we get A=0,B=1,C=0
Point =(0,1)
Thus, d=|0+(1)(1)+0|0+1=1 unit
4

What is the distance of the point (1, 0) from the line x=1?

1 unit
2 unit
0 unit
2 unit
CorrectIncorrect
Correct answer is: 0 unit
The point (1, 0) lies on the line x=1 since it satisfies the equation.
Thus, the distance between (1,0) and the line x=1 is 0.

Frequently Asked Questions on the Distance between Point and Line

It is the length of a perpendicular drawn from the point to the line.

The distance between two points is the length of the line segment that connects them on a plane. The formula is d=((x2x1)2+(y2y1)2) , where (x1,y1) and (x2,y2) are the coordinates of the two points.

The equation for a straight line in the slope point form is given by y=mx+c, where m is the slope and c is the y-intercept.