Chapter 1 ยท Tools of Geometry

Distance on a Number Line and in the Plane

Find exact distances between points, first on a number line and then in the coordinate plane, using coordinates instead of a drawing.

18 min read

How far apart are two points? The distance between two points is the length of the segment that joins them. A distance is never negative, and it equals 00 only when the two points are the same point.

In this lesson, you find distances exactly from coordinates, the numbers that give a point's position. You start on a number line and then move to the coordinate plane. Every value comes from the stated coordinates, never from how a drawing looks.

Start with what distance means on a number line. The number line below shows Point A at coordinate โˆ’3-3 and Point B at coordinate 55. You write ABAB for the distance between them. To get from Point A to Point B, you move 33 unit steps to reach 00, then 55 more unit steps to reach 55. That is 3+5=83 + 5 = 8 unit steps, so AB=8AB = 8.

Number line from -5 to 7, with a step of 1, showing 2 marked points. Markers: marker at -3, named Point A; marker at 5, named Point B.
Point A is at โˆ’3-3 and Point B is at 55, so 88 unit steps separate them.

Counting steps gets hard when coordinates are fractions, so you need a rule. The Ruler Postulate gives it. A postulate is a statement accepted without proof. This one says that the points on a line can be paired one-to-one with the real numbers, where each point's number is its coordinate. It also says that the distance between two points is the absolute value of the difference of their coordinates. The absolute value of a number is the number itself if it is nonnegative, and its opposite if it is negative, so it is never negative.

Why use absolute value? The two orders of subtraction give opposite numbers. For Points A and B, 5โˆ’(โˆ’3)=85 - (-3) = 8 and โˆ’3โˆ’5=โˆ’8-3 - 5 = -8. The absolute value of each is 88, which matches your count. So either order gives the distance. In general, if point AA has coordinate aa and point BB has coordinate bb, where aa and bb are any real numbers, then:

AB=โˆฃbโˆ’aโˆฃ=โˆฃaโˆ’bโˆฃAB = |b - a| = |a - b|

Worked example

Two negative coordinates

On a number line, point CC has coordinate โˆ’7-7 and point DD has coordinate โˆ’2-2. Find CDCD.

  1. Apply the Ruler Postulate: the distance is the absolute value of the difference of the coordinates. Substitute the coordinates of D and C.

    CD=โˆฃโˆ’2โˆ’(โˆ’7)โˆฃCD = |-2 - (-7)|
  2. Subtracting a number is the same as adding its opposite, so subtracting negative 7 means adding 7.

    CD=โˆฃโˆ’2+7โˆฃ=โˆฃ5โˆฃCD = |-2 + 7| = |5|
  3. Take the absolute value. The absolute value of a positive number is the number itself.

    CD=5CD = 5
  4. Check with the other order of subtraction. It gives the same distance. The distance is also positive, as it must be for two different points.

    โˆฃโˆ’7โˆ’(โˆ’2)โˆฃ=โˆฃโˆ’7+2โˆฃ=โˆฃโˆ’5โˆฃ=5|-7 - (-2)| = |-7 + 2| = |-5| = 5

Answer

The distance between CC and DD is 55 units, so CD=5CD = 5.

Worked example

Fraction coordinates

On a number line, point EE has coordinate โˆ’32-\frac{3}{2} and point FF has coordinate 54\frac{5}{4}. Find EFEF exactly.

  1. Apply the Ruler Postulate and substitute the coordinates of F and E.

    EF=โˆฃ54โˆ’(โˆ’32)โˆฃEF = \left|\frac{5}{4} - \left(-\frac{3}{2}\right)\right|
  2. Subtracting a number is the same as adding its opposite.

    EF=โˆฃ54+32โˆฃEF = \left|\frac{5}{4} + \frac{3}{2}\right|
  3. Rewrite 3/2 as 6/4 so both fractions have denominator 4, then add the numerators. Keep the fraction so the answer stays exact.

    EF=โˆฃ54+64โˆฃ=โˆฃ114โˆฃEF = \left|\frac{5}{4} + \frac{6}{4}\right| = \left|\frac{11}{4}\right|
  4. Take the absolute value. The result is positive, as a distance between two different points must be.

    EF=114EF = \frac{11}{4}

