Skip to content

The distance of a point from a line; the positions of two lines

The distance of a point from a line; the positions of two lines

The distance between two objects

The distance between two geometric objects is the shortest distance between a point of one and a point of the other.

  • The distance of a point P\displaystyle P from a line is the length of the perpendicular PH\displaystyle PH from P\displaystyle P to the line: any other segment PQ\displaystyle PQ to the line is the hypotenuse of the right-angled triangle PHQ\displaystyle PHQ, so it is longer than PH\displaystyle PH.
  • The distance between two parallel lines is the distance of any point on one from the other – it is the same for every point.

In grade 10 we found PH\displaystyle PH in three steps: the perpendicular’s equation, the meeting point H\displaystyle H, and the distance PH\displaystyle PH. One formula does all three together.

The formula for a point’s distance from a line
The formula needs the line in implicit form. y=2x\displaystyle {y}={2x} is written 2x−y=0\displaystyle {2x-y}={0}: A=2\displaystyle {A}={2}, B=−1\displaystyle {B}={-1}, C=0\displaystyle {C}={0}.

The distance of the point (x0,y0)\displaystyle (x_0,y_0) from the line Ax+By+C=0\displaystyle {Ax+By+C}={0}:

d\displaystyle d =\displaystyle = ∣Ax0+By0+C∣A2+B2\displaystyle \frac{|Ax_0+By_0+C|}{\sqrt{A^{2}+B^{2}}}
  • In the numerator the point is put into the left side of the line’s equation. A point on the line gives 0\displaystyle 0 – a distance of 0\displaystyle 0.
  • The absolute value – because a distance is never negative.

An example: the point K(3,1)\displaystyle K(3,1) and the line y=2x\displaystyle {y}={2x}, that is 2x−y=0\displaystyle {2x-y}={0}:

d=∣2⋅3−1⋅1+0∣22+(−1)2=55=5d=\frac{|2\cdot3-1\cdot1+0|}{\sqrt{2^{2}+(-1)^{2}}}=\frac{5}{\sqrt{5}}=\sqrt{5}

This is the distance grade 10 found in three steps: the perpendicular meets the line at H(1,2)\displaystyle H(1,2), and KH=5\displaystyle {KH}={\sqrt{5}}.

2x−y=0\displaystyle 2x-y=0
y=−12x+52\displaystyle y=-\frac{1}{2}x+\frac{5}{2}
K=(3,1)\displaystyle K=(3,1)
H=(1,2)\displaystyle H=(1,2)
The distance between parallel lines

When the lines are written with the same A\displaystyle A and B\displaystyle B, Ax+By+C1=0\displaystyle {Ax+By+C_1}={0} and Ax+By+C2=0\displaystyle {Ax+By+C_2}={0}, the distance between them is:

d\displaystyle d =\displaystyle = ∣C1−C2∣A2+B2\displaystyle \frac{|C_1-C_2|}{\sqrt{A^{2}+B^{2}}}

An example: 3x−4y+5=0\displaystyle {3x-4y+5}={0} and 6x−8y−15=0\displaystyle {6x-8y-15}={0}.

  • We divide the second equation by 2\displaystyle 2 to get the same A\displaystyle A and B\displaystyle B: 3x−4y−7.5=0\displaystyle {3x-4y-7.5}={0}.
  • d=∣5−(−7.5)∣32+42=12.55=2.5\displaystyle {d}={\frac{|5-(-7.5)|}{\sqrt{3^{2}+4^{2}}}}={\frac{12.5}{5}}={2.5}.
The positions of two lines

Two lines in the plane have three positions, and the number of solutions of the system of their equations tells them apart:

  • crossing – different slopes; the system has one solution, the meeting point.
  • parallel – the same slope, different lines; the system has no solution (an equality like 0=7\displaystyle {0}={7} appears).
  • coinciding – the same line in two equations, such as x+2y=4\displaystyle {x+2y}={4} and 2x+4y=8\displaystyle {2x+4y}={8}; the system has infinitely many solutions (0=0\displaystyle {0}={0} appears).
Exercise 1

Work out the distance of the point P(2,−1)\displaystyle P(2,-1) from the line 3x+4y−12=0\displaystyle {3x+4y-12}={0}.

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

    Exercise 2
    First write the line in implicit form. Write the result with no root in the denominator.

    Work out the distance of the point P(1,5)\displaystyle P(1,5) from the line y=2x−3\displaystyle {y}={2x-3}.

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

      Exercise 3

      Work out the distance between the parallel lines x−2y+3=0\displaystyle {x-2y+3}={0} and 2x−4y−14=0\displaystyle {2x-4y-14}={0}.

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

        Exercise 4

        Solve each system, and say how the two lines lie.

        a
          b
            c

              How each pair of lines lies:

              Exercise 5
              Write an equation in k\displaystyle k from the distance formula. An absolute value gives two possibilities.

              The distance of the point (k,1)\displaystyle (k,1) from the line 4x+3y−7=0\displaystyle {4x+3y-7}={0} is 2\displaystyle 2.
              Find k\displaystyle k.