Pythago­ras in dis­guise

Find­ing the dis­tance between two points on a graph is really a right-tri­an­gle prob­lem wear­ing a cos­tume. In this les­son we pull the dis­tance for­mula straight out of Pythago­ras and then put it to work on the jobs it was made for: how far apart two points are, what kind of tri­an­gle three points make, whether three points sit on one line, and where a point must be to lie at a given dis­tance from another.

The for­mula

Take P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2). Going across from one to the other you move x2−x1x_2 - x_1, and going up you move y2−y1y_2 - y_1. Those two moves are the legs of a right tri­an­gle, and PQPQ is its hypotenuse. So

PQ=(x2−x1)2+(y2−y1)2PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Because we square the dif­fer­ences, their signs dis­ap­pear, so it makes no dif­fer­ence which point you call PP. The dis­tance of a point (x,y)(x, y) from the ori­gin is just the spe­cial case x2+y2\sqrt{x^2 + y^2}.

Exam­ple 1. Find the dis­tance between A(1,2)A(1, 2) and B(4,6)B(4, 6).

AB=(4−1)2+(6−2)2=9+16=5AB = \sqrt{(4 - 1)^2 + (6 - 2)^2} = \sqrt{9 + 16} = 5

Coordinate grid with A(1, 2) and B(4, 6) joined by a red segment AB = 5, and dashed legs of a right triangle: horizontal run 4 − 1 = 3 and vertical rise 6 − 2 = 4.
Exam­ple 1: the run and rise are the legs, AB is the hypotenuse

Exam­ple 2. How far is (−6,8)(-6, 8) from the ori­gin?

36+64=10\sqrt{36 + 64} = 10

Unless the ques­tion asks for a dec­i­mal, leave your answer as a sim­pli­fied surd. Write 50=52\sqrt{50} = 5\sqrt{2}, not 7.077.07.

What kind of tri­an­gle?

Work out all three sides first, then com­pare them.

Exam­ple 3. A(−1,1)A(-1, 1), B(3,1)B(3, 1), C(1,4)C(1, 4).

AB=16+0=4AB = \sqrt{16 + 0} = 4, BC=4+9=13BC = \sqrt{4 + 9} = \sqrt{13}, CA=4+9=13CA = \sqrt{4 + 9} = \sqrt{13}. Two sides are equal, so the tri­an­gle is isosce­les.

Triangle on a coordinate grid with vertices A(−1, 1), B(3, 1) and C(1, 4); base AB is marked 4 and the two sides BC and CA are each marked root 13.
Exam­ple 3: two equal sides make it isosce­les

Is there a right angle? Check whether the squares of the two shorter sides add up to the square of the longest. Here 13+13=26≠1613 + 13 = 26 \neq 16 and 13+16=29≠1313 + 16 = 29 \neq 13, so there isn't one.

Exam­ple 4. Show that A(1,2)A(1, 2), B(4,2)B(4, 2), C(4,5)C(4, 5), D(1,5)D(1, 5) form a square.

The four sides: AB=3AB = 3, BC=3BC = 3, CD=3CD = 3, DA=3DA = 3. The two diag­o­nals: AC=9+9=32AC = \sqrt{9 + 9} = 3\sqrt{2} and BD=9+9=32BD = \sqrt{9 + 9} = 3\sqrt{2}. Four equal sides and equal diag­o­nals make it a square. Be care­ful here: four equal sides by them­selves only prove a rhom­bus. It's the equal diag­o­nals that set­tle it.

Are three points collinear?

Three points lie on a sin­gle line exactly when the biggest of the three dis­tances equals the sum of the other two.

Exam­ple 5. P(1,1)P(1, 1), Q(3,5)Q(3, 5), R(5,9)R(5, 9).

PQ=4+16=20=25PQ = \sqrt{4 + 16} = \sqrt{20} = 2\sqrt{5}, QR=4+16=25QR = \sqrt{4 + 16} = 2\sqrt{5}, PR=16+64=80=45PR = \sqrt{16 + 64} = \sqrt{80} = 4\sqrt{5}. Since PQ+QR=PRPQ + QR = PR, the points are collinear, with QQ sit­ting between PP and RR.

