Distance Between a Point and a Line
The distance from a point to a line is the length of the shortest segment connecting them, which is always perpendicular to the line. This distance is given by a compact formula involving the line's equation and the point's coordinates.
Quick Reference
| Formula | Description |
|---|---|
| Distance from to the line |
The Distance Formula
Point-to-Line Distance Theorem
The perpendicular distance from the point to the line with equation is:
The absolute value in the numerator ensures the distance is always non-negative, regardless of which side of the line the point lies on. The denominator is the length of the normal vector to the line.

Proof (click to expand)
Drop a perpendicular from to and call the foot . Since the slope of is , the perpendicular through has slope , giving:
Since lies on :
Let denote this common ratio. Then and . The distance is:
To find , use the fact that satisfies . Substituting and :
so . Therefore:
Note: The proof above assumes and , but the formula remains valid when either or .
How to Apply the Formula
Step-by-Step Procedure
- Rewrite the line equation in the form (move all terms to one side).
- Identify , , , and the point .
- Substitute into .
- Simplify. Rationalize the denominator if needed.
Worked Examples
Example 1. Find the distance between the point and the line .
Solution. Rewrite the line equation:
Here , , , , :
Example 2. Find the distance between the parallel lines and .
Solution. Since the two lines have equal slopes, the distance between them is constant. Choose any convenient point on the second line. Setting :
So $(3, 1)$ lies on the second line. Now apply the formula with the first line , where , , , , :
The distance between the two parallel lines is $3$.
Frequently Asked Questions
Why is the distance formula measured perpendicularly?
The perpendicular distance is the shortest distance from a point to a line. Any other path from the point to the line is longer than the perpendicular segment. This makes the perpendicular distance the natural and most meaningful measure of how far the point is from the line.
How do I rewrite a line equation in the form ax + by + c = 0?
Move all terms to one side of the equation. For example:- becomes (so , , ).
- becomes (so , , ).