If P(x,y) divides A(x1,y1) and B(x2,y2) in the ratio m : n, then, P(x,y) = (mx2+nx1m+n,my2+ny1m+n).
The coordinates of the point R which divides the line segment joining two points P (x1, y1, z1) and Q (x2, y2, z2) externally in the ratio m : n are given by