Allday Education

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 PP 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 y=1y = 1 is vertical, so the distance from a point to that line is just the difference in yy-values. The perpendicular to a vertical line like x=2x = 2 is horizontal, so the distance is the difference in xx-values.

PP

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 y=ay = a and y=by = b, that perpendicular segment is vertical, and the distance is the difference of the yy-values. Subtracting a negative value is the step to watch: the distance between y=2y = 2 and y=3y = -3 is 2(3)=52 - (-3) = 5, not 232 - 3.

-4-3-2-11234-4-3-2-11234xy

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 P(1,4)P(1, 4) to the line y=1y = 1.

The line y=1y = 1 is horizontal, so the perpendicular from PP is vertical
The vertical segment runs from (1,4)(1, 4) down to (1,1)(1, 1)
Subtract the yy-values41=34 - 1 = 3

Answer: The distance is 33.

Example 2: distance between parallel lines

Find the distance between the parallel lines y=2y = 2 and y=3y = -3.

Both lines are horizontal, so measure along a vertical segment perpendicular to both
Subtract the yy-values — watch the negative2(3)=52 - (-3) = 5

Answer: The distance is 55.

Example 3: distance to a vertical line

Find the distance from the point (3,1)(-3, 1) to the line x=2x = 2.

The line x=2x = 2 is vertical, so the perpendicular from the point is horizontal
The horizontal segment runs from (3,1)(-3, 1) to (2,1)(2, 1)
Subtract the xx-values2(3)=52 - (-3) = 5

Answer: The distance is 55.

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 y=9y = 9 and y=3y = -3 is 9(3)=129 - (-3) = 12. Dropping the negative sign and computing 93=69 - 3 = 6 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.

Try it for $1