The formula used to find the length of a line segment is the same formula as the Pythagoras theorem.
We take CD as the hypotenuse of the right-angled triangle and the distance between the x-coordinates and y-coordinates as the length of two short sides.
We can write the formula as
CD =

CD =
