The distance between two points a and b on the real line is calculated using the formula |a – b|.
This formula works by taking the absolute value of the difference between the two numbers. The absolute value ensures that the distance is always a non-negative number, regardless of the order of a and b. For example, if a = 3 and b = 7, the distance would be |3 – 7| = |-4| = 4. Similarly, if a = 7 and b = 3, the distance remains |7 – 3| = |4| = 4 as well. Therefore, the distance between two points on the real line reflects how far apart they are, without concern for direction.