Perpendicular distance for ax + by + c = 0 form lines
Reviewed by [email protected], Geometry Calculator Developer & Online Math Educator Last updated May 14, 2026
Two parallel lines have the same direction but never meet. The perpendicular distance between them is constant everywhere along their length, so there is a single formula that captures it. The key requirement: write both lines in the form ax + by + c = 0 with the same a and b — only the constant term c differs.
| Name | Formula | Notes |
|---|---|---|
| Standard Form (2D) | d = |c₁ − c₂| / √(a² + b²) |
Lines: ax + by + c₁ = 0 and ax + by + c₂ = 0. Same a and b — that is what makes them parallel. |
| Slope-Intercept Form | d = |b₁ − b₂| / √(1 + m²) |
For y = mx + b₁ and y = mx + b₂. The slopes m must match. Derived from the standard form with a = m, b = −1. |
| Point-to-Line Distance | d = |ax₀ + by₀ + c| / √(a² + b²) |
Distance from point (x₀, y₀) to line ax + by + c = 0. The parallel-line formula is just point-to-line applied to any point on one line, computed against the other. |
| Vector Form | d = |⃗AB · ⃗n̂| |
⃗AB connects a point on line 1 to a point on line 2; ⃗n̂ is the unit normal to either line. Generalizes to 3D. |
| Parallel Lines Test | a₁/a₂ = b₁/b₂ ≠ c₁/c₂ |
For a₁x + b₁y + c₁ = 0 and a₂x + b₂y + c₂ = 0. If all three ratios are equal, the lines are identical (not just parallel). |
| Skew Lines in 3D | d = |(⃗a₂ − ⃗a₁) · (⃗b₁ × ⃗b₂)| / |⃗b₁ × ⃗b₂| |
When two lines in 3D are parallel but not coplanar (skew). Cross product of direction vectors gives the common perpendicular; project the connecting vector onto it. |
| Parallel Planes | d = |D₁ − D₂| / √(A² + B² + C²) |
For Ax + By + Cz + D₁ = 0 and Ax + By + Cz + D₂ = 0. Direct 3D analog of the 2D formula. |
Plug in your numbers and get instant step-by-step results.