• Foundation
  • About 18 min
  • 5 practice questions

Distance of a point from a line and between parallel lines

Derive the perpendicular distance |Ax₁ + By₁ + C|/√(A² + B²), find the distance between parallel lines, and solve problems on intersection and concurrency of lines.

If something looks wrong, please tell us.

How far is a village from a straight highway? The useful answer is the shortest distance, which is measured along the perpendicular from the point to the line. This lesson finds a formula for that distance, extends it to two parallel lines, and ends with intersecting and concurrent lines.

Deriving the distance formula

Let L: Ax + By + C = 0 (with A, B ≠ 0) and P(x₁, y₁) be a point. Let PM be the perpendicular from P to L, so d = PM. Suppose L meets the x-axis at Q and the y-axis at R. Putting y = 0 gives Q(−C/A, 0) and putting x = 0 gives R(0, −C/B).

  1. Area of triangle PQR = ½ × QR × PM, so PM = 2 × area(PQR)/QR.
  2. By the area formula, 2 × area(PQR) = |x₁(0 + C/B) + (−C/A)(−C/B − y₁) + 0(y₁ − 0)| = |C/(AB)| × |Ax₁ + By₁ + C|.
  3. QR = √[(C/A)² + (C/B)²] = |C/(AB)| × √(A² + B²).
  4. Divide: PM = |Ax₁ + By₁ + C| / √(A² + B²).

Distance of (x₁, y₁) from Ax + By + C = 0: d = |Ax₁ + By₁ + C| / √(A² + B²).

Using the distance formula

  1. Write the line as Ax + By + C = 0 Move every term to one side first.
  2. Substitute the point Work out Ax₁ + By₁ + C.
  3. Take the absolute value Distance is never negative.
  4. Divide by √(A² + B²) This is the length of the vector (A, B).

Worked example 1

Find the distance of (2, −1) from 3x + 4y + 8 = 0. d = |3(2) + 4(−1) + 8| / √(9 + 16) = |6 − 4 + 8| / 5 = 10/5 = 2 units.

Worked example 2: from the origin

Distance of the origin from 5x − 12y + 26 = 0 is |0 − 0 + 26| / √(25 + 144) = 26/13 = 2 units. For the origin, the formula reduces to |C|/√(A² + B²).

Worked example 3: points on an axis at a given distance

Find the points on the x-axis at distance 3 from 3x − 4y + 6 = 0. Let the point be (a, 0): |3a + 6|/5 = 3, so 3a + 6 = 15 or 3a + 6 = −15. Hence a = 3 or a = −7: (3, 0) and (−7, 0). The absolute value always produces two candidates; one lies on each side of the line.

Distance between two parallel lines

Parallel lines have the same slope, so write them y = mx + c₁ and y = mx + c₂. Line 1 meets the x-axis at A(−c₁/m, 0). The gap between the lines is the distance of A from line 2, written mx − y + c₂ = 0: d = |m(−c₁/m) − 0 + c₂| / √(m² + 1) = |c₁ − c₂| / √(1 + m²).

Parallel lines y = mx + c₁ and y = mx + c₂: d = |c₁ − c₂| / √(1 + m²). In general form Ax + By + C₁ = 0 and Ax + By + C₂ = 0: d = |C₁ − C₂| / √(A² + B²).

The general-form version needs the same A and B in both equations; scale one equation first if necessary.

Worked example 4

Find the distance between 3x + 4y − 7 = 0 and 6x + 8y + 1 = 0. Divide the second by 2: 3x + 4y + 1/2 = 0. Now A = 3, B = 4, C₁ = −7, C₂ = 1/2: d = |−7 − 1/2| / 5 = (15/2)/5 = 3/2 units. Using the second equation without scaling would give a wrong answer.

Intersection and concurrent lines

Two non-parallel lines meet at one point, found by solving their equations together. Three lines are concurrent if they pass through one common point: find where two of them meet and check that the point satisfies the third.

Worked example 5

For what k are 2x + y − 5 = 0, x − y − 1 = 0 and 3x + ky − 8 = 0 concurrent? Adding the first two: 3x − 6 = 0, so x = 2 and then y = 1. The third line must pass through (2, 1): 6 + k − 8 = 0, so k = 2.

Worked example 6: distance along a given direction

Find the distance of the line x + y = 6 from P(1, 1), measured along the line of slope 1 through P. That line is y − 1 = x − 1, that is y = x. It meets x + y = 6 at (3, 3). The required distance is the length from (1, 1) to (3, 3): √(4 + 4) = 2√2 units. Here the direction is perpendicular to x + y = 6, so the answer equals the perpendicular distance |1 + 1 − 6|/√2 = 4/√2 = 2√2, a good check.

Key takeaways

  • Perpendicular distance: d = |Ax₁ + By₁ + C|/√(A² + B²).
  • Parallel lines: d = |C₁ − C₂|/√(A² + B²) once A and B match.
  • Concurrency: the meeting point of two lines satisfies the third.
  • Distance along a direction: find the meeting point, then use the distance formula.

Check your understanding

  1. 1. What is the distance of the point (1, 2) from the line 4x − 3y + 12 = 0?

    1. 2
    2. 2.4
    3. 3
    4. 10
    Show answer

    Answer: A. d = |4(1) − 3(2) + 12| / √(16 + 9) = |4 − 6 + 12| / 5 = 10/5 = 2.

  2. 2. What is the distance between the parallel lines 5x + 12y − 10 = 0 and 5x + 12y + 16 = 0?

    1. 1
    2. 2
    3. 6/13
    4. 26
    Show answer

    Answer: B. Same A and B, so d = |−10 − 16| / √(25 + 144) = 26/13 = 2.

  3. 3. What is the distance between the lines x + 2y − 3 = 0 and 2x + 4y + 4 = 0?

    1. 7/√5
    2. 1/√5
    3. √5
    4. 7/(2√5)
    Show answer

    Answer: C. Scale the second: x + 2y + 2 = 0. Then d = |−3 − 2|/√(1 + 4) = 5/√5 = √5.

  4. 4. For what value of p are the lines x + y − 3 = 0, 2x − y = 0 and px + 2y − 5 = 0 concurrent?

    1. 1
    2. 2
    3. −1
    4. 3
    Show answer

    Answer: A. From the first two: x + 2x = 3, so x = 1 and y = 2. The third must pass through (1, 2): p + 4 − 5 = 0, so p = 1.

  5. 5. Assertion (A): The formula |C₁ − C₂|/√(A² + B²) gives the distance between 2x + y + 1 = 0 and 4x + 2y + 6 = 0 as 5/√5 = √5. Reason (R): The formula needs both equations to have the same A and B.

    1. Both A and R are true, and R is the correct explanation of A
    2. Both A and R are true, but R is not the correct explanation of A
    3. A is true, but R is false
    4. A is false, but R is true
    Show answer

    Answer: D. R is true. A is false: substituting directly ignores R. Scaling the second line to 2x + y + 3 = 0 gives d = |1 − 3|/√5 = 2/√5, not √5.

Sign in to keep track of the lessons you finish.

Next lesson → Final self-assessment: Straight Lines

Privacy · Terms · Refunds · Delivery