Functions
AI Assistant

Distance from a Point to a Line

Construct the perpendicular and discover the shortest path

Finding the nearest road, the closest point on a border, the shortest path from you to a wall — these are all the same question in disguise. Given a line and a point that's not on it, what's the shortest distance between them? It's not the horizontal distance, and it's not the vertical distance — it's the perpendicular distance, the length of the line segment that meets the original line at a right angle.

In this lesson, you'll start with the line y = 0.5x + 1 and the point P(4, 5). You'll construct the perpendicular from P to the line, find the foot of the perpendicular, calculate the distance using the Pythagorean theorem, and then discover the point-to-line distance formula — a one-step shortcut that gives the same answer.

By the end, you'll be able to find the distance from any point to any line, both by construction and by formula — with an AI tutor guiding you step by step.

Graph

FAQ

What is the distance from a point to a line?
The distance from a point to a line is the length of the shortest path between them. That shortest path is always the perpendicular — the line segment from the point to the line that forms a 90° angle with the line. Any other path from the point to the line would be longer.
How do I find the perpendicular from a point to a line?
If the line has slope m, the perpendicular has slope -\frac{1}{m} (the negative reciprocal). Write the equation of the line through your point with that slope, then solve the system to find where it meets the original line. That intersection point is the foot of the perpendicular.
What is the point-to-line distance formula?
For a line ax + by + c = 0 and a point (x_0, y_0), the distance is d = \frac{|ax_0 + by_0 + c|}{\sqrt{a^2 + b^2}}. This formula gives the perpendicular distance directly, without needing to construct the foot.
Why is the perpendicular distance the shortest?
Among all line segments from a point to a line, the perpendicular is the shortest because it forms a right triangle with any other segment — and the hypotenuse of a right triangle is always longer than either leg. The perpendicular segment is a leg, so it's shorter than any other connection.