IB Maths AI HL Geometry of 3D Shapes Paper 1 & 2 Midpoint, distance in 3D ~8 min read

3D Coordinate Geometry

The 2D midpoint and distance formulas extend naturally to 3D: just include a third coordinate. The distance formula is Pythagoras applied twice — first across the floor of a box, then up its vertical edge — giving √((x1x2)2+(y1y2)2+(z1z2)2).

πŸ“˜ What you need to know

Why the 3D distance formula works

Imagine the line segment from A(x1, y1, z1) to B(x2, y2, z2) as the long diagonal of a rectangular box with edges parallel to the axes. The box has length |Ξ”x|, depth |Ξ”y|, height |Ξ”z|. First apply 2D Pythagoras to the box’s floor: the floor diagonal has length √(Ξ”x2+Ξ”y2). That floor diagonal and the vertical edge Ξ”z form a right-angled triangle (the vertical edge is perpendicular to the floor), so Pythagoras applies again, giving the full space diagonal √(floor2+Ξ”z2) = √(Ξ”x2+Ξ”y2+Ξ”z2). The 3D formula is just Pythagoras applied twice.

3D distance = Pythagoras applied twice (floor diagonal β†’ space diagonal) x y z floor diag = √(4Β² + 3Β²) = 5 vertical = 12 d = √(4Β² + 3Β² + 12Β²) = 13 O (0,0,0) (4, 3, 0) C (4, 3, 12) x = 4 z = 12 y = 3 3D coordinate formulas Distance d = √(Ξ”xΒ² + Ξ”yΒ² + Ξ”zΒ²) Midpoint M = ((x₁+xβ‚‚)/2, (y₁+yβ‚‚)/2, (z₁+zβ‚‚)/2) Pythag cascade 1. floor diag = √(Ξ”xΒ² + Ξ”yΒ²) 2. space diag = √(floorΒ² + Ξ”zΒ²) Example: (4, 3, 12) √(16 + 9 + 144) = √169 = 13 (3, 4, 12, 13) Pythagorean quadruple
The space diagonal from O to C (bold teal) is built from the floor diagonal (red dashed, length 5) and the vertical edge (red dashed, length 12) using Pythagoras — giving √(52+122) = 13.
3D coordinate formulas midpoint: ((x1+x2)/2, (y1+y2)/2, (z1+z2)/2) distance: √((x1x2)2+(y1y2)2+(z1z2)2)

Working with 3D coordinates

The procedure for 3D problems is identical to 2D — just include the z-coordinate every time. Label the coordinates (x1, y1, z1) and (x2, y2, z2) on the points before substituting. For reverse problems — finding a missing coordinate given a midpoint or a distance — set up an equation and solve. Quick mental check: if you get a 3D distance that’s smaller than any of the individual gaps |Ξ”x|, |Ξ”y|, |Ξ”z|, you’ve made an arithmetic error — the diagonal of a box can’t be shorter than any edge.

Spot 3D Pythagorean quadruples: the patterns (1,2,2,3), (2,3,6,7), (1,4,8,9), (4,4,7,9), (2,6,9,11), and (3,4,12,13) all give clean integer distances. They turn up surprisingly often in exam problems.

🧭 Recipe — 3D coordinate geometry

  1. Label the points: write (x1, y1, z1) and (x2, y2, z2) under the coordinates to avoid sign errors.
  2. Pick the formula: midpoint (average) or distance (3D Pythagoras).
  3. Substitute and simplify; watch the signs on differences involving negatives.
  4. For reverse problems, write the formula with the unknown, then solve.
  5. Sanity check: distance must be β‰₯ the largest single-coordinate gap.

Worked examples

WE 1

Basic distance and midpoint

Points P(1, 2, 1) and Q(3, 5, 7). (a) Find the distance PQ. (b) Find the midpoint of [PQ].

