Question 673230
<pre>
Suppose we want to find the distance d = AB from point A(x<sub>1</sub>,y<sub>1</sub>) to point B(x<sub>2</sub>,y<sub>2</sub>).

{{{drawing(400,300,-5,15,-5,10,

line(-5,0,15,0), line(0,-5,0,15), locate(7,4.5,d),
locate(1,3.5,A(x[1],y[1])),locate(9,6,B(x[2],y[2])),
line(5,2,9,5) )}}} 

We draw in a green line and a red line to form a right triangle:

{{{drawing(400,300,-5,15,-5,10,
green(line(5,2,9,2)),red(line(9,2,9,5)),
line(-5,0,15,0), line(0,-5,0,15), locate(7,4.5,d),
locate(1,3.5,A(x[1],y[1])),locate(9,6,B(x[2],y[2])),
line(5,2,9,5) )}}} 

By the Pythagorean theorem:

d² = (green line)² + (red line)²

The length of the green line is x<sub>2</sub> - x<sub>1</sub>.

The length of the red line is y<sub>2</sub> - y<sub>1</sub>

So

d² = (x<sub>2</sub> - x<sub>1</sub>)² + (y<sub>2</sub> - y<sub>1</sub>)²

Therefore:
     ______________________
d = V(x<sub>2</sub> - x<sub>1</sub>)² + (y<sub>2</sub> - y<sub>1</sub>)²

Edwin</pre>