Enter line coefficients A, B, C and point coordinates to calculate the perpendicular distance
x +y += 0
( , )
Result
Distance from Point to Line
Step-by-Step Derivation
Distance Formula
d = |Ax₀ + By₀ + C| / √(A² + B²)
The point-to-line distance equals the projection length from the point to any point on the line in the perpendicular direction. The numerator is an absolute value (guaranteeing non-negative distance), and the denominator is the magnitude of the line's normal vector.
⚠Note: A and B cannot both be 0 simultaneously, otherwise they do not define a valid line. The distance unit matches the coordinate system unit.
What Is Point-to-Line Distance?
The point-to-line distance is a fundamental concept in geometry. It represents the shortest path length from a given point to a line, i.e., the length of the perpendicular segment from the point to the line.
Shortest Path
Among all segments connecting a point to a line, the perpendicular segment is the shortest. The distance formula essentially computes this shortest length.
Normal Vector
The normal vector of line Ax + By + C = 0 is (A, B). The √(A²+B²) in the formula is the magnitude of this normal vector.
Geometric Meaning
The numerator |Ax₀+By₀+C| represents the "deviation" of the point from the line's algebraic expression. Dividing by the normal vector's magnitude normalizes it to a distance.
Uniqueness
For any given point and line, the shortest distance is unique, regardless of which side of the line the point is on.
💡 Teaching Example: Point P(4,5) to line 2x + 3y - 6 = 0.
Using the formula: d = |2×4 + 3×5 - 6| / √(2² + 3²) = |8+15-6| / √13 = 17/√13 ≈ 4.72
Does the line equation have to be in Ax + By + C = 0 form?▼
Yes, the distance formula d = |Ax₀ + By₀ + C| / √(A² + B²) requires the line in general form. If using slope-intercept form y = kx + b, convert to 0 = kx - y + b, giving A = k, B = -1, C = b.
How to calculate when A = 0 or B = 0?▼
When A = 0, the line becomes y = -C/B (horizontal), distance = |y₀ - (-C/B)| = |By₀ + C| / |B|. When B = 0, the line becomes x = -C/A (vertical), distance = |x₀ - (-C/A)| = |Ax₀ + C| / |A|. The formula works for both cases.
What is the distance when the point is on the line?▼
When the point lies exactly on the line, plugging into the formula gives Ax₀ + By₀ + C = 0, so the numerator is 0 and the distance d = 0. This matches geometric intuition: a point on a line is 0 distance from it.
Does it matter which side of the line the point is on?▼
No. The absolute value |Ax₀ + By₀ + C| ensures the distance is always positive regardless of which side the point is on. Only when you remove the absolute value does the sign indicate whether the point is in the positive or negative normal direction.
How is the distance formula derived?▼
By geometry: pick a point Q(x₁, y₁) on the line satisfying Ax₁ + By₁ + C = 0, form vector PQ, and use vector projection. Alternatively, find the line through P perpendicular to the given line, compute the intersection (foot of the perpendicular), and calculate the distance from P to that foot.
Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.