Take the coordinates of two points you want to find the distance between. Think of the distance between any two points as a line. Given the two points x1 y1 and x2 y2 the distance d between these points is given by the formula.
It is an expansion of the Pythagorean theorem that allows us to use x and y coordinates instead of right triangle side lengths.
If two points have the same y-coordinate then the segment connected them is horizontal. Simply subtract their x-coordinates to find the length of the segment between them. The distance between any two points is the length of the line segment joining the points. We need to find the distance between two points on Rectangular Coordinate Plane.