Pythagoras on a coordinate grid. The formula, distance from the origin, deciding what kind of triangle three points make, testing three points for collinearity, and finding a point from a distance condition, with the check that catches sign errors.
Lesson 1 of 3
4 min read
6 practice questions
Pythagoras in disguise
Finding the distance between two points on a graph is really a right-triangle problem wearing a costume. In this lesson we pull the distance formula straight out of Pythagoras and then put it to work on the jobs it was made for: how far apart two points are, what kind of triangle three points make, whether three points sit on one line, and where a point must be to lie at a given distance from another.
The formula
Take P(x1,y1) and Q(x2,y2). Going across from one to the other you move x2−x1, and going up you move y2−y1. Those two moves are the legs of a right triangle, and PQ is its hypotenuse. So
PQ=(x2−x1)2+(y2−y1)2
Because we square the differences, their signs disappear, so it makes no difference which point you call P. The distance of a point (x,y) from the origin is just the special case x2+y2.
Example 1. Find the distance between A(1,2) and B(4,6).
AB=(4−1)2+(6−2)2=9+16=5
Example 1: the run and rise are the legs, AB is the hypotenuse
Example 2. How far is (−6,8) from the origin?
36+64=10
Unless the question asks for a decimal, leave your answer as a simplified surd. Write 50=52, not 7.07.
What kind of triangle?
Work out all three sides first, then compare them.
Example 3.A(−1,1), B(3,1), C(1,4).
AB=16+0=4, BC=4+9=13, CA=4+9=13. Two sides are equal, so the triangle is isosceles.
Example 3: two equal sides make it isosceles
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=16 and 13+16=29=13, so there isn't one.
Example 4. Show that A(1,2), B(4,2), C(4,5), D(1,5) form a square.
The four sides: AB=3, BC=3, CD=3, DA=3. The two diagonals: AC=9+9=32 and BD=9+9=32. Four equal sides and equal diagonals make it a square. Be careful here: four equal sides by themselves only prove a rhombus. It's the equal diagonals that settle it.
Are three points collinear?
Three points lie on a single line exactly when the biggest of the three distances equals the sum of the other two.
Example 5.P(1,1), Q(3,5), R(5,9).
PQ=4+16=20=25, QR=4+16=25, PR=16+64=80=45. Since PQ+QR=PR, the points are collinear, with Q sitting between P and R.
Example 5: PQ + QR = PR, so the points are collinear
Finding a point from a distance condition
Give the unknown point a letter, write the distance equation, and solve. Square both sides straight away to get rid of the root.
Example 6. Find the point on the x-axis that is equally far from (1,−5) and (−3,3).
Any point on the x-axis looks like (x,0). Equal distances mean equal squared distances:
(x−1)2+25=(x+3)2+9 x2−2x+26=x2+6x+18⟹8=8x⟹x=1
So the point is (1,0). Check: 0+25=25 and 16+9=25 ✓.
Example 7. Find y if the distance between (3,y) and (−1,2) is 5.
16+(y−2)2=25⟹(y−2)2=9⟹y=5 or y=−1
You get two answers, and both are correct. Picture it: the circle of radius 5 around (−1,2) cuts the line x=3 in two places.
Example 7: two points on x = 3 at distance 5
Practice
Find the distance between (−3,4) and (2,−8).
How far is (5,−12) from the origin?
Show that (0,0), (4,0) and (2,23) are the vertices of an equilateral triangle.
Find the point on the y-axis that is equally far from (5,2) and (−3,4).
Are (2,−1), (3,4), (−2,3), (−3,−2) the vertices of a square, a rhombus, or neither?
Decide whether (1,2), (4,8) and (6,12) are collinear.
Answers
Show answers
25+144=13.
25+144=13.
The sides are 16=4, 4+12=4 and 4+12=4. All equal, so it's equilateral.
Take the point as (0,y). Then 25+(y−2)2=9+(y−4)2, so 29−4y=25−8y and y=−1. The point is (0,−1). Check: 25+9=34=9+25 ✓.
All four sides come to 26. For the diagonals, (2,−1) to (−2,3) is 32, while (3,4) to (−3,−2) is 72. Equal sides but unequal diagonals, so it's a rhombus, not a square.
The distances are 9+36=35, 4+16=25 and 25+100=55. Since 35+25=55, the points are collinear.
Test yourself
The Distance Formula, Quiz
Five questions on the distance formula. Pick one answer for each.