Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Distance from a point to a line

How far a point sits from a line in space, found from the cross product: D=|\overrightarrow{P_0P_1}\times\mathbf{v}|/|\mathbf{v}|.

The distance from a point P_1 to a line through P_0 with direction \mathbf{v} is D=\dfrac{|\overrightarrow{P_0P_1}\times\mathbf{v}|}{|\mathbf{v}|}. The parallelogram spanned by \overrightarrow{P_0P_1} and \mathbf{v} has area |\overrightarrow{P_0P_1}\times\mathbf{v}|, and dividing that area by its base |\mathbf{v}| leaves exactly the parallelogram's height, which is the point's perpendicular distance to the line.

Examples

  • Swinging a taut string from a point to the nearest spot on a line, snapped perpendicular to it, gives the shortest possible length — exactly what the cross-product formula computes.

Read the full section →
Graph settings

Calculator