Distance on a number line
Two points on a line are named by numbers, and one of the numbers is negative. How far apart are the points?
Where you are 4 in Segments, rays and length
When you reach for it
A ruler already measures by subtracting. A pencil lying from the 3 cm mark to the 11 cm mark is 11 - 3 = 8 cm long, and you never needed its end to sit at zero. A number line is a ruler that carries on past zero to the left, so every point on it has a number, its coordinate, and the length of a segment should come from the coordinates of its two ends in the same way.
It does, but negative coordinates raise two questions the ruler never did. Which of -8 and -3 is the larger one to subtract from? And what does subtracting a negative number measure? This skill answers both with one rule that works for any two points, in either order, on either side of zero.
Reach for it whenever two positions are measured from the same zero: temperatures above and below freezing, heights above and below sea level, a bank balance before and after it went overdrawn, and the coordinates of points along a line in geometry. Every distance in coordinate geometry starts here.
The procedure
Name two points A and B on a number line, with coordinates a and b. The distance between them, written AB, is the length of the segment joining them: the number of units you cover walking from one to the other. A distance is a length, so it is never negative.
When both points are to the right of zero, subtract. Put A at 2 and B at 9. B is 9 units from zero and A is 2 units from zero, in the same direction. The first 2 of those 9 units are shared, so what separates the points is the rest: 9 - 2 = 7. Counting the spaces between the marks gives the same 7.
Across zero, subtraction still counts every unit. Now put A at -4 and B at 7.
Walking from A to B, you cover 4 units to reach zero, which is |{-4}|, and then 7 more, so AB = 4 + 7 = 11. The subtraction 7 - (-4) finds the same number, because subtracting a negative is adding its opposite:
The +4 in that line is exactly the stretch to the left of zero. So “larger coordinate minus smaller coordinate” works across zero as well, with no special case.
Subtracting in the other order gives the opposite number. -4 - 7 = -11. The size, 11, is right, and the sign reports a direction: going from 7 back to -4 means moving left. A distance has no direction, so the sign is thrown away, and absolute value is the operation that throws it away. That gives one rule that does not care which point you start from:
The two forms always agree, because b - a and a - b are opposites, and a number and its opposite have the same absolute value. If you already know which coordinate is larger, larger minus smaller is never negative and the bars change nothing. The bars are there so that you do not have to know.
To find the distance between -6 and -1, then:
Subtract the coordinates, in either order. -1 - (-6) = -1 + 6 = 5.
Take the absolute value. |5| = 5. Had you subtracted the other way, -6 - (-1) = -5, and |{-5}| = 5 as well.
Check by counting. From -6 to -1 is five steps to the right. The points are 5 units apart.
Worked examples
Two points on opposite sides of zero
Point C is at -6 and point D is at 3. Find CD.
SolutionSubtract the coordinates and take the absolute value:
Subtracting the other way round gives the same distance, which is a useful check on the signs:
Check. C is 6 units left of zero and D is 3 units right of it, and 6 + 3 = 9.
Both points negative
Point P is at -8.4 and point Q is at -2.9. Find PQ.
SolutionHere adding the two distances to zero, 8.4 + 2.9 = 11.3, would be wrong. Both points are left of zero, so walking from P to zero passes Q on the way, and the stretch from Q to zero would be counted twice. Subtraction removes that shared stretch automatically: 8.4 - 2.9 = 5.5.
Fractions and mixed numbers
Point M is at \displaystyle -1\frac{3}{4} and point N is at \displaystyle \frac{2}{3}. Find MN.
SolutionWrite the mixed number as an improper fraction, \displaystyle -1\frac{3}{4} = -\frac{7}{4}, then subtract. Subtracting \displaystyle -\frac{7}{4} adds \displaystyle \frac{7}{4}, and a common denominator of 12 makes the addition possible:
The points are \displaystyle 2\frac{5}{12} units apart. A quick estimate agrees: M is a little under 2 units left of zero and N is a little under 1 unit right of it, so the answer should be a little under 3.
Above and below sea level
A diver is 18.5 meters below the surface of the sea, and a gull is flying 12.25 meters above the surface, directly over her. How far apart are they?
SolutionMeasure heights from sea level, with up as positive. The diver is at -18.5 and the gull is at 12.25. Both are on one vertical line, which works as a number line:
They are 30.75 meters apart. Choosing up as positive was a free choice: with down as positive the coordinates would be 18.5 and -12.25, and the distance would still be 30.75, because distance does not depend on which way the line is numbered.
A point at a given distance
Point A is at -3. Point B is 5.5 units from A. Where can B be?
SolutionCall B’s coordinate b. The distance condition says
Two numbers have absolute value 5.5, namely 5.5 and -5.5, so b + 3 is one of them:
So B is at 2.5 or at -8.5. Both work: |2.5 - (-3)| = 5.5, and |{-8.5} - (-3)| = |{-5.5}| = 5.5. A distance says how far but not which way, so from any point there are exactly two points at a given positive distance, one on each side.
Deciding which point is closer
Which is closer to -1: the point at -5.2 or the point at 3.1?
Solution“Closer” means a smaller distance, so find both distances from -1 and compare them:
The point at 3.1 is closer, by 0.1 of a unit.
Neither the sizes of the numbers nor their signs settle this question on their own. 3.1 is on the far side of zero from -1, and it still wins, because distance is measured from -1, not from zero.
Boundaries
Both points must be on the same line, numbered from the same zero in the same unit. Two points of a plane that do not share a line have no single coordinate to subtract. When they do lie on a horizontal or vertical line of a grid, that line is a number line and this skill applies; otherwise the distance formula is needed.
Count units, not tick marks. If a line is marked every 5, the points at 10 and 35 are 25 units apart, even though only 5 gaps between marks separate them. The coordinates carry the unit; the marks are only there to help you read them.
Distance has no direction. The plain difference b - a, without the bars, is a different and also useful number: it says how far and which way, so a temperature going from -13^\circ to 8^\circ rose by {8 - (-13) = 21} degrees, and going back it fell, a change of -21. That signed difference belongs to directed segments. A distance only ever answers “how far”.
The scale needs a real zero. The calendar has no year zero: 1 BC is followed directly by AD 1. So from 5 BC to AD 5 is 9 years, not the 10 that treating 5 BC as -5 would give. Subtraction measures distance only on a line where every unit between the points is actually there.
A distance is 0 only for one point. |a - b| = 0 exactly when a = b. Two different points are always some positive distance apart.
Where this goes next
Once a segment’s length is a subtraction, lengths along a line can be added and compared. When one point lies between two others, the two short lengths add to the long one, which is the segment addition postulate, and the across-zero picture in Figure 1 is one case of it. Two segments with the same length are congruent, and the point equally far from both ends of a segment is its midpoint.
On a grid, two points with the same y-coordinate lie on a horizontal number line, so their distance is the distance between their x-coordinates; that is horizontal and vertical distance. When the segment slants, the horizontal and vertical differences are combined through the Pythagorean theorem into the distance formula.
Read backwards, the rule turns questions about distance into equations. “Which points are 5.5 from -3” is the equation |x + 3| = 5.5 of Example 5, the model for absolute value equations, and “which points are closer than 2 to 4” is |x - 4| < 2, an absolute value inequality. In statistics the mean absolute deviation measures how spread out data are by averaging exactly these distances.
Exercises
Integer coordinates
Find the distance between the two points with these coordinates.
- -3 and 8
- -12 and -5
- 0 and -14
- 15 and -15
- -21 and 6
Reading a number line
Use Figure 3 for Exercises 6 to 9.
- Find PQ.
- Find QS.
- Find PS.
- Which of P, Q and S is closest to R, and how far from R is it?
Fractions and decimals
Find the distance between the two points with these coordinates.
- -4.6 and 2.8
- -0.75 and -3.2
- \displaystyle -2\frac{1}{2} and \displaystyle 1\frac{1}{3}
- \displaystyle -\frac{5}{8} and \displaystyle -\frac{1}{6}
In context
- At dawn the temperature was -13^\circC, and at noon it was 8^\circC. How many degrees apart are the two readings?
- A hiker walks down from a lookout 1{,}240 m above sea level to a canyon floor 65 m below sea level. How much lower is the canyon floor than the lookout?
- A bank balance was -47.50 dollars on Monday and 112.25 dollars on Friday. How far apart are the two balances?
Unknown points
- Point A is at 4. Find every point that is 9 units from A.
- Point B is at -2.5. Find every point that is 3.5 units from B.
- Point C is 10 units from -4, and C is negative. Where is C?
- Which is closer to 2: the point at -3.5 or the point at 7.4? By how much?
Reasoning
- Explain why |a - b| = |b - a| for any two numbers a and b.
- Adding the two distances to zero, |a| + |b|, sometimes gives the distance between a and b and sometimes does not. When does it work? Explain.
- Give four different pairs of points that are 8 units apart: one pair with both points positive, one with both negative, one on opposite sides of zero, and one that includes a fraction. Show that each pair works.
- Explain why the distance between the points at a and b is 0 only when a = b.
Answers
- 11. |8 - (-3)| = |8 + 3| = 11.
- 7. |{-5} - (-12)| = |{-5} + 12| = 7.
- 14. |{-14} - 0| = |{-14}| = 14. The distance from zero is just the absolute value.
- 30. |15 - (-15)| = |30| = 30. Opposites sit equally far from zero on each side.
- 27. |6 - (-21)| = |6 + 21| = 27.
- PQ = 4. P is at -7 and Q at -3: |{-3} - (-7)| = |4| = 4.
- QS = 8. Q is at -3 and S at 5: |5 - (-3)| = 8.
- PS = 12. |5 - (-7)| = 12.
- S, which is 3 units from R. R is at 2, so RS = |5 - 2| = 3, RQ = |{-3} - 2| = 5 and RP = |{-7} - 2| = 9.
- 7.4. |2.8 - (-4.6)| = |2.8 + 4.6| = 7.4.
- 2.45. |{-0.75} - (-3.2)| = |{-0.75} + 3.2| = 2.45.
- \displaystyle 3\frac{5}{6}. \displaystyle \left|\frac{4}{3} - \left(-\frac{5}{2}\right)\right| = \frac{8}{6} + \frac{15}{6} = \frac{23}{6}.
- \displaystyle \frac{11}{24}. \displaystyle \left|-\frac{1}{6} - \left(-\frac{5}{8}\right)\right| = \left|-\frac{4}{24} + \frac{15}{24}\right| = \frac{11}{24}.
- 21 degrees. |8 - (-13)| = |8 + 13| = 21.
- 1{,}305 m. The canyon floor is at -65, so |1240 - (-65)| = 1240 + 65 = 1305.
- 159.75 dollars. |112.25 - (-47.50)| = 112.25 + 47.50 = 159.75.
- 13 and -5. |x - 4| = 9 means x - 4 = 9 or x - 4 = -9.
- 1 and -6. |x + 2.5| = 3.5 means x + 2.5 = 3.5 or x + 2.5 = -3.5.
- C is at -14. The two points 10 from -4 are -4 + 10 = 6 and -4 - 10 = -14, and only -14 is negative.
- 7.4 is closer, by 0.1. |{-3.5} - 2| = 5.5 and |7.4 - 2| = 5.4.
- a - b and b - a add to 0, so they are opposites: one is -1 times the other. A number and its opposite are the same distance from zero, so they have the same absolute value.
- It works when a and b are on opposite sides of zero, or one of them is 0. Then the walk from one point to the other passes through zero, and it is the walk to zero plus the walk from zero. When both are on the same side, the walk to zero from the farther point passes the nearer one, so |a| + |b| counts the stretch between the nearer point and zero twice, and the distance is \big||a| - |b|\big| instead.
- Many answers. For example 3 and 11, since |11 - 3| = 8; -10 and -2, since |{-2} - (-10)| = 8; -5 and 3, since |3 - (-5)| = 8; and \displaystyle \frac{1}{2} and \displaystyle 8\frac{1}{2}, since \displaystyle 8\frac{1}{2} - \frac{1}{2} = 8. Any pair whose coordinates differ by 8 works.
- An absolute value is 0 only when the number inside is 0, since every other number is some positive distance from zero. So |a - b| = 0 exactly when a - b = 0, that is, when a = b.