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
 A: 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?
A: 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}$$

