Perpendiculars & Distance
In geometry, “distance” always means the shortest path. The distance from a point to a line is the length of the perpendicular segment from the point to the line — every slanted path from the point to the line is longer than the perpendicular one.
The same idea measures the gap between parallel lines. Parallel lines stay the same distance apart everywhere, so pick any point on one line and drop a perpendicular to the other; the length of that segment is the distance between the lines.
Distance from a point to a line
From a point not on a line, you can draw infinitely many segments to the line, but only one of them is perpendicular — and it is the shortest. That perpendicular length is defined as the distance from the point to the line. In the figure below, the dashed perpendicular from carries the right-angle mark, while the other segment to the line is clearly longer.
On the coordinate plane, the easiest cases are horizontal and vertical lines. The perpendicular to a horizontal line like is vertical, so the distance from a point to that line is just the difference in -values. The perpendicular to a vertical line like is horizontal, so the distance is the difference in -values.
Distance between parallel lines
Because parallel lines never converge or spread apart, one perpendicular segment between them measures the gap everywhere. Draw a segment perpendicular to both lines and find its length.
For two horizontal lines and , that perpendicular segment is vertical, and the distance is the difference of the -values. Subtracting a negative value is the step to watch: the distance between and is , not .
Why distance is never negative
Distance is a length, so it is always positive. When you subtract coordinates, take the absolute value of the result — or simply subtract the smaller value from the larger. A negative answer means the subtraction order should be flipped, not that the distance is negative.
Worked examples
Example 1: distance from a point to a horizontal line
Find the distance from to the line .
Answer: The distance is .
Example 2: distance between parallel lines
Find the distance between the parallel lines and .
Answer: The distance is .
Example 3: distance to a vertical line
Find the distance from the point to the line .
Answer: The distance is .
Try one yourself
Common questions
Why is the perpendicular segment the shortest one?
Any slanted segment from the point to the line forms the hypotenuse of a right triangle whose leg is the perpendicular segment — and a hypotenuse is always longer than a leg.
Does it matter where I measure between parallel lines?
No. Parallel lines stay the same distance apart everywhere, so any segment perpendicular to both lines has the same length.
How do I handle negative coordinates?
Subtract carefully and keep the result positive: the distance between and is . Dropping the negative sign and computing is the classic mistake.
What if the line is slanted instead of horizontal or vertical?
The definition is the same — the perpendicular segment — but finding its length takes more work: you find where the perpendicular through the point meets the line, then use the distance formula between the two points.
Want the video version?
Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.