The distance from a point to a line

The distance from a point to a line is the shortest gap, measured straight across (perpendicular) from the point to the line. Here we find the distance from the origin O(0,0)O(0, 0) to the line 3x+4y25=03x + 4y - 25 = 0.

In general, the distance from a point (x0,y0)(x_0, y_0) to a line ax+by+c=0ax + by + c = 0 is given by this formula.

d=ax0+by0+ca2+b2d = \frac{|a x_0 + b y_0 + c|}{\sqrt{a^2 + b^2}}

For this line a=3a = 3, b=4b = 4, c=25c = -25. Substituting (0,0)(0, 0), the numerator is 30+4025=25|3 \cdot 0 + 4 \cdot 0 - 25| = 25 and the denominator is 32+42=25=5\sqrt{3^2 + 4^2} = \sqrt{25} = 5, so the distance is d=255=5d = \dfrac{25}{5} = 5.

The perpendicular dropped from OO to the line is y=43xy = \dfrac{4}{3}x, and it meets the line at the foot of the perpendicular (3,4)(3, 4). The length from the origin to (3,4)(3, 4) is 32+42=5\sqrt{3^2 + 4^2} = 5, matching the distance from the formula.

This formula is exactly what lies behind the earlier topic "intersection of a circle and a line," where we compared the distance from the center to the line with the radius. The circle x2+y2=25x^2 + y^2 = 25 (center (0,0)(0, 0), radius 55) is tangent to this line, since the distance is 55, equal to the radius. The large dots on the graph are the point O(0,0)O(0, 0) and the foot of the perpendicular (3,4)(3, 4); the length of the segment joining them is the distance we wanted.