2.3.10 · D1Coordinate Geometry

Foundations — Distance from a point to a line

2,885 words13 min readBack to topic

This page earns every single mark of the parent formula before the formula is allowed to appear. The one symbol we can name right now, because it is the goal, is :

Everything else — , , , , , the bars, the square root — is built below, in the order that lets the next symbol make sense. Nothing is used before it is built. Only at the very end, once every mark has meaning, do we assemble the formula.


1. The plane and its two number-arrows

Figure — Distance from a point to a line
Figure 1 — The coordinate plane. The cyan horizontal line is the -axis (right is positive), the cyan vertical line is the -axis (up is positive), the amber dot marks the origin , and the white dot is reached by walking 2.5 right then 1.5 up (dashed amber guides).

Picture it: look at the figure. Right is positive , left is negative ; up is positive , down is negative . Every location on the sheet gets a two-number address.

Why the topic needs it: the whole problem — a point, a line, a distance — lives on this sheet. Without addresses we cannot say where anything is.


2. A point

The little "" in is just a name tag. It does not mean "multiply" or "power one". We write to say "this particular point, whose horizontal address I'll call and whose vertical address I'll call ." If a second point turned up we'd call it — same idea, different tag.

Why the topic needs it: is the field-you're-standing-in. The formula's whole job is to measure this point's distance to a line.


3. What a line equation really says

Figure — Distance from a point to a line
Figure 2 — A line as a "score machine". Every point on the white line scores . The amber dot off to one side scores a positive number; the cyan dot on the other side scores a negative number. The line is the razor-thin boundary where the score flips sign.

How to picture "makes it true": pick any dot on the drawn line, read off its , plug into . You get exactly . Pick a dot off the line and you get some non-zero number — positive on one side, negative on the other. The line is the razor-thin boundary where the expression flips sign.

Why "" form matters: the parent formula reads , , straight off this exact layout. If your line arrives as , you must first shove everything to one side — — to see , , . (Prerequisite: Equation of a Line.)


4. The letters , , — and why points across the line

Here is the quietly magical fact. The pair , read as an arrow starting at the origin, points perpendicular (at a right angle) to the line. This arrow is called the normal vector.

Figure — Distance from a point to a line
Figure 3 — The normal arrow. The white line is the line; the amber arrow leaves a point on it at a perfect right angle (that is why it is called the normal). The cyan arrow shows the along-the-line direction, where the score stays fixed at .

Why it's perpendicular (in plain words): move along the line from one point to another. The equation's value never changes — it stays . The direction in which the value changes fastest is exactly the arrow , and "fastest change" is always at right angles to "no change". So crosses the line square-on. (Deeper: Normal Vector to a Line, Perpendicular Lines.)

Why the topic needs it: the shortest walk to a line is along this perpendicular arrow. The formula measures in the direction of — no other direction gives the shortest path.

What the constant does: it slides the line

Keep and fixed and change only . The direction of the line never changes (the normal is untouched), but the whole line slides bodily across the plane, parallel to itself.

Figure — Distance from a point to a line
Figure 5 — The offset . Three parallel lines share the same and (same amber normal direction) but different . Making more negative pushes the line further from the origin along the normal; makes the line pass through the origin.


5. An arrow with length — the vector, and

To find the length of the arrow we use the right triangle it makes with the axes: it goes across and up, so by Pythagoras its length is

Figure — Distance from a point to a line
Figure 4 — Length of the normal by Pythagoras. The amber arrow has legs across and up (cyan dashes). The small white square marks the right angle, and — exactly the denominator of the distance formula.

Why we must divide by it — units. The score is not a length yet. To see this, imagine doubling , and together: the equation describes the exact same line, yet the score at any fixed point doubles. A genuine distance cannot depend on how we happened to write the equation. The cure: the score always scales in step with (double and doubles too), so dividing the score by cancels that arbitrary scaling and leaves a number that only depends on the line and the point — a true length in coordinate units.


6. The absolute value

Picture it: distance on a ruler from — always to the right, never negative.

Why the topic needs it: the score is negative on one side of the line and positive on the other. But a walking distance can never be negative. The bars strip the sign, keeping only "how far".


7. Assembling the formula — and two ways to trust it

Now every mark is earned. Take the score of the point , strip its sign, divide by the length of the normal:

Two independent derivations (both fully worked in the parent note) confirm it. Here is the why of each, in one breath, using only symbols we now own.

Route A — the projection route (needs a unit normal)

Pick any point on the line and draw the arrow from to your point . Its shadow cast along the unit normal (its projection) is exactly the perpendicular gap — because points straight across the line. Working that shadow out algebraically, the " on the line" fact makes the -terms vanish and leaves precisely .

Route B — the area route

Take two points on the line and your point ; they form a triangle. Its area can be found two ways: by the coordinate formula (Area of Triangle Using Coordinates), or as , where the height is the perpendicular distance. Setting the two expressions equal and cancelling the base leaves the same . (Both routes rest on the Distance Formula, and minimising such distances is the seed of Least Squares Regression.)

The must-check case: on the line gives

If the point already sits on the line, then by definition its score is , so and the whole fraction is . No walk needed — you're already there. This is the single most important sanity check: the algebra agrees with the picture at the boundary.

Figure — Distance from a point to a line
Figure 6 — The degenerate case. When lands on the line its score is , so — the perpendicular gap has shrunk to nothing. This is the built-in reality check linking formula to figure.


Prerequisite map

Coordinate plane and axes

Point P with coordinates x1 y1

Line as equation a x + b y + c = 0

Coefficients a b c not both zero

Constant c slides the line

Normal vector n equals pair a comma b

Unit normal n over length of n

Vector length sqrt a2 + b2

Distance d from point to line

Absolute value strips the sign

Perpendicular is shortest path


Equipment checklist

Test yourself — each line hides its answer. Say it out loud first.

What does the symbol stand for?
The distance — the length of the shortest (perpendicular) walk from the point to the line; a single non-negative number.
What does the subscript in mean?
A name tag — "the x of point number 1"; it is not multiplication or a power.
On the plane, which way is positive and positive ?
Positive is right, positive is up; they cross at the origin .
What does it mean for a point to be "on" the line ?
Plugging its coordinates in gives exactly .
When does fail to be a line?
When and are both zero; then there is no or term and it is not a line (also why the denominator is never ).
What is the geometric meaning of the pair ?
The normal vector — an arrow pointing perpendicular (at a right angle) to the line.
What does the constant do geometrically?
It sets the line's offset — sliding it parallel to itself; forces the line through the origin.
How do you make a unit vector from ?
Divide the arrow by its own length: — same direction, length .
What is the length of the arrow , and why?
, by Pythagoras on the right triangle with legs and .
The bars in and look identical — how do you tell them apart?
By what's inside: a plain number means "size, drop the sign"; an arrow means "length of the arrow".
Why does the distance formula have absolute-value bars?
The score can be negative on one side of the line, but distance must be non-negative.
Why must we divide the score by ?
The raw score changes if you rescale the equation (e.g. double ); dividing by cancels that scaling and turns the score into a true length.
What does the formula give when lies on the line?
— the score is , so the fraction is ; you're already on the line.
Which direction gives the shortest walk from a point to a line?
Straight along the perpendicular — the direction of the normal .