A point R that divides the segment from P to Q in a given ratio sits at known coordinates , just average each coordinate weighted by the ratio. The 3D section formula is the natural extension of the 2D one.
Internal division
If R divides the line segment from P(x1,y1,z1) to Q(x2,y2,z2) internally in the ratio m:n, then
R=(m+nmx2+nx1,m+nmy2+ny1,m+nmz2+nz1).
This means PR:RQ=m:n.
External division
If R divides PQ externally in ratio m:n (so R lies on the line, outside the segment), replace n with −n:
R=(m−nmx2−nx1,m−nmy2−ny1,m−nmz2−nz1).
(Requires m=n.)
Midpoint
Setting m=n=1 in the internal formula:
M=(2x1+x2,2y1+y2,2z1+z2).
Centroid of a triangle
For triangle with vertices A(x1,y1,z1),B(x2,y2,z2),C(x3,y3,z3):
G=(3x1+x2+x3,3y1+y2+y3,3z1+z2+z3).
The centroid divides every median in the ratio 2:1 (vertex to midpoint of opposite side).
Worked examples
Example 1. Find the coordinates of the point dividing the segment from (1,2,3) to (7,14,21) in the ratio 1:2 internally.
R=(31⋅7+2⋅1,31⋅14+2⋅2,31⋅21+2⋅3)=(3,6,9).
Example 2. Midpoint of (2,−3,4) and (6,5,−2).
M=(4,1,1).
Example 3. Find the centroid of the triangle with vertices (1,2,3),(4,−1,2),(7,5,−2).
G=(312,36,33)=(4,2,1).
Example 4. In what ratio does the xy-plane divide the segment from (2,3,−4) to (6,−1,8)?
The xy-plane has z=0. The intersection point has z=0, so by section formula in z:
0=m+nm⋅8+n⋅(−4)⇒8m=4n⇒m:n=1:2.
Example 5. Find R dividing A(1,0,1) and B(4,3,−2) externally in ratio 2:1.
R=(12⋅4−1⋅1,12⋅3−1⋅0,12⋅(−2)−1⋅1)=(7,6,−5).
Try it yourself
Point dividing (0,0,0) and (6,9,12) in ratio 1:2.
Midpoint of (−1,3,5) and (5,−3,−3).
Centroid of (2,4,6),(0,0,0),(−2,−4,−6).
Find the ratio in which y-axis divides the segment from (2,3,4) to (−3,5,6). (Note: y-axis means x=0 and z=0 , only intersection at one point, if any.)
Find the ratio in which the xy-plane divides the line joining (1,−2,3) and (3,4,−5).
The midpoint of a segment is (3,4,5). One endpoint is (1,2,3). Find the other.
Three vertices of a parallelogram are A(3,−1,2),B(1,2,−4),C(−1,1,2). Find D. (Hint: diagonals bisect each other.)
The centroid of a triangle is (1,1,1). Two vertices are (2,3,1) and (−1,0,2). Find the third.
Find the coordinates of the point trisecting the segment from (1,1,1) to (7,7,7) (closer to first endpoint).
Find the point on the xz-plane that divides the segment from (2,3,−1) to (4,−3,5).
If the points (1,2,3),(3,4,5),(5,6,7) are vertices of a triangle, find its centroid.
In what ratio does the point (−1,0,2) divide the segment from (1,2,4) to (−3,−2,0)?
Pitfalls / Tricks
Order matters: the formula gives the point that divides fromPtoQ in the ratio m:n. Switching P and Q swaps m and n.
For external division, m=n (else the formula has zero denominator).
The centroid is the average of vertices , extends naturally from 2D.
Insight. Section in 3D is "do the 2D formula three times". Once you internalise the 2D, 3D is just bookkeeping.