In coordinate geometry, the points (x,y) are placed in the coordinate axes i.e. x-axis and y-axis.
Form the right-angled triangle PQX, where X is the point (x2, y1),
PX = x2 − x1 or x1 − x2 and QX = y2 − y1 or y1 − y2
By Pythagoras Theorem,
PQ = PX + XQ = (x2 – x1) + (y2 – y1)
Therefore, PQ = QP = √(x2-x1)2+ (y2-y1)2