Suppose you want to find the distance between the points (x1, y1) and (x2,y2) in the x-y plane You can make a right triangle using those two points and the point (x2, y1) as long as the two given points aren't on the same horizontal line or vertical line. One leg of the right triangle will have length |x2 - x1| the other will have |y2 - y1| Use the pythagorean theorem to find the length of the hypotenuse (the straight line between the given points). Note that |x2 -x1|^2 = |x1 - x2|^2 = (x2 - x1)^2 You'll end up with the distance formula.