If two points are matched with numbers on a ruler, the distance between the points is given by the absolute value of the difference between the numbers.
In this case, A is matched with 2 and B is matched with 8. AB=∣2−8∣=6 A and B are 6 centimeters apart.