Suppose a point $R$ lies on the segment joining $P(x_1, y_1, z_1)$ and $Q(x_2, y_2, z_2)$ and divides it in the ratio $m : n$. The section formula gives the coordinates of $R$ — again the plane version with a third coordinate handled identically.
Internal division (point $R$ lies between $P$ and $Q$):
$$R = \left(\dfrac{mx_2 + nx_1}{m + n},\ \dfrac{my_2 + ny_1}{m + n},\ \dfrac{mz_2 + nz_1}{m + n}\right)$$
External division (point $R$ lies on the line but outside the segment): replace $n$ by $-n$.
$$R = \left(\dfrac{mx_2 - nx_1}{m - n},\ \dfrac{my_2 - ny_1}{m - n},\ \dfrac{mz_2 - nz_1}{m - n}\right)$$
Midpoint (the special internal case $m = n = 1$):
$$M = \left(\dfrac{x_1 + x_2}{2},\ \dfrac{y_1 + y_2}{2},\ \dfrac{z_1 + z_2}{2}\right)$$
Centroid of a triangle with vertices $A(x_1,y_1,z_1)$, $B(x_2,y_2,z_2)$, $C(x_3,y_3,z_3)$ — the average of the three vertices:
$$G = \left(\dfrac{x_1 + x_2 + x_3}{3},\ \dfrac{y_1 + y_2 + y_3}{3},\ \dfrac{z_1 + z_2 + z_3}{3}\right)$$
Deeper Insight — one weighted average, four results: Every formula above is really the same operation — a weighted average of coordinates — wearing different clothes. Internal division weights $Q$ by $m$ and $P$ by $n$ (notice the cross-pairing: the $m$ that measures the distance toward $Q$ multiplies $P$’s neighbour $x_2$), and dividing by $m+n$ keeps the result a genuine average. The midpoint is just the symmetric case $1:1$, and external division is the same algebra with one weight made negative, which is why the sign flips to $m - n$. Even the centroid fits the pattern: it sits two-thirds of the way along each median, dividing it $2:1$ from the vertex, and that ratio is exactly what produces the clean average of all three vertices. Seeing these as one idea means you only have to remember the internal-division formula carefully; the others are quick specialisations. A practical warning: keep the order $(P, Q)$ and the ratio $(m, n)$ consistent, because swapping them silently changes which point you compute.
Find the coordinates of the point that divides the line segment joining $P(1, -2, 3)$ and $Q(3, 4, -5)$ internally in the ratio $2 : 3$.
Solution- Here $m = 2$, $n = 3$, $P = (1,-2,3)$, $Q = (3,4,-5)$, and $m + n = 5$.
- $x = \dfrac{2(3) + 3(1)}{5} = \dfrac{6 + 3}{5} = \dfrac{9}{5}$.
- $y = \dfrac{2(4) + 3(-2)}{5} = \dfrac{8 - 6}{5} = \dfrac{2}{5}$.
- $z = \dfrac{2(-5) + 3(3)}{5} = \dfrac{-10 + 9}{5} = -\dfrac{1}{5}$.
Answer: $\left(\dfrac{9}{5},\ \dfrac{2}{5},\ -\dfrac{1}{5}\right)$.
Find the midpoint of the segment joining $A(4, -3, 2)$ and $B(-2, 5, 8)$.
Solution- $x = \dfrac{4 + (-2)}{2} = 1$.
- $y = \dfrac{-3 + 5}{2} = 1$.
- $z = \dfrac{2 + 8}{2} = 5$.
Answer: Midpoint $= (1, 1, 5)$.
Find the point which divides the segment joining $P(2, 1, 4)$ and $Q(5, -2, 1)$ externally in the ratio $2 : 1$.
Solution- External division: $m = 2$, $n = 1$, so $m - n = 1$.
- $x = \dfrac{2(5) - 1(2)}{1} = 10 - 2 = 8$.
- $y = \dfrac{2(-2) - 1(1)}{1} = -4 - 1 = -5$.
- $z = \dfrac{2(1) - 1(4)}{1} = 2 - 4 = -2$.
Answer: $(8, -5, -2)$.
Find the centroid of the triangle whose vertices are $A(1, 2, 3)$, $B(3, -1, 5)$ and $C(2, 5, 1)$.
Solution- $x = \dfrac{1 + 3 + 2}{3} = \dfrac{6}{3} = 2$.
- $y = \dfrac{2 + (-1) + 5}{3} = \dfrac{6}{3} = 2$.
- $z = \dfrac{3 + 5 + 1}{3} = \dfrac{9}{3} = 3$.
Answer: Centroid $G = (2, 2, 3)$.
Find the ratio in which the $YZ$-plane divides the segment joining $A(-2, 4, 7)$ and $B(3, -5, 8)$.
Solution- Let the plane divide $AB$ in the ratio $k : 1$. On the $YZ$-plane the $x$-coordinate is $0$.
- $x = \dfrac{k(3) + 1(-2)}{k + 1} = 0 \Rightarrow 3k - 2 = 0$.
- $k = \dfrac{2}{3}$, so the ratio is $\dfrac{2}{3} : 1 = 2 : 3$.
Answer: The $YZ$-plane divides $AB$ in the ratio $2 : 3$ (internally).
The midpoint of the segment joining $A(2, -1, 4)$ and $B(x, y, z)$ is $M(3, 1, 2)$. Find $B$.
Solution- $\dfrac{2 + x}{2} = 3 \Rightarrow 2 + x = 6 \Rightarrow x = 4$.
- $\dfrac{-1 + y}{2} = 1 \Rightarrow -1 + y = 2 \Rightarrow y = 3$.
- $\dfrac{4 + z}{2} = 2 \Rightarrow 4 + z = 4 \Rightarrow z = 0$.
Answer: $B = (4, 3, 0)$.