The distance between two points in the plane is the length of the line
segment joining the two points. If the points have Cartesian coordinates
(x1,x2) and (y1,y2), then
d=(x1−x2)2+(y1−y2)2
If the points have polar coordinates
(r1,θ1) and (r2,θ2), then
d=r12+r22+2r1r2cos(θ1−θ2)
Midpoint of two points
The midpoint of two points (x1,x2) and (y1,y2) is