Distance Formula


For finding the distance d between two points (x1, y1) and (x2, y2) in a plane, a right triangle can be formed. The length of the vertical side of the triangle is the | y2y1| and the length of the horizontal side is |x2x1|. Then, from the pythagorean theorem:

d 2 = |x2x1| 2 + | y2y1| 2

Then, the distance d between the points (x1, y1) and (x2, y2) in a plane is:

d = √(x2x1)2 + ( y2y1)2