After plotting the points on a graph we make a right angled triangle considering another point. We then use the pythagorean theorem to find the distance:That says, \\(AB^2=AC^2+BC^2\\)\\(d^2=\\left(x_2-x_1\\right)^2+\\left(y_2-y_1\\right)^2\\)Where the vertical distance between the two points is \\(\\left|y_2-y_1\\right|\\) and horizontal distance is \\(\\left|x_2-x_1\\right|\\).