Extending to 3D: In 3D space, points have three coordinates (x, y, z).
The distance formula gains one extra term inside the square root — one for each axis.
[Diagram: math-distance-formula] - Available in full study mode
Worked example — distance in 3D
Find the distance between A(1, 0, 2) and B(4, 3, 6).
Step by step
- Compute each squared difference.
- Take the square root.
Final answer
Distance AB ≈ 5.83 units (3 s.f.).
Where 3D distance appears in IB: IB questions often place a solid in a coordinate grid. You may be asked for the length of a space diagonal — the distance between two opposite corners of a cuboid.
Average all three coordinates: The midpoint in 3D works exactly like 2D — just average the z-coordinates as well as the x and y.
Worked example — midpoint in 3D
Find the midpoint of A(2, −1, 4) and B(6, 3, 10).
Step by step
- Average each coordinate pair.
- Simplify.
Final answer
Midpoint M = (4, 1, 7).
Add then halve: Add the two coordinates and divide by 2 — never subtract (that gives a gap, not the middle). Given the midpoint and one end, the other end is B = 2M − A.
Feeling unprepared for exams?
Get a clear study plan, practice with real questions, and know exactly where you stand before exam day. No more guessing.
Put a solid on a grid: A length inside a solid is just a 3D distance. Put one corner at the origin, read off the opposite corner, and apply the formula.
[Diagram: math-cuboid-diagonal] - Available in full study mode
Worked example — space diagonal of a cuboid
A cuboid has length 6 cm, width 4 cm, and height 3 cm.
Find the length of the space diagonal (corner to opposite corner).
Step by step
- Label one corner A(0, 0, 0) and the opposite corner B(6, 4, 3).
- Apply the 3D distance formula.
- Round to 3 s.f.
Final answer
The space diagonal is √61 ≈ 7.81 cm.
Common mistake: Square each difference separately. A frequent error is √(6+4+3) = √13 instead of √(36+16+9) = √61.