Chapter 12 ยท The Pythagorean theorem

Finding Distance Between Points and Fixing Errors

Use the Pythagorean theorem to find the distance between two points on the coordinate plane, then find and fix mistakes in distance work.

15 min read

The distance between two points is the length of the straight segment that joins them, so a distance is always nonnegative: positive or zero. On every grid in this lesson, the horizontal axis is the xx-axis, the vertical axis is the yy-axis, and each grid square is 11 unit on a side, so distances are measured in units.

When two points share one coordinate, the segment between them is horizontal or vertical, and its length is the difference of the other two coordinates, larger minus smaller. When the points differ in both coordinates, the segment is slanted and cuts across grid squares, so you cannot count units along it. Instead, draw a horizontal line through one point and a vertical line through the other, as in the next figure. Because one line is horizontal and the other is vertical, they meet at a right angle, so the two points and the corner where the lines meet form a right triangle. The slanted segment is its hypotenuse, the side opposite the right angle. Recall the Pythagorean theorem: in a right triangle with legs aa and bb, the two sides that form the right angle, and hypotenuse cc, a2+b2=c2a^2 + b^2 = c^2.

Coordinate grid from x -4 to 4 and y -3 to 5, with a grid step of 1, showing 6 plotted elements. Details: line 0 x plus 1 y equals -1; line 1 x plus 0 y equals 1; line 4 x plus -3 y equals -5; point at (-2, -1), named Point A; point at (1, 3), named Point B; point at (1, -1), named Point C.
Point A is at (โˆ’2,โˆ’1)(-2, -1), Point B is at (1,3)(1, 3) and the corner, Point C, is at (1,โˆ’1)(1, -1). The horizontal line is y=โˆ’1y = -1, the vertical line is x=1x = 1, and the slanted line passes through Points A and B.

Worked example

Example 1: Build the right triangle

Find the distance between Point A at (โˆ’2,โˆ’1)(-2, -1) and Point B at (1,3)(1, 3) in the figure.

  1. Point C at (1, โˆ’1) shares Point A's y-coordinate and Point B's x-coordinate, so it lies on the horizontal line y = โˆ’1 and on the vertical line x = 1. A horizontal line and a vertical line meet at a right angle, so the angle at Point C is a right angle. The equations tell you this; you do not judge it from the picture.

    C=(1,โˆ’1)C = (1, -1)
  2. The horizontal leg runs from Point A to Point C, so its length is the difference of their x-coordinates, larger minus smaller. Subtracting โˆ’2 is the same as adding 2.

    1โˆ’(โˆ’2)=1+2=31 - (-2) = 1 + 2 = 3
  3. The vertical leg runs from Point C up to Point B, so its length is the difference of their y-coordinates, larger minus smaller. Subtracting โˆ’1 is the same as adding 1.

    3โˆ’(โˆ’1)=3+1=43 - (-1) = 3 + 1 = 4
  4. The segment from Point A to Point B, the part of the slanted line between them, is opposite the right angle at Point C, so it is the hypotenuse. Call its length d and apply the Pythagorean theorem with legs 3 and 4.

    d2=32+42=9+16=25d^2 = 3^2 + 4^2 = 9 + 16 = 25
  5. Both 5 and โˆ’5 have a square of 25, but a distance cannot be negative, so d is the nonnegative square root of 25.

    d=25=5d = \sqrt{25} = 5

Answer

The distance between Point A and Point B is 55 units.

Key concept

Distance from coordinates

Call the points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2); the small 11 and 22 only tell the points apart. When the points differ in both coordinates, they are two corners of a right triangle with a horizontal leg โˆฃx2โˆ’x1โˆฃ|x_2 - x_1| units long and a vertical leg โˆฃy2โˆ’y1โˆฃ|y_2 - y_1| units long. The absolute value โˆฃx2โˆ’x1โˆฃ|x_2 - x_1| is the distance between x1x_1 and x2x_2 on a number line. By the Pythagorean theorem, the distance dd between the points, in units, is the nonnegative square root of the sum of the squares of the legs. A number and its opposite have the same square, so the formula needs no absolute value bars, and you can subtract in either order. If the points share one coordinate, one difference is 00 and the formula gives the horizontal or vertical distance.

