# How do we write the derivation of distance formula of two points from two different quadrants in a cartesian plane?

I learnt the derivation of the distance formula of two points in first quadrant I.e., $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$ where it is easy to find the legs of the hypotenuse (distance between two points) since the first has no negative coordinates and only two axes ($x$ coordinate and $y$ coordinate). while finding the distance between two points from two different quadrants of a Cartesian plane where four axes exist ($x$,$x_1$,$y$, $y_1$ coordinates), the same formula applies for this problem also. But, the derivation of the formula is based only on the distance between two points in first quadrant alone. Can you please explain the DERIVATION of the formula for more than two quadrants? Please

• The distance between two points does NOT depend on the quadrant they are in,since distance is a positive real number,the derivation you saw also works in any other quadrant,because there were no assumptions about the sign of the components of each point. – Logan Luther Jan 3 '17 at 12:04
• But when distance formula is used to find the distance of two points from two different quadrants , let us take a the right triangle to be PQR where P = 90° also PT = x1 + x2 and QT = y1 + y2 regardless of sign of the coordinates . Then, it must d = root of (x1 + x2)² + (y1 + y2)² where the values are taken in positive form even though the value are in negative value because you have told that distance is positive real number.But, how the original formula also suits it which uses the sign of the coordinates and taking them in negative form when value of coordinate has negative sign.Answer . – Harish Raja Jan 3 '17 at 12:19

Consider the following diagram:

Now to find the wanted distance,By the Pythagorean theorem,we need to know the size of the Edges BC and AC.

Suppose A and B to be:$$A(x_1,y_1),B(x_2,y_2)$$ And to find AC ,We need to subtract the length of AD from CD. Observe that C has the y component equal to the point B. So: $$AC =\vert(y_2 - y_1) \vert$$ In order to only have the length and not worry about its sign , we took take the absolute value of this quantity. The same argument can be given for the length of BC. $$BC =\vert (x_2 - x_1) \vert$$.

And now to use our friend Pythagoras. ABC is a right triangle,So:$${AB}^2={AC}^2+{BC}^2$$,and with our last results,we have :

$$d=\sqrt{{\vert x_2-x_1\vert}^2 +{\vert y_2-y_1\vert}^2}$$

Now notice that square of absolute value of a number is just equal to the square of that number

(absolute value only changes the number's sign ,not size,and when you square that number,it's sign will be positive ,so they are equal.)

So we can drop the absolute values in our formula:

$$d= \sqrt{{(x_2-x_1)}^2 +{(y_2-y_1)}^2}$$

• Thank you so much Logan Luther because I have been asking this question to my teacher for weeks but she was unable to explain and tries to avoid me in all ways. Once Thank you !!!☺ – Harish Raja Jan 3 '17 at 13:22
• But what if the line AB crosses the origin (0,0) – Harish Raja Jan 3 '17 at 13:35
• It will not change anything,as we have not assumed anything about the position of our points A and B . I think working out multiple examples on paper should clarify this. I will give an example that the AB goes through the origin.: $A(2,2),B(-2,-2)$ – Logan Luther Jan 3 '17 at 13:37
• Logan, please answer for my last request that is above the post. – Harish Raja Jan 3 '17 at 13:37
• Send me the diagram for my request to get clear view of lines other than triangle on the plot – Harish Raja Jan 3 '17 at 13:38

All you have to realize is that 'crossing' an axis does not change the distance. Try first to just realize this in one dimension, i.e the distance between two points on the real line:

$d(x_1,x_2)=|x_1-x_2|=\sqrt{(x_1-x_2)^2}$.

Take one point $x_1$, on the negative side, and another $x_2$, on the positive and calculate the distance between them, e.g

$x_1=-3, x_2=5$: $d(-3,5)=|-3-5|=\sqrt{((-3)-5)^2}=\sqrt{(-8)^2}=\sqrt{64}=8$.

The squaring takes care of the sign, and the square root, in a way, transforms it back again. The same applies, of course, to the components of the $y$-axis. With this in mind, read the derivation of the two dimensional case, that you've already read, again.

Can you then perhaps see why it makes no difference in what quadrants the points are?

• But when distance formula is used to find the distance of two points from two different quadrants , let us take a the right triangle to be PQR where P = 90° also PT = x1 + x2 and QT = y1 + y2 regardless of sign of the coordinates . Then, it must d = root of (x1 + x2)² + (y1 + y2)² where the values are taken in positive form even though the value are in negative value because you have told that distance is positive real number.But, how the original formula also suits it which uses the sign of the coordinates and taking them in negative form when value of coordinate has negative sign. – Harish Raja Jan 3 '17 at 12:25
• Give me a reason for my statement above Christopher. – Harish Raja Jan 3 '17 at 12:28
• I'm not sure what you are asking anymore, but first of all, no, in general $d(x,y)=\sqrt{(x_1-y_1)^2+(x_2-y_2)^2}$, not as you wrote: "d = root of (x1 + x2)² + (y1 + y2)² ". Also, when you square a negative number, it becomes positive. Also, when you take the square root of any such positive number, it stays positive. So, yes, the distance function of any two points, is a positive real number. I think my answer should explain any confusion. Otherwise state your question in a more clear manner, since I'm not sure what causes your confusion. – Christopher.L Jan 3 '17 at 12:34
• Sure, state it again, in One clear statement (without any of the previous explanations) , and I will see what I can make of it. – Christopher.L Jan 3 '17 at 12:36
• Also, regarding what you have written above: PT=x1+x2. First of all, I'm not sure what length you mean by that, but even so, it does not denote a length as it is now. If you, by x1 and x2, mean the coordinate values, x1+x2 does not denote a length. For example $(-3)+(-5)=-8$ is not the length between $(-3)$ and $(-5)$ on the real line, $\sqrt{((-3)-(-5))^2)}=\sqrt{4}=2$ is. – Christopher.L Jan 3 '17 at 12:49