3D Geometry & Distance (AI SL)
Before you can work with solids in three dimensions, you need two simple coordinate tools: the distance between two points, and the point exactly halfway between them. These formulas are the same ones you met with straight lines, just extended with a third coordinate - and they turn up constantly inside larger geometry problems, from finding a perpendicular bisector to locating the centre of a solid. It's part of the broader Volume & Surface Area topic.
24 questions on this sub-topic.
The two formulas
Covered under IB syllabus reference SL3.1: the distance between two points in three-dimensional space, and their midpoint. Both formulas are in the formula booklet with a \(z\)-coordinate included - drop that term and they're identical to the 2D versions you already know.
Distance
\(d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2 + (z_2-z_1)^2}\)
Use when you need a length - the straight-line distance between two given points. Drop the \(z\)-term for a 2D problem.
Midpoint
\(\left(\dfrac{x_1+x_2}{2},\ \dfrac{y_1+y_2}{2},\ \dfrac{z_1+z_2}{2}\right)\)
Use when you need the point exactly halfway between two others - just average each coordinate. Drop the \(z\)-term for a 2D problem.
Need the full syllabus wording and formula-booklet reference table? See Volume & Surface Area, or the calculator steps at using your GDC.
Worked examples
Find the distance between \((1,2)\) and \((4,6)\).
Worked solution
\(d=\sqrt{(4-1)^2+(6-2)^2}.\) M1
\(=\sqrt{9+16}=\sqrt{25}.\) A1
\(=5.\) A1
Find the perpendicular bisector of \(A(1,1)\) and \(B(5,3)\).
(a)(i) State the gradient.
(a)(ii) State the y-intercept.
Worked solution
(a)(i) Midpoint \((3,2);\) gradient \(\tfrac12,\) perp \(-2;\) \(y\) M1
(a)(ii) \(=-2x+8.\) A1
\(y=-2x+8.\) A1
Points \(P(2,3)\) and \(Q(8,11).\)
(a) Find the midpoint of \(PQ.\)
(b) Find the length \(PQ.\)
Worked solution
(a) Midpoint. Average the coordinates: \(\left(\frac{2+8}{2}, \frac{3+11}{2}\right)\) M1
\(= (5, 7).\) A1
(b) Length. Use the distance formula (Pythagoras): \(PQ = \sqrt{(8-2)^2 + (11-3)^2} = \sqrt{36 + 64} = \sqrt{100}\) M1
\(= 10.\) A1
Common mistakes
- Dropping the third coordinate in 3D. Once a \(z\)-coordinate is involved, both the distance and midpoint formulas need a \((z_2-z_1)^2\) or \(\tfrac{z_1+z_2}{2}\) term added - forgetting it collapses a 3D problem into a wrong 2D one.
- Using the same gradient instead of the negative reciprocal. A perpendicular line's gradient is \(-\tfrac{1}{m}\), not \(m\) - flip and negate the original gradient before writing the perpendicular equation.
- Square-rooting too early. Inside the distance formula, square each difference and add both squares first - taking the square root of one bracket before combining it with the other gives a meaningless answer.
Ready to practise properly?
24 distance-and-geometry questions, marked instantly like the real exam.
Quick answers
What is the distance formula between two points?
For two points \((x_1,y_1)\) and \((x_2,y_2)\), the distance between them is \(d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\). In three dimensions a \((z_2-z_1)^2\) term is added under the square root.
What is the midpoint formula?
The midpoint of \((x_1,y_1)\) and \((x_2,y_2)\) is \(\left(\tfrac{x_1+x_2}{2},\tfrac{y_1+y_2}{2}\right)\) - simply average the \(x\)-coordinates and average the \(y\)-coordinates. A \(z\)-coordinate in 3D is averaged the same way.