Shortest Distance between a Point and a Line in 2D

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration shows how the scalar product (dot product) can be used to find the point of shortest distance between a point P and a line. You can modify the line by dragging points A and B.

Contributed by: Sergio Hannibal Mejía (Yokohama International School) (March 2011)
Open content licensed under CC BY-NC-SA



This Demonstration is intended for teachers trying to illustrate how the inner product (dot product) - becomes zero when the point X on the line AB is closest to the point P. The Demonstration can be used as an interactive board; teachers can keep their students' attention on a given element by not displaying other elements.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.