(a) compute the gaps Ξ”x = 1βˆ’3 = βˆ’2; Ξ”y = 2βˆ’5 = βˆ’3; Ξ”z = 1βˆ’7 = βˆ’6 dΒ² = 4 + 9 + 36 = 49 d = 7 units (b) average each coordinate M = ((1+3)/2, (2+5)/2, (1+7)/2) M = (2, 3.5, 4) (2, 3, 6, 7) Pythagorean quadruple β€” clean answer βœ“
WE 2

Exact-form distance

Points A(3, −2, 1) and B(6, 2, 5). (a) Find AB in exact form. (b) Find the midpoint of [AB].

(a) distance via 3D Pythagoras dΒ² = (3βˆ’6)Β² + (βˆ’2βˆ’2)Β² + (1βˆ’5)Β² = 9 + 16 + 16 = 41 d = √41 β‰ˆ 6.40 units (b) midpoint M = ((3+6)/2, (βˆ’2+2)/2, (1+5)/2) M = (4.5, 0, 3)
WE 3

Reverse: find an endpoint from the midpoint

The midpoint of [AB] is M(2, −1, 4). Point A has coordinates (−1, 3, 2). Find the coordinates of B.

use B = 2M βˆ’ A coordinate-wise Bx = 2(2) βˆ’ (βˆ’1) = 5 By = 2(βˆ’1) βˆ’ 3 = βˆ’5 Bz = 2(4) βˆ’ 2 = 6 B = (5, βˆ’5, 6) check: midpoint of (βˆ’1, 3, 2) and (5, βˆ’5, 6) = (2, βˆ’1, 4) βœ“
WE 4

Median of a 3D triangle

A triangle in 3D space has vertices A(2, 0, −1), B(0, 4, 3), and C(−2, 2, 5). (a) Find the midpoint M of side [AC]. (b) Find the length of the median from B to M.

(a) midpoint of [AC] M = ((2+(βˆ’2))/2, (0+2)/2, (βˆ’1+5)/2) M = (0, 1, 2) (b) distance B to M BMΒ² = (0βˆ’0)Β² + (4βˆ’1)Β² + (3βˆ’2)Β² = 0 + 9 + 1 = 10 BM = √10 β‰ˆ 3.16 units medians of a triangle connect each vertex to the midpoint of the opposite side.
WE 5

Applied: drone flight path

A drone at position A(10, 20, 30) (coordinates in metres) flies in a straight line to position B(30, 50, 90). Find: (a) the total distance flown; (b) the drone’s position when exactly halfway through the flight.

(a) compute the gaps Ξ” = (20, 30, 60) dΒ² = 400 + 900 + 3600 = 4900 d = 70 m (b) halfway = midpoint M = ((10+30)/2, (20+50)/2, (30+90)/2) M = (20, 35, 60) (2, 3, 6, 7) triple scaled by 10 β†’ clean answer βœ“
WE 6

Space diagonal and centre of a cuboid

A rectangular cuboid has one vertex at the origin O(0, 0, 0) and the opposite vertex at C(4, 3, 12). Find: (a) the length of the space diagonal OC; (b) the midpoint of OC (the centre of the cuboid); (c) show that the distance from this centre to each of the 8 vertices of the cuboid is the same.

(a) 3D distance OCΒ² = 16 + 9 + 144 = 169 OC = 13 units (b) midpoint of OC M = (2, 1.5, 6) centre = (2, 1.5, 6) (c) check distances from M to all 8 vertices to (0,0,0): √(4 + 2.25 + 36) = √42.25 = 6.5 to (4,3,12): √(4 + 2.25 + 36) = 6.5 to (4,0,0), (0,3,0), (0,0,12),…all give 6.5 all 8 vertices at distance 6.5 = OC/2 βœ“ all 8 vertices lie on a sphere centred at M with radius OC/2 β€” this is the cuboid’s circumscribed sphere.

πŸ’‘ Top tips

⚠ Common mistakes

Next up: Volume & Surface Area — the formulas for the basic 3D shapes (cuboids, cylinders, pyramids, cones, spheres), most of which are in the formula booklet.

Need help with 3D Coordinate Geometry?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →