Let's look at the points (4, 5) and (6, 2) for example.
We can make a right triangle out of these points like this...
Notice that side c is the distance between the two points.
And..we can find the length of side c using the Pythagorean theorem, which says..
a2 + b2 = c2
The length of side a = 5 - 2 = 3
(5 - 2)2 + b2 = c2
The length of side b = 6 - 4 = 2
(5 - 2)2 + (6 - 4)2 = c2
Take the positive square root of both sides.
\(\sqrt{(5-2)^2+(6-4)^2}=c\)
And this is where the distance formula comes from. It says..
\(\text{distance}=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}\)
And, as CPhill noted, the order of subtraction within the parenthesees doesn't matter.
Suppose that we have two points (x1, y1) and (x2, y2)
The distance between these is just
sqrt [ ( x2 - x1)^2 + ( y2 - y1)^2 ] .. actually....the order of subtraction is immaterial...we could subtract (x1 - x2 ) or (y1 - y2) or both in this order
Example.....distance between (5,3) and (8, 2)
sqrt [ ( 5 - 8)^2 + (3 - 2)^2 ] = sqrt [ (-3)^2 + 1^2 ] = sqrt [ 9 + 1 ] = sqrt (10) units ≈ 3.16 units
Let's look at the points (4, 5) and (6, 2) for example.
We can make a right triangle out of these points like this...
Notice that side c is the distance between the two points.
And..we can find the length of side c using the Pythagorean theorem, which says..
a2 + b2 = c2
The length of side a = 5 - 2 = 3
(5 - 2)2 + b2 = c2
The length of side b = 6 - 4 = 2
(5 - 2)2 + (6 - 4)2 = c2
Take the positive square root of both sides.
\(\sqrt{(5-2)^2+(6-4)^2}=c\)
And this is where the distance formula comes from. It says..
\(\text{distance}=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}\)
And, as CPhill noted, the order of subtraction within the parenthesees doesn't matter.