Points P(1, 1), Q(3, 5) and R(5, 9) plotted on one straight line, with PQ and QR each marked 2 root 5 and the whole of PR marked 4 root 5.
Exam­ple 5: PQ + QR = PR, so the points are collinear

Find­ing a point from a dis­tance con­di­tion

Give the unknown point a let­ter, write the dis­tance equa­tion, and solve. Square both sides straight away to get rid of the root.

Exam­ple 6. Find the point on the xx-axis that is equally far from (1,−5)(1, -5) and (−3,3)(-3, 3).

Any point on the xx-axis looks like (x,0)(x, 0). Equal dis­tances mean equal squared dis­tances:

(x−1)2+25=(x+3)2+9(x - 1)^2 + 25 = (x + 3)^2 + 9
x2−2x+26=x2+6x+18⟹8=8x⟹x=1x^2 - 2x + 26 = x^2 + 6x + 18 \quad \Longrightarrow \quad 8 = 8x \quad \Longrightarrow \quad x = 1

So the point is (1,0)(1, 0). Check: 0+25=250 + 25 = 25 and 16+9=2516 + 9 = 25 ✓.

Exam­ple 7. Find yy if the dis­tance between (3,y)(3, y) and (−1,2)(-1, 2) is 55.

16+(y−2)2=25⟹(y−2)2=9⟹y=5 or y=−116 + (y - 2)^2 = 25 \quad \Longrightarrow \quad (y - 2)^2 = 9 \quad \Longrightarrow \quad y = 5 \text{ or } y = -1

You get two answers, and both are cor­rect. Pic­ture it: the cir­cle of radius 55 around (−1,2)(-1, 2) cuts the line x=3x = 3 in two places.

Circle of radius 5 centred at (−1, 2) and the vertical line x = 3, which the circle crosses at (3, 5) and (3, −1); both radii to these points are marked 5.
Exam­ple 7: two points on x = 3 at dis­tance 5

Prac­tice

  1. Find the dis­tance between (−3,4)(-3, 4) and (2,−8)(2, -8).
  2. How far is (5,−12)(5, -12) from the ori­gin?
  3. Show that (0,0)(0, 0), (4,0)(4, 0) and (2,23)(2, 2\sqrt{3}) are the ver­tices of an equi­lat­eral tri­an­gle.
  4. Find the point on the yy-axis that is equally far from (5,2)(5, 2) and (−3,4)(-3, 4).
  5. Are (2,−1)(2, -1), (3,4)(3, 4), (−2,3)(-2, 3), (−3,−2)(-3, -2) the ver­tices of a square, a rhom­bus, or nei­ther?
  6. Decide whether (1,2)(1, 2), (4,8)(4, 8) and (6,12)(6, 12) are collinear.

Answers

Show answers
  1. 25+144=13\sqrt{25 + 144} = 13.
  2. 25+144=13\sqrt{25 + 144} = 13.
  3. The sides are 16=4\sqrt{16} = 4, 4+12=4\sqrt{4 + 12} = 4 and 4+12=4\sqrt{4 + 12} = 4. All equal, so it's equi­lat­eral.
  4. Take the point as (0,y)(0, y). Then 25+(y−2)2=9+(y−4)225 + (y - 2)^2 = 9 + (y - 4)^2, so 29−4y=25−8y29 - 4y = 25 - 8y and y=−1y = -1. The point is (0,−1)(0, -1). Check: 25+9=34=9+2525 + 9 = 34 = 9 + 25 ✓.
  5. All four sides come to 26\sqrt{26}. For the diag­o­nals, (2,−1)(2, -1) to (−2,3)(-2, 3) is 32\sqrt{32}, while (3,4)(3, 4) to (−3,−2)(-3, -2) is 72\sqrt{72}. Equal sides but unequal diag­o­nals, so it's a rhom­bus, not a square.
  6. The dis­tances are 9+36=35\sqrt{9 + 36} = 3\sqrt{5}, 4+16=25\sqrt{4 + 16} = 2\sqrt{5} and 25+100=55\sqrt{25 + 100} = 5\sqrt{5}. Since 35+25=553\sqrt{5} + 2\sqrt{5} = 5\sqrt{5}, the points are collinear.