d=(x2โˆ’x1)2+(y2โˆ’y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Worked example

Example 2: An exact root and a rounded value

Find the exact distance between P(โˆ’3,2)P(-3, 2) and Q(2,โˆ’1)Q(2, -1). Then round it to the nearest tenth of a unit.

  1. Use P as the first point and Q as the second, and subtract the coordinates of P from those of Q. Subtracting โˆ’3 means adding 3. The y-difference is negative, which is fine because the next step squares it.

    x2โˆ’x1=2โˆ’(โˆ’3)=5,y2โˆ’y1=โˆ’1โˆ’2=โˆ’3x_2 - x_1 = 2 - (-3) = 5, \quad y_2 - y_1 = -1 - 2 = -3
  2. Square each difference and add. The square of โˆ’3 is 9, the same as the square of 3, which is the length of the vertical leg.

    d2=52+(โˆ’3)2=25+9=34d^2 = 5^2 + (-3)^2 = 25 + 9 = 34
  3. Take the nonnegative square root, because a distance cannot be negative. 34 is not a perfect square (the square of a whole number), so its root is not a whole number. Keep the square root of 34 as the exact distance; any decimal for it will be an approximation.

    d=34d = \sqrt{34}
  4. To approximate, bound the root between nonnegative numbers; for nonnegative numbers, a larger square means a larger number. 34 is between 5ยฒ = 25 and 6ยฒ = 36, so the root is between 5 and 6. Squaring tenths narrows it to between 5.8 and 5.9.

    5.82=33.64<34<34.81=5.92,ย soย 5.8<34<5.95.8^2 = 33.64 < 34 < 34.81 = 5.9^2, \text{ so } 5.8 < \sqrt{34} < 5.9
  5. Square the midpoint of the bounds, 5.85, the number halfway between 5.8 and 5.9. Since 34 is less than 34.2225, the root is less than 5.85, so it is closer to 5.8 and rounds to 5.8.

    5.852=34.2225>34,ย soย 34โ‰ˆ5.85.85^2 = 34.2225 > 34, \text{ so } \sqrt{34} \approx 5.8

Answer

The exact distance between PP and QQ is 34\sqrt{34} units, which is about 5.85.8 units to the nearest tenth.

To find an error in distance work, check it one line at a time.

  • Differences: each one subtracts an xx-coordinate from an xx-coordinate or a yy-coordinate from a yy-coordinate, and subtracting a negative number is the same as adding its opposite.
  • Squares: a square is never negative, so (โˆ’8)2=64(-8)^2 = 64, not โˆ’64-64.
  • Root: the nonnegative square root is taken of the whole sum, as the last step.

Then check the size of the answer. When both legs are positive, the distance must be longer than the longer leg, because the hypotenuse is the longest side of a right triangle. It must also be shorter than the two legs added together, because the straight segment is shorter than the bent path along the legs. The next figure shows a classmate's problem on the same kind of grid: the xx-axis is horizontal, the yy-axis is vertical, and each grid square is 11 unit on a side.

Coordinate grid from x -6 to 4 and y -6 to 4, with a grid step of 1, showing 6 plotted elements. Details: line 0 x plus 1 y equals 3; line 1 x plus 0 y equals 2; line 4 x plus 3 y equals -7; point at (-4, 3), named Point D; point at (2, -5), named Point E; point at (2, 3), named Point F.
Point D is at (โˆ’4,3)(-4, 3), Point E is at (2,โˆ’5)(2, -5) and the corner, Point F, is at (2,3)(2, 3). The horizontal line is y=3y = 3, the vertical line is x=2x = 2, and the slanted line passes through Points D and E.

Worked example

Example 3: Find and correct an error

Sam found the distance between Point D at (โˆ’4,3)(-4, 3) and Point E at (2,โˆ’5)(2, -5) in the figure. Sam wrote 2โˆ’(โˆ’4)=โˆ’22 - (-4) = -2 and โˆ’5โˆ’3=โˆ’8-5 - 3 = -8, then d2=(โˆ’2)2+(โˆ’8)2=4+64=68d^2 = (-2)^2 + (-8)^2 = 4 + 64 = 68, so d=68โ‰ˆ8.2d = \sqrt{68} \approx 8.2 units. Find Sam's error and correct it.

  1. Check the x-difference. Subtracting โˆ’4 is the same as adding 4, so the difference is 6, not โˆ’2. This is Sam's error. The figure agrees: the horizontal leg runs from Point D at x = โˆ’4 to Point F at x = 2, which is 4 units to the y-axis plus 2 units past it.

    2โˆ’(โˆ’4)=2+4=62 - (-4) = 2 + 4 = 6
  2. Check the y-difference. Subtracting 3 from โˆ’5 gives โˆ’8, so this line is correct, and the vertical leg from Point F down to Point E is 8 units long.

    โˆ’5โˆ’3=โˆ’8-5 - 3 = -8
  3. Redo the sum of squares with the corrected x-difference. Neither square is negative, as expected.

    d2=62+(โˆ’8)2=36+64=100d^2 = 6^2 + (-8)^2 = 36 + 64 = 100
  4. Take the nonnegative square root, since a distance cannot be negative.

    d=100=10d = \sqrt{100} = 10
  5. Check the size. Both legs are positive, so the distance must be longer than the longer leg, 8, and shorter than the legs added together, 6 + 8 = 14. The answer 10 passes. Sam's 8.2 also falls between 8 and 14, so the size check alone could not catch this error; checking each line did.

    8<10<148 < 10 < 14

Answer

Sam computed 2โˆ’(โˆ’4)2 - (-4) as โˆ’2-2 instead of 66. The correct distance between Point D and Point E is 1010 units.

Takeaway: When two points differ in both coordinates, the segment joining them is the hypotenuse of a right triangle with a horizontal leg and a vertical leg. To find its length, square the coordinate differences, add them, and take the nonnegative square root. Keep that root as the exact distance, or round it by comparing the number under the root with the square of the midpoint of its nonnegative bounds. To correct distance work, check each difference, square and root one line at a time, then check the size of the answer. Next, you will use distances like these to find the perimeter of a figure on the coordinate plane and to solve distance word problems.