Explanation:
the distance as Hypotenuse, and the x and y coordinate differences as legs create a right-angled triangle.
and Pythagoras helps us
c² = a² + b²
with c being the Hypotenuse, and a and b are the legs.
the differences of coordinates are calculated by subtracting one from the other. it is important that for both x and y differences the same sequence of what point gets subtracted from what is kept.
distance² = (1 - -4)² + (-9 - -1)² = (1+4)² + (-9+1)² =
= 5² + (-8)² = 25 + 64 = 89
distance = sqrt(89)