Answer

The exact distance between EE and FF is 114\frac{11}{4} units.

Now move to the coordinate plane. It is built from a horizontal number line, the xx-axis, and a vertical number line, the yy-axis. The axes are perpendicular, meaning they meet at right angles, and they use the same unit. Each point has an ordered pair of coordinates (x,y)(x, y).

Take P(1,1)P(1, 1) and Q(5,4)Q(5, 4). They differ in both coordinates, so neither the xx-values nor the yy-values alone work as number-line coordinates for segment PQPQ. Instead, add a third point, R(5,1)R(5, 1). It shares its yy-coordinate with PP, so segment PRPR is horizontal. It shares its xx-coordinate with QQ, so segment RQRQ is vertical. Because the axes are perpendicular, every horizontal line is perpendicular to every vertical line. So the angle at RR is a right angle, and triangle PRQPRQ is a right triangle, a triangle with a right angle. You know this from the coordinates, not from how the figure looks.

The figure below marks the three points and labels each with its coordinates. It does not draw the segments, so sketch them yourself to see the triangle.

Coordinate grid from x 0 to 6 and y 0 to 6, with a grid step of 1, showing 3 plotted elements. Details: point at (1, 1), named (1, 1); point at (5, 4), named (5, 4); point at (5, 1), named (5, 1).
PP is at (1,1)(1, 1), QQ is at (5,4)(5, 4), and the added point RR is at (5,1)(5, 1).

Now find the side lengths. Segment PRPR lies on a horizontal line, where the xx-values act as number-line coordinates. By the Ruler Postulate, PR=โˆฃ5โˆ’1โˆฃ=4PR = |5 - 1| = 4. Segment RQRQ lies on a vertical line, where the yy-values act as number-line coordinates, so RQ=โˆฃ4โˆ’1โˆฃ=3RQ = |4 - 1| = 3.

The Pythagorean Theorem says: if a triangle is a right triangle with legs (the two sides that form the right angle) of lengths aa and bb and hypotenuse (the side opposite the right angle) of length cc, then a2+b2=c2a^2 + b^2 = c^2. You use this direction, not the converse, which swaps the if and then parts: you know the angle at RR is right, and you conclude a fact about the lengths. Segment PQPQ is the hypotenuse, so PQ2=42+32=16+9=25PQ^2 = 4^2 + 3^2 = 16 + 9 = 25.

The equation PQ2=25PQ^2 = 25 has two solutions for PQPQ: the positive root 25=5\sqrt{25} = 5 and the negative root โˆ’25=โˆ’5-\sqrt{25} = -5. A distance cannot be negative, so PQ=5PQ = 5.

The same reasoning works for any two points that differ in both coordinates.

Given: points P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2) with x1โ‰ x2x_1 \ne x_2 and y1โ‰ y2y_1 \ne y_2.

To show: PQ=(x2โˆ’x1)2+(y2โˆ’y1)2PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.

Let RR be the point (x2,y1)(x_2, y_1). Segment PRPR is horizontal because PP and RR share the yy-coordinate y1y_1, and segment RQRQ is vertical because RR and QQ share the xx-coordinate x2x_2. Because the axes are perpendicular, the angle at RR is a right angle. By the Ruler Postulate, PR=โˆฃx2โˆ’x1โˆฃPR = |x_2 - x_1| and RQ=โˆฃy2โˆ’y1โˆฃRQ = |y_2 - y_1|. By the Pythagorean Theorem, PQ2=โˆฃx2โˆ’x1โˆฃ2+โˆฃy2โˆ’y1โˆฃ2PQ^2 = |x_2 - x_1|^2 + |y_2 - y_1|^2. A real number and its absolute value have the same square, so PQ2=(x2โˆ’x1)2+(y2โˆ’y1)2PQ^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2. This sum is positive, so the equation has two solutions for PQPQ, the positive and the negative root. A distance cannot be negative, so PQPQ is the positive root, the one the square root symbol names.

