The endpoints are the (x₁, y₁) and (x₂, y₂) values. It does not matter which endpoint is first or second. You will get the same answer either way.
For example: assume we have two endpoints with coordinates (1, 3) and (4, 5)
Let (1,3) represent the first coordinate and (4,5) the second coordinate.
Then, M =
![((x2 + x1)/(2) , (y2 + y1)/(2) ) = ((4 + 1)/(2) , (5 + 3)/(2) ) = ((5)/(2) , (8)/(2)) = ((5)/(2) , 4)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/pzqec43o4l3kitw6jel01jebtxj8yuir9h.png)
Now let's change the order so that (4, 5) represents the first coordinate and (1,3) represents the second coordinate.
Then, M =
![((x2 - x1)/(2) , (y2 - y1)/(2) ) = ((1 + 4)/(2) , (3 + 5)/(2) ) = ((5)/(2) , (8)/(2)) = ((5)/(2) , 4)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/6m6nu3lxb08ax40yqtz92j8fonwvct88mx.png)
Since we are adding two numbers and addition is commutative, then it doesn't matter which order the endpoints are in.