Distance from a line
A straight line splits the plane into two halves, and every point off the line sits some fixed distance from it — but "distance" only means one thing in geometry: the shortest gap, measured straight across, perpendicular to the line. Coordinate geometry turns this idea into a one-line formula that works for any point and any line written in general form , no diagram or perpendicular-line construction required. This tool sits at the end of the Straight Lines chapter, right after the different forms of a line's equation, and it gets reused constantly afterward — to find the height of a triangle from a vertex, to check how far a boundary a point lies, or to measure the gap between two parallel roads or wires modelled as parallel lines. This section builds the formula from the idea of perpendicular projection, works two board-style examples in full, and flags the traps that cost the most marks.
The perpendicular distance of a point from the line is , and the same idea gives the gap between two parallel lines by comparing their constant terms.
The core idea
Distance of a point from a line. For a line in general form and any point , the shortest distance from the point to the line is
where: are the coefficients of the line's general equation, is the point, and is the perpendicular distance. The modulus in the numerator matters — the raw expression can come out negative depending on which side of the line the point sits, but a distance is never negative.
Distance from the origin. Setting collapses the formula to a special case worth remembering on its own:
Distance between two parallel lines. Two lines and share the same and — that shared direction is exactly what makes them parallel. Their separation is
which is really the point-to-line formula applied once, using any point picked off one line against the other line's equation; the algebra simplifies so that no coordinates survive in the final answer.
Connection to normal form. Earlier in the chapter, a line can be written in normal form , where is already the distance from the origin because the coefficients of and have been arranged so that . The general distance formula above is doing the same job for a line that has not been normalised that way: dividing by is exactly the step that converts the general equation into an equivalent normal form, after which can be read off directly as a distance from the origin, or the full numerator as a distance from any point. The figure below shows why the shortest path from a point to a line has to be the perpendicular one — any other path drawn to the line is the hypotenuse of a right triangle whose leg is the perpendicular, and a hypotenuse is always longer than a leg.
Distance from a line
The goal is to show, using only the perpendicular direction of the coefficient pair and basic projection, why correctly measures the shortest distance from a point to the line , rather than relying on the formula as something to memorise blindly.
Step 1. Note that the vector is perpendicular to the line. Any two points and on the line satisfy and ; subtracting gives , which says the direction vector of the line, , is perpendicular to . So points straight across the line — the direction along which distance should be measured.
Step 2. Set up the perpendicular from the point. Starting at and moving a distance along the unit vector reaches the foot of the perpendicular on the line, at coordinates .
Step 3. Force that point to satisfy the line's equation. Substituting into gives . Since factors out of the two fraction terms, this becomes , so .
Step 4. Read off the distance. The value found above is precisely the signed distance travelled along the perpendicular to reach the line, so the (unsigned) distance is its absolute value: — exactly the formula, and the derivation shows it comes from measuring strictly along the line's perpendicular direction, never any other. Check with numbers: for the line and point , Step 4 gives , matching the worked example below.
Worked example
Find the perpendicular distance of the point from the line , then find the distance between the parallel lines and .
Step 1. Identify the coefficients for the point-to-line part. Here , , , and .
Step 2. Substitute into the distance formula. .
Step 3. Now the parallel lines. Both have , confirming they really are parallel (same slope ), with and .
Step 4. Apply the parallel-line formula. .
The point is units from the first line, and the two parallel lines are units apart.
Competitive stretch
A quick cross-check for the parallel-lines answer: pick any point on the second line, say , giving . Its distance from the first line is — the same answer by a completely different route, confirming the parallel-line shortcut. This cross-check is worth doing whenever time allows: it catches sign slips in that the shortcut alone would not reveal, since a dropped minus sign there still produces a plausible-looking positive number.
Common traps
- Substituting before converting to general form. A line given as must first be rewritten as (so , , ) before the distance formula can be applied.
- Dropping the absolute value. The raw numerator can be negative if the point is on a particular side of the line; a distance must be reported positive.
- Using the parallel shortcut on unmatched coefficients. only works once both lines are scaled to share the same and — rescale one equation first if they do not already match.
- Measuring the wrong direction. The formula always gives the perpendicular (shortest) distance, never a horizontal or vertical gap to the line.
- Mixing up which point goes where. The point is substituted directly into from the other object's equation — never re-derive from the point itself; the point only ever supplies and .
Ask the tutor: If you have two lines whose coefficients do not match and you are unsure how to rescale one before using the parallel-lines shortcut, ask the AI tutor to walk through the rescaling step.
Why does the absolute value sign matter so much in this formula?
Without it, the numerator can be positive or negative depending on which side of the line the point lies, since points on opposite sides give opposite signs. A distance, by definition, cannot be negative, so the modulus strips the sign and keeps only the magnitude. In fact the sign itself is useful information — it tells you which side of the line the point is on — but it must be discarded once you report a distance.
Do I need to memorise a separate formula for the distance between parallel lines, or can I always just use the point-to-line formula?
You never strictly need the separate shortcut — picking any point on one line and applying the point-to-line formula against the other line always works, as shown in the competitive stretch above. The shortcut is just that same calculation pre-simplified for the special case where both lines already share identical and , so it saves a step in exams once you recognise the lines are parallel.
What if the two lines are given with different A and B, like 6x - 8y + 10 = 0 and 5x minus 12y minus 39 equals 0 — are they still parallel?
Check slopes first: for is , while for it is . Since , these two are not parallel and the parallel-line shortcut does not apply at all — you would only use the plain point-to-line formula between a point and one of the lines. Before reaching for the shortcut, always confirm the coefficients of and are in the same ratio.