Key concept

Distance comes from coordinate differences

On a number line, the distance between two points is the absolute value of the difference of their coordinates, by the Ruler Postulate. In the coordinate plane, the Distance Formula below gives the distance between any two points P(x1,y1)P(x_1, y_1) and Q(x2,y2)Q(x_2, y_2). Its radicand, the expression under the root symbol, is a sum of squares, so it is never negative, and the root symbol names the nonnegative root. Use the stated coordinates, never the look of a figure. Keep answers exact, with fractions exact and radicals simplified, and label any decimal as an approximation.

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

Worked example

Negative coordinates and a radical

Find the exact distance between J(โˆ’2,3)J(-2, 3) and K(4,โˆ’1)K(4, -1).

  1. Use the Distance Formula, with J as the first point and K as the second. Either order works, because reversing a difference changes only its sign, and its square stays the same.

    JK=(4โˆ’(โˆ’2))2+(โˆ’1โˆ’3)2JK = \sqrt{(4 - (-2))^2 + (-1 - 3)^2}
  2. Subtract inside each set of parentheses. Subtracting negative 2 is the same as adding 2.

    JK=62+(โˆ’4)2JK = \sqrt{6^2 + (-4)^2}
  3. Square each difference, then add. A negative number times itself is positive, so the square of negative 4 is positive 16. The radicand, 52, is positive, so its square root is a real number.

    JK=36+16=52JK = \sqrt{36 + 16} = \sqrt{52}
  4. Simplify the radical by factoring out the perfect square 4. The product property of radicals applies because 4 and 13 are nonnegative.

    JK=4โ‹…13=4โ‹…13=213JK = \sqrt{4 \cdot 13} = \sqrt{4} \cdot \sqrt{13} = 2\sqrt{13}
  5. Check the result. It is positive, as a distance between two different points must be. Also, 13 has no perfect-square factor greater than 1, so the radical is fully simplified.

Answer

The exact distance between JJ and KK is 2132\sqrt{13} units, which is approximately 7.217.21 units.

Worked example

A fraction coordinate in the plane

Find the exact distance between M(12,โˆ’1)M\left(\frac{1}{2}, -1\right) and N(3,2)N(3, 2).

  1. Substitute into the Distance Formula, with M first and N second.

    MN=(3โˆ’12)2+(2โˆ’(โˆ’1))2MN = \sqrt{\left(3 - \frac{1}{2}\right)^2 + (2 - (-1))^2}
  2. Subtract inside each set of parentheses. Write 3 as 6/2 to subtract the fraction. Subtracting negative 1 means adding 1, so the second difference is 3.

    MN=(62โˆ’12)2+32=(52)2+32MN = \sqrt{\left(\frac{6}{2} - \frac{1}{2}\right)^2 + 3^2} = \sqrt{\left(\frac{5}{2}\right)^2 + 3^2}
  3. Square each difference. Then write 9 as 36/4 so you can add the fractions.

    MN=254+9=254+364=614MN = \sqrt{\frac{25}{4} + 9} = \sqrt{\frac{25}{4} + \frac{36}{4}} = \sqrt{\frac{61}{4}}
  4. Use the quotient property of radicals, which applies because 61 is nonnegative and 4 is positive. The square root of 4 is 2.

    MN=614=612MN = \frac{\sqrt{61}}{\sqrt{4}} = \frac{\sqrt{61}}{2}
  5. Check: 61 has no perfect-square factor greater than 1, so the radical is simplified. The result is positive, as a distance between two different points must be.

Answer

The exact distance between MM and NN is 612\frac{\sqrt{61}}{2} units, which is approximately 3.913.91 units.

Distance comes from differences in coordinates. On a number line, take the absolute value of the difference. In the coordinate plane, use the Distance Formula, which combines the horizontal and vertical differences through the Pythagorean Theorem. Keep your answer exact and check that it makes sense as a distance: positive for two different points. Next, you use coordinates to find the midpoint of a segment, and to find an endpoint when you know the midpoint.