Distance of a point from a line
To reach a straight road from your house by the shortest path, you walk straight to it at a right angle. That shortest length is the distance.
The perpendicular distance of the point (x₁, y₁) from the line Ax + By + C = 0 is d = |Ax₁ + By₁ + C| / √(A² + B²).
Formula: d = |Ax₁ + By₁ + C| / √(A² + B²)
In the figure: P(3, 4) and the line x − y − 0.5 = 0; the shortest path to the line is the perpendicular.
Rule 1: Compute d — Write the line as Ax + By + C = 0, then substitute.
- Easy: Point (0, 0), line 3x + 4y − 10 = 0: d = 10/5 = 2.
- Medium: Point (2, 3), line 3x + 4y − 5 = 0: d = |6 + 12 − 5|/5 = 2.6.
- Exam-type: Point (1, 1), line x + y − 4 = 0: d = 2/√2 = √2 ≈ 1.414.
Rule 2: On the line or not — If d = 0 the point is on the line.
- Easy: (1, 2) on 2x + y − 4 = 0: |2 + 2 − 4| = 0, yes.
- Medium: (0, 0) to y = 3: here A = 0, d = 3.
- Exam-type: (5, 0) to x = 2: d = 3.
A point on the line has distance 0.
Forgetting the modulus or √(A² + B²) in the denominator.
Put the point in the line, divide by the root.
Practice questions
- 1Find the distance of (0, 0) from 3x + 4y − 15 = 0.
- 2Find the distance of (1, 2) from x + y − 7 = 0.
- 3Find the distance of (3, 4) from the x-axis.
- 4Find the distance of (2, 5) from 5x + 12y − 7 = 0.
- 5Find the distance of the origin from x/3 + y/4 = 1.
- 6Find k if the distance of (1, 1) from 3x + 4y + k = 0 is 1.
- 7Find the height of the triangle with A(1, 1), B(5, 1), C(3, 7) on base AB.
- 8Find the area of that triangle.
Show answers (try them yourself first)
- 115/5 = 3
- 24/√2 = 2√2 ≈ 2.828
- 34
- 4|10 + 60 − 7|/13 = 4.8462
- 54x + 3y = 12; d = 12/5 = 2.4
- 6|7 + k|/5 = 1 gives k = −2 or k = −12
- 7Line AB: y = 1; distance of C = 6
- 8(1/2)(4)(6) = 12 square units
Distance between parallel lines
Two rails of a track keep a constant gap. That gap is the distance between the parallel lines.
The distance between parallel lines Ax + By + C₁ = 0 and Ax + By + C₂ = 0 is |C₁ − C₂| / √(A² + B²). (Make the A and B the same in both equations first.)
Formula: d = |C₁ − C₂| / √(A² + B²)
Rule 1: Parallel lines — The same A and B; compare the constants.
- Easy: 3x + 4y − 5 = 0 and 3x + 4y + 5 = 0: d = 10/5 = 2.
- Medium: x + y = 1 and x + y = 5: d = 4/√2 = 2.828.
- Exam-type: 2x + 3y = 6 and 4x + 6y = 5 → 2x + 3y = 2.5: d = 3.5/√13 = 0.971.
Rule 2: Find the missing constant — Use the distance given.
- Easy: Lines 3x + 4y = 5 and 3x + 4y = c are 2 apart: |c − 5| = 10, c = 15 or −5.
- Medium: Line parallel to x + y = 0 at distance √2: x + y = ±2.
- Exam-type: Midline of 2x + y = 3 and 2x + y = 7 is 2x + y = 5.
The distance between two parallel lines is the distance of any point on one from the other.
Using the formula without making A and B equal in both lines.
Same A and B first, then subtract constants.
Practice questions
- 1Find the distance between 3x + 4y = 7 and 3x + 4y = 17.
- 2Find the distance between x + y = 3 and x + y = 5.
- 3Find the distance between y = 2x + 1 and y = 2x + 6.
- 4Find the distance between 2x + 3y = 4 and 4x + 6y = 20.
- 5Find the lines parallel to 3x + 4y = 5 at distance 2 from it.
- 6The two parallel sides of a rectangle lie along x + 2y = 3 and x + 2y = 13. Find the width.
- 7Find the distance between x = 2 and x = 7.
- 8Find the line midway between 3x + 4y = 4 and 3x + 4y = 14.
Show answers (try them yourself first)
- 110/5 = 2
- 22/√2 = √2
- 35/√5 = √5 ≈ 2.236
- 44x + 6y = 8 and 4x + 6y = 20: 12/√52 = 6/√13 ≈ 1.664
- 5|c − 5|/5 = 2 gives 3x + 4y = 15 or 3x + 4y = −5
- 610/√5 = 2√5 ≈ 4.472
- 75
- 83x + 4y = 9
Lines through a point: parallel and perpendicular
Given a street and a house, you may need the street through the house parallel to it, or the lane from the house meeting the street at right angles.
Parallel to Ax + By + C = 0 through (x₁, y₁): A(x − x₁) + B(y − y₁) = 0. Perpendicular to it through (x₁, y₁): B(x − x₁) − A(y − y₁) = 0.
Formula: parallel: A(x − x₁) + B(y − y₁) = 0
Rule 1: Parallel line — Keep A and B, change the constant.
- Easy: Through (2, 1), parallel to 3x + 4y = 7: 3(x − 2) + 4(y − 1) = 0, i.e. 3x + 4y = 10.
- Medium: Through (0, 0), parallel to x − 2y = 5: x − 2y = 0.
- Exam-type: Through (1, 3), parallel to y = 2x: y = 2x + 1.
Rule 2: Perpendicular line — Swap A and B and change one sign.
- Easy: Through (2, 1), perpendicular to 3x + 4y = 7: 4(x − 2) − 3(y − 1) = 0, i.e. 4x − 3y = 5.
- Medium: Through (0, 0), perpendicular to x + y = 4: x − y = 0.
- Exam-type: Foot of the perpendicular from the origin to x + y = 2 is (1, 1).
The perpendicular from a point to a line meets it at the foot; the distance formula gives its length.
Not changing the sign when you swap A and B.
Parallel keeps, perpendicular swaps and flips.
Practice questions
- 1Find the line through (1, 2) parallel to 2x + y = 5.
- 2Find the line through (1, 2) perpendicular to 2x + y = 5.
- 3Find the line through the origin perpendicular to 3x − 2y = 6.
- 4Find the foot of the perpendicular from (0, 0) to 3x + 4y = 25.
- 5Find the image of (0, 0) in the line x + y = 2.
- 6Find the line through (2, 3) perpendicular to the line joining (0, 0) and (4, 2).
- 7Find the foot of the perpendicular from (4, 3) to the x-axis and the distance.
- 8The line 2x + 3y = 6 meets the axes at A and B. Find the length of AB.
Show answers (try them yourself first)
- 12x + y = 4
- 2x − 2y = −3
- 32x + 3y = 0
- 4(3, 4)
- 5(2, 2)
- 6slope of OA = 1/2; perpendicular slope −2: y − 3 = −2(x − 2), i.e. 2x + y = 7
- 7Foot (4, 0), distance 3
- 8A(3, 0), B(0, 2): √13 ≈ 3.606