Let A(x1, y1, z1) and B(x2, y2, z2) be the given points
Let R(x, y, z) divide PQ internally in the ratio m : n
Draw the line segments AP, BQ, CR perpendicular to xy-plane.
∴ AP ∥ BQ ∥ CR
∴ AP, BQ, CR lines are lie in one plane.
So the points P, Q and R lie in a straight line.
And the points intersects the plane and xy plane.
Through the point R draw a parallel line AB to the line segment PQ.
The line AB intersects the line segment LP externally at the point A and the line segment MQ at the point B.
From the figure we have that the triangles ALN and RBQ are similar triangles
So we can write,
\(\frac{AL}{MB} = \frac{LN}{NB} = \frac mn\)
\(\frac{AP - PL}{BQ - MQ} = \frac mn\)
\(\frac {NR - LP}{QB - NR} = \frac mn\)
\(\frac mn = \frac{z - z_1}{z_2 - z} = \frac mn\)
\(n(z - z_1) = m(z_2 - z)\)
\(nz - nz_1 = mz_2 - mz\)
\(nz + mz = nz_1 + mz_2\)
\(z(n + m) = nz_1 + mz_2\)
\(z(m + n) = mz_2 + nz_1\)
\(z(m + n) = mz_2 + nz_1\)
\(z = \frac{mz_2 + nz_1}{m + n}\)
Similarly we can find x and y
Therefore \(x = \frac{mx_2 + nx_1}{m +n} \) and \(x = \frac{my^2 + ny_1}{m + n}\)
Therefore the expression for the coordinate of the point that divides the line joining A and B in the ratio m:n is
\(N(x, y, z) = \left(\frac{mx_2 + nx_1}{m + n}, \frac{my_2 + ny_1}{m +n}, \frac{mz_2 + nz_1}{m + n}\right)\)