The distance between two points in the coordinate plane comes from the Pythagorean theorem. Here we find the distance between and .
Going from to moves across and up. Taking these horizontal and vertical differences as the two legs of a right triangle, the segment joining and is its hypotenuse. By the Pythagorean theorem,
so the distance is .
In general, the distance between two points and is given, using the horizontal difference and the vertical difference , by the following.
Because the differences are squared, it does not matter if is negative. The large dots on the graph are and , and the length of the segment joining them is the distance we found.