a and b are two points on a real number line
the distance between them is |a-b| as distances are usually considered positive, unless you want to designate both magnitude and direction, with + in one direction and - the opposite direction
which makes the absolute value of a-b
mean a-b if a>b
or b-a if b>a
a point half way between a and b is the arithmetic average, the mean, (a+b)/2 = (b+a)/2
which works for both positive and negative values of a and b
for example if a=4 and b=-2, midpoint = 1
(4-2)/2 = 1 = (-2+4)/2 which also = |4-2|/2
but if a=-4 and b =2
(-4+2)/2 =-1 = (2-4).2 which does not equal |-4+2|/2
so the absolute value sign is not only not necessary, but gives the wrong answer for the midpoint half the time
(a-b)/2 = (1/2)(a-b)
for other fractional in between points
just replace 1/2 by the fraction
such as
(3/4)(a-b) for 3/4
which = (3a-3b)/4
for short distances, this works well for 2 points on earth,
but for large distances, it gives a midpoint that is below the earth's surface