Distance from a Point to a Line
After this page you can apply the point-to-line distance formula and simplify exact rational or radical results, including the special case of a point on the line.
Substitute into the distance formula
For P = (x₀, y₀) and the line Ax + By + C = 0, the shortest distance is d = |Ax₀ + By₀ + C|/√(A² + B²). The absolute value makes the numerator nonnegative, and the denominator measures the line's normal vector.
find the distance from P=(2,-1) to 3x+4y-5=0The board substitutes the point and the line coefficients before taking the absolute value. A rational denominator can produce a fractional distance, which should be simplified exactly.
Simplify an exact radical
When A² + B² is not a perfect square, the denominator remains a square root. Keep the radical exact and simplify it rather than replacing the distance with a decimal approximation.
find the distance from P=(4,1) to x+2y-2=0Squaring the nonnegative quotient lets the board simplify the expression under one radical before taking the principal root. Equivalent forms, such as a rationalized denominator, describe the same distance.
A point on the line
If P lies on the line, substitution makes Ax₀ + By₀ + C equal to zero. The numerator and therefore the distance are zero, matching the geometric fact that no movement is needed to reach the line.
find the distance from P=(-2,3) to 2x-y+7=0This zero result is also a useful check: any nonzero claimed distance for a point on the line signals a substitution or arithmetic error. For every other point, the perpendicular distance is positive.
Practice
Practice: problems like this one, made and checked in your browser.
Recap
- Write the line as Ax + By + C = 0 before identifying its coefficients.
- Divide the absolute substitution result by the length of the normal vector.
- Keep exact radicals and recognize that a point on the line has distance zero.