20.3k views
4 votes
Why the order of the coordinates does not matter when calculating length

User Pulak
by
7.5k points

1 Answer

2 votes
The formula for calculating length is:

\sqrt{ (x_b-x_a)^(2) + (y_b-y_a)^(2) }

We can also write
x_a - x_b or
y_a - y_b
Why it does not matter?
Let's assume we have 2 numbers, a and b.
When we perform a subtraction:

a-b, we get another number
c
When we perform another subtraction:

b-a, we get a number
-c

When we raise
c or
-c to the power of 2, the result is the same,
c^(2).
User Seon
by
7.7k points