- 1. Where is a point? A recap of coordinate geometry
- 2. How steep is a line? Inclination and slope
- 3. Slope from two points: rise over run
- 4. When are two lines parallel or perpendicular?
- 5. The angle between two lines
- 6. Writing a line as an equation: point-slope form
- 7. Two-point form and y = mx + c
- 8. Intercept form and the general equation Ax + By + C = 0
- 9. How far is a point from a line?
- 10. The distance between two parallel lines
- 11. Where lines meet: intersections, concurrency and areas
- 12. A line as a mirror: images, bounces and equal distances
- Review
9 of 12·NCERT §9.4·6 min
How far is a point from a line?
The big ideaThe distance from a point \( (x_1, y_1) \) to the line \( Ax + By + C = 0 \) is the length of the perpendicular, \( d = \dfrac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}} \).
In simple words
You are standing in a field next to a long, straight road, and you want to reach the road in as few steps as possible. Walk straight at it, making a perfect corner with the road. Any slanted path is longer. The length of that straight-at-it path is what we mean by how far you are from the road, and there is a short rule that works it out from your position and the road's equation.
What "distance from a line" means
There are many paths from a point to a line, and they have different lengths. The distance of a point from a line is the shortest one: the length of the perpendicular drawn from the point to the line. The point where the perpendicular meets the line is called the foot of the perpendicular.
Why is the perpendicular shortest? Picture the point P, the foot M, and any other point N on the line. P, M and N make a right triangle with the right angle at M, so PN is the hypotenuse, and the hypotenuse is always the longest side. So PM is shorter than every PN.
The formula
Distance of a point from a line
- The perpendicular distance of \( P(x_1, y_1) \) from \( Ax + By + C = 0 \) is \[ d = \frac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}} \]
- In words: put the point into the left side of the equation, take the size (drop the sign), and divide by \( \sqrt{A^2 + B^2} \).
- From the origin: \( d = \dfrac{|C|}{\sqrt{A^2 + B^2}} \).
Try it: move the point, try a slanted path to the line, and watch every part of the formula.
The line must be in the form "\( \ldots = 0 \)" first. If it is given as \( y = 2x + 3 \), rewrite it as \( 2x - y + 3 = 0 \) before you substitute.
Where the formula comes from
Here is the idea, for a line that cuts both axes (so \( A \), \( B \) and \( C \) are all non-zero). The line meets the x-axis at \( Q\left(-\frac{C}{A}, 0\right) \) and the y-axis at \( R\left(0, -\frac{C}{B}\right) \). Join P to Q and R to make the triangle PQR. Its base is QR, which lies along the line, and its height is the perpendicular PM. So
\[ \text{area}(\triangle PQR) = \tfrac{1}{2}\,\text{PM} \cdot \text{QR} \quad \Rightarrow \quad \text{PM} = \frac{2 \times \text{area}(\triangle PQR)}{\text{QR}} \]The area formula from the first page, with corners \( P(x_1, y_1) \), Q and R, simplifies to
\[ \text{area}(\triangle PQR) = \frac{1}{2} \left| \frac{C}{AB} \right| \, |Ax_1 + By_1 + C| \]and the distance formula gives \( \text{QR} = \sqrt{\frac{C^2}{A^2} + \frac{C^2}{B^2}} = \left| \frac{C}{AB} \right| \sqrt{A^2 + B^2} \). Divide, and the \( \left| \frac{C}{AB} \right| \) cancels:
\[ \text{PM} = \frac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}} \]The same result holds for every line, including those through the origin or parallel to an axis; for example, the distance of \( (x_1, y_1) \) from the y-axis \( x = 0 \) (so \( A = 1, B = 0, C = 0 \)) comes out as \( |x_1| \), which is obviously right.
Worked examples
Worked example 1
Find the distance of \( (2, 3) \) from \( 3x + 4y - 8 = 0 \).
- \( A = 3, B = 4, C = -8 \), so \( \sqrt{A^2 + B^2} = 5 \).
- \( d = \frac{|3(2) + 4(3) - 8|}{5} = \frac{|10|}{5} = 2 \) units.
Worked example 2
Find the distance of \( (4, 1) \) from \( 5x - 12y + 5 = 0 \).
- \( \sqrt{25 + 144} = 13 \).
- \( d = \frac{|20 - 12 + 5|}{13} = \frac{13}{13} = 1 \) unit.
Worked example 3: rearrange first
How far is \( (1, 1) \) from the line \( y = 2x + 3 \)?
- Rewrite: \( 2x - y + 3 = 0 \), so \( A = 2, B = -1, C = 3 \).
- \( d = \frac{|2 - 1 + 3|}{\sqrt{4 + 1}} = \frac{4}{\sqrt{5}} \approx 1.79 \) units.
Worked example 4: a house and a highway
On a village map (1 unit = 100 m), a straight highway runs along \( 3x + 4y = 24 \) and a house stands at \( (1, 2) \). How long is the shortest path from the house to the highway?
- Write the line as \( 3x + 4y - 24 = 0 \).
- \( d = \frac{|3 + 8 - 24|}{5} = \frac{13}{5} = 2.6 \) units, that is 260 m.
Not in the current textbook, but JEE asks it: the foot of the perpendicular \( (h, k) \) from \( (x_1, y_1) \) to \( Ax + By + C = 0 \) satisfies \( \frac{h - x_1}{A} = \frac{k - y_1}{B} = -\frac{Ax_1 + By_1 + C}{A^2 + B^2} \). For worked example 1, the common value is \( -\frac{10}{25} = -0.4 \), giving \( h = 2 - 1.2 = 0.8 \) and \( k = 3 - 1.6 = 1.4 \). Check: \( 3(0.8) + 4(1.4) - 8 = 0 \), and the distance from \( (2, 3) \) to \( (0.8, 1.4) \) is \( \sqrt{1.44 + 2.56} = 2 \).
Try it. (a) Find the distance of \( (-1, 2) \) from \( 3x - 4y + 1 = 0 \). (b) Find the distance of the origin from \( 12x + 5y = 26 \).
Answer
- Distance of a point from a line
- The length of the perpendicular from the point to the line: the shortest path.
- Perpendicular
- A line meeting another at a right angle.
- Foot of the perpendicular
- The point where the perpendicular from P meets the line.
- Perpendicular distance formula
- \( d = \frac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}} \).
Words to know
What is the distance of \( (0, 0) \) from \( 6x + 8y - 20 = 0 \)?
- 2
- 20
- 0.2
Substituting a point into \( Ax + By + C \) gives \( -15 \), and \( \sqrt{A^2 + B^2} = 5 \). What is the distance?
- \( -3 \)
- 3
- 75
Why do we measure the distance from a point to a line along the perpendicular?
- Because it is easiest to draw
- Because it is the shortest path to the line
- Because it always makes \( 45^\circ \) with the axes
Picture and video credits