COORDINATE GEOMETRY · HL
Perpendicular Distance
Shortest distance from a point to a line.
Section 1 of 6
The formula
Perpendicular distance is the shortest distance from a point to a line.
Given a point $(x_1, y_1)$ and a line $ax + by + c = 0$:
Formula
1.$d = \dfrac{|ax_1 + by_1 + c|}{\sqrt{a^2 + b^2}}$
2.The line MUST be in the form $ax + by + c = 0$ before you read off $a, b, c$.
(i) Worked example
Find the distance from $(3, 1)$ to $x - 2y = 7$.
Important: rewrite as $ax + by + c = 0$ first — watch the sign of $c$.
$x - 2y - 7 = 0$
$a = 1, \quad b = -2, \quad c = -7$
$x_1 = 3, \quad y_1 = 1$
Slot into the formula:
$d = \dfrac{|1(3) - 2(1) - 7|}{\sqrt{1 + 4}}$
$= \dfrac{|-7|}{\sqrt{5}}$
$= \dfrac{7}{\sqrt{5}}$ units
The expression inside the bars was negative — the point sits on the negative side of the line. We’ll use that fact in Type 1.
Section 2 of 6
Type 1 — Same side of a line
Two points are on the same side of a line if the expression inside $|\,\,|$ has the same sign for both.
(i) Worked example
Find the distance from $2x - y - 9 = 0$ to $A(3, -2)$ and to $B(-1, 5)$. Are $A$ and $B$ on the same side of the line?
$a = 2, \quad b = -1, \quad c = -9$
Distance from $A(3, -2)$:
$x_1 = 3, \quad y_1 = -2$
$d_A = \dfrac{|2(3) - 1(-2) - 9|}{\sqrt{4 + 1}}$
$= \dfrac{|6 + 2 - 9|}{\sqrt{5}} = \dfrac{|-1|}{\sqrt{5}}$
$d_A = \dfrac{1}{\sqrt{5}}$ units
Distance from $B(-1, 5)$:
$x_1 = -1, \quad y_1 = 5$
$d_B = \dfrac{|2(-1) - 1(5) - 9|}{\sqrt{5}}$
$= \dfrac{|-2 - 5 - 9|}{\sqrt{5}} = \dfrac{|-16|}{\sqrt{5}}$
$d_B = \dfrac{16}{\sqrt{5}}$ units
Inside the bars both gave a negative number ($-1$ and $-16$).
Same sign ⇒ $A$ and $B$ are on the same side of the line.
Section 3 of 6
Type 2 — Unknown constant
When the line has an unknown $k$ in it, slot the formula and solve the absolute-value equation — you’ll get two values of $k$.
(i) Worked example
The distance from $3x - 4y + k = 0$ to $(1, 7)$ is $6$. Find the possible values of $k$.
$a = 3, \quad b = -4, \quad c = k$
$x_1 = 1, \quad y_1 = 7$
$\dfrac{|ax_1 + by_1 + c|}{\sqrt{a^2 + b^2}} = 6$
$\dfrac{|3(1) - 4(7) + k|}{\sqrt{9 + 16}} = 6$
$\dfrac{|3 - 28 + k|}{5} = 6$
$|k - 25| = 30$
Two cases inside the bars:
$k - 25 = 30 \quad\text{or}\quad k - 25 = -30$
$k = 55 \quad\text{or}\quad k = -5$
Section 4 of 6
Type 3 — Between two parallel lines
The trick: pick any point on one line, then find its perpendicular distance to the other line.
(i) Worked example
Find the distance from $3x + y - 7 = 0$ to $3x + y - 10 = 0$.
Step 1 — pick a point on $3x + y - 10 = 0$
Let $x = 0$:
$3(0) + y - 10 = 0 \;\Rightarrow\; y = 10$
Point: $(0, 10)$
Step 2 — distance from $(0, 10)$ to $3x + y - 7 = 0$
$a = 3, \quad b = 1, \quad c = -7$
$d = \dfrac{|3(0) + 1(10) - 7|}{\sqrt{9 + 1}}$
$= \dfrac{|3|}{\sqrt{10}}$
$d = \dfrac{3}{\sqrt{10}}$ units
Section 5 of 6
Type 4 — Parallel lines at a given distance
To find a line parallel to $ax + by + c = 0$, keep the $a$ and $b$ the same and swap $c$ for an unknown $k$:
Parallel line: $ax + by + k = 0$
Then pick a point on the original line and apply the distance formula with $k$ as the unknown (just like Type 2).
(i) Worked example
The line $P$ is $5x + 12y - 10 = 0$. Find $2$ lines parallel to $P$ which are $3$ units from $P$.
Step 1 — parallel line
$5x + 12y + k = 0$
Step 2 — pick a point on $P$
Let $y = 0$ in $5x + 12y - 10 = 0$:
$5x = 10 \;\Rightarrow\; x = 2$
Point: $(2, 0)$
Step 3 — distance from $(2, 0)$ to $5x + 12y + k = 0$ is $3$
$a = 5, \quad b = 12, \quad c = k$
$\dfrac{|5(2) + 12(0) + k|}{\sqrt{25 + 144}} = 3$
$\dfrac{|k + 10|}{13} = 3$
$|k + 10| = 39$
$k + 10 = 39 \quad\text{or}\quad k + 10 = -39$
$k = 29 \quad\text{or}\quad k = -49$
$5x + 12y + 29 = 0$
$5x + 12y - 49 = 0$
Section 6 of 6
Type 5 — Lines through a point at a given distance
The unknown here is the slope $m$. Write the line in $y - y_1 = m(x - x_1)$ form, rearrange to $ax + by + c = 0$, then slot into the distance formula.
Squaring both sides gives a quadratic in $m$ — two slopes, two lines.
(i) Worked example
Find two lines through $(-5, 5)$ which are $\sqrt{5}$ units from the origin.
Step 1 — line through $(-5, 5)$
$y - y_1 = m(x - x_1)$
$y - 5 = m(x + 5)$
$y - 5 = mx + 5m$
$mx - y + 5 + 5m = 0$
Step 2 — distance to $(0, 0)$ is $\sqrt{5}$
$a = m, \quad b = -1, \quad c = 5 + 5m$
$x_1 = 0, \quad y_1 = 0$
$\dfrac{|m(0) - 1(0) + 5 + 5m|}{\sqrt{m^2 + 1}} = \sqrt{5}$
$\dfrac{|5 + 5m|}{\sqrt{m^2 + 1}} = \sqrt{5}$
Step 3 — square both sides
$(5 + 5m)^2 = 5\,(m^2 + 1)$
$25 + 50m + 25m^2 = 5m^2 + 5$
Divide across by $5$:
$5 + 10m + 5m^2 = m^2 + 1$
$4m^2 + 10m + 4 = 0$
$2m^2 + 5m + 2 = 0$
$(2m + 1)(m + 2) = 0$
$m = -\dfrac{1}{2} \quad\text{or}\quad m = -2$
Step 4 — write the two lines
$y - 5 = -2(x + 5)$
$y - 5 = -\dfrac{1}{2}(x + 5)$
SUM
The lot in one box
Perpendicular distance toolkit
1.$d = \dfrac{|ax_1 + by_1 + c|}{\sqrt{a^2 + b^2}}$ (line MUST be $= 0$ form)
2.Same sign inside $|\,\,|$ $\;\Rightarrow\;$ same side of the line.
3.Unknown $c$ (or $k$): solve the absolute-value equation $\to$ two answers.
4.Distance between parallel lines: pick a point on one, distance to the other.
5.Parallel line at distance $d$: replace $c$ with $k$, point on original, solve $\to$ two lines.
6.Lines through a point at distance $d$: $y - y_1 = m(x - x_1) \to$ quadratic in $m \to$ two slopes.
End of lesson
Perpendicular Distance — HL · Mathslive.ie