Key Point (Distance formula): for P(x1,y1,z1) and Q(x2,y2,z2),
PQ=(x2−x1)2+(y2−y1)2+(z2−z1)2
Why (the box argument): build the rectangular box with P and Q at opposite corners and edges parallel to the axes. Pythagoras in the base gives the base-diagonal2=(x2−x1)2+(y2−y1)2; Pythagoras again in the vertical right triangle adds (z2−z1)2. The 2D formula just grows one more square.
Special case: the distance from the origin to Q(x,y,z) is OQ=x2+y2+z2.
Worked check:P(1,−3,4), Q(−4,1,2): PQ=25+16+4=45=35.
Collinearity test: three points are collinear when the two shorter distances add up to the longest: for P(−2,3,5), Q(1,2,3), R(7,0,−1), the distances are PQ=14, QR=214, PR=314, and PQ+QR=PR — collinear.
Classifying Figures and Describing Loci
Classification by distances. Compute all side lengths (squared!), then compare:
An isosceles triangle has two equal sides; a right triangle satisfies a2+b2=c2 (check the largest square against the sum of the other two — the check can fail, so always verify rather than assume); a parallelogram has equal opposite sides, and it is a rectangle only if the diagonals are also equal (a quadrilateral with AC=3=BD=155 is a parallelogram but not a rectangle).
Loci: geometry conditions become equations. Write P(x,y,z), translate the condition through the distance formula, and simplify:
Equidistance from two fixed points gives a plane (the 3D perpendicular bisector — e.g. 10x+6y−18z−29=0 in Example 8 below); a constant sum of distances from (±4,0,0) equal to 10 gives 9x2+25y2+25z2=225; constant distance from a fixed point gives a sphere; and PA2+PB2=k2 expands to a sphere-type equation.
[Board Tip] Compare distances through their squares — 18=32 hides equalities that 18=18 shows instantly, and no marks are lost to surd arithmetic.
Solved Examples
Example 1: A first distance
Find the distance between P(1,−3,4) and Q(−4,1,2).
Solution:
Step 1 — Difference each coordinate.Δx=−4−1=−5, Δy=1−(−3)=4, Δz=2−4=−2.
Step 2 — Square, add, root.PQ=25+16+4=45.
Step 3 — Simplify the surd.45=9×5=35 units.
Takeaway: Signs of the differences never matter — squaring erases them, so difference in either order.
Example 2: Four quick distances
Find the distances between: (i) (2,3,5), (4,3,1); (ii) (−3,7,2), (2,4,−1); (iii) (−1,3,−4), (1,−3,4); (iv) (2,−1,3), (−2,1,3).
Solution:
Step 1 — (i).22+02+(−4)2=20=25.
Step 2 — (ii).52+(−3)2+(−3)2=25+9+9=43.
Step 3 — (iii).22+(−6)2+82=4+36+64=104=226.
Step 4 — (iv).(−4)2+22+02=20=25.
Takeaway: A zero difference (equal coordinates) just drops a term — spot those first and the arithmetic halves.
Example 3: Collinearity
Show that P(−2,3,5), Q(1,2,3) and R(7,0,−1) are collinear.
Solution:
Step 1 — Compute all three distances.PQ=9+1+4=14; QR=36+4+16=56=214; PR=81+9+36=126=314.
Step 2 — Test the degenerate triangle condition.PQ+QR=14+214=314=PR.
Step 3 — Conclude. The "triangle" is flat: Q lies on segment PR, so the points are collinear. ∎
Takeaway: Same-surd answers (14, 214, 314) are the signature of collinear points — the common factor is the direction's length scale.
Example 4: Testing for a right angle
Are A(3,6,9), B(10,20,30), C(25,−41,5) the vertices of a right-angled triangle?
Step 3 — (ii) Same squares, stronger conclusion.AB2=18, BC2=18, CA2=36: now check AB2+BC2=18+18=36=CA2 — right-angled at B. ∎
Takeaway: The same distance data can hold more than one property — compute once, test every classification.
Example 6: A parallelogram
Verify that A(−1,2,1), B(1,−2,5), C(4,−7,8), D(2,−3,4) are the vertices of a parallelogram.
Solution:
Step 1 — Squared sides in order.AB2=4+16+16=36; BC2=9+25+9=43; CD2=4+16+16=36; DA2=9+25+9=43.
Step 2 — Compare opposite pairs.AB=CD=6 and BC=DA=43: both pairs of opposite sides equal.
Step 3 — Conclude.ABCD is a parallelogram. ∎
Takeaway: Keep the vertices in cyclic order — comparing AB with CD (not BC) is what "opposite sides" means.
Example 7: The equidistant plane
Find the set of points equidistant from A(1,2,3) and B(3,2,−1).
Solution:
Step 1 — Translate the condition.PA=PB; square to avoid roots: (x−1)2+(y−2)2+(z−3)2=(x−3)2+(y−2)2+(z+1)2.
Step 2 — Expand and cancel. The x2,y2,z2 terms cancel (and so do the y-terms, since both points share y=2): −2x−6z+14=−6x+2z+14, which collects to 4x−8z=0.
Step 3 — Conclude.x−2z=0 — a plane (the 3D perpendicular bisector of AB).
Takeaway: Squaring an equidistance condition always kills the squares — the locus of PA=PB is forever linear: a plane.
Example 8: Another equidistant plane
Find the set of points equidistant from A(3,4,−5) and B(−2,1,4).
Solution:
Step 1 — Square both distances.(x−3)2+(y−4)2+(z+5)2=(x+2)2+(y−1)2+(z−4)2.