The points that lie on a number line, or the x-axis, have a y value of 0. Therefore, we can try applying the distance formula on points a and b given that:
a = (a,0)
b = (b,0)
d = √[(x₂ - x₁)² + (y₂ - y₁)²]
d = √[(a - b)² + (0 - 0)²]
d = √(a - b)²
d = a - b
Thus, the distance formula still applies to two points on a number line, it is just in a simplified form.