Explanation:
on the coordinate grid you can imagine a right-angled triangle.
the direct distance between the 2 points is the Hypotenuse (the baseline opposite of the 90° angle).
and the x-coordinate difference and the y- coordinate difference of the 2 points are the 2 legs.
we can then use Pythagoras
c² = a² + b²
with c being the Hypotenuse, a and b being the legs.
so,
distance² = (8-0)² + (2-0)² = 64 + 4 = 68
distance (= length ab) = sqrt(68) = sqrt(4×17) = 2×sqrt(17) =
= 8.246211251...