# 2D and 3D coordinate geometry

> IB Mathematics: Analysis and Approaches SL · Unit 3: Geometry & Trigonometry
> Source: https://www.owlsprep.com/study/ib-math-aa-sl-u3-2d-and-3d-coordinate-geometry/

This module covers the core coordinate-geometry results for 2D and 3D space: the distance between two points and the coordinates of their midpoint.

**Prerequisites:** 2D coordinate system fundamentals

## Learning objectives

- Calculate the distance between two points and the coordinates of their midpoint in 2D and 3D coordinate systems

## Core Formulas for 2D and 3D Coordinates

All core coordinate geometry concepts extend naturally from 2D to 3D by adding a third perpendicular axis, the $z$-axis. Every point in 3D space is represented by three coordinates $(x,y,z)$, compared to two coordinates $(x,y)$ in 2D.

**Distance between two points** — The straight-line distance between two points is an extension of Pythagoras' theorem, adding an extra term for the $z$-coordinate difference in 3D.

*Notation:* $P(x_1,y_1,z_1), Q(x_2,y_2,z_2)$

*Example:* Distance from $(0,0,0)$ to $(1,2,2)$ is $\text{Distance} = \text{3}$

**Worked example:** Find the distance between $P(2, -1, 4)$ and $Q(-3, 2, 6)$, and the coordinates of their midpoint.

1. Recall the 3D distance formula:
2. $$d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2 + (z_2-z_1)^2}$$
3. Substitute the coordinates of the two points:
4. $$d = \sqrt{(-3-2)^2 + (2-(-1))^2 + (6-4)^2} = \sqrt{(-5)^2 + 3^2 + 2^2}$$
5. Simplify to get the final distance:
6. $$d = \sqrt{25 + 9 + 4} = \sqrt{38} \approx 6.16$$
7. The midpoint is the average of each coordinate, so:
8. $$M = \left(\frac{2 + (-3)}{2}, \frac{-1 + 2}{2}, \frac{4 + 6}{2}\right) = (-0.5, 0.5, 5)$$

## Common pitfalls

- **Wrong:** Omitting the $z$-coordinate term when calculating distance in 3D
  - Why it fails: Students often forget to extend the 2D distance formula to 3D, leading to incorrect results
  - Correct: Always add the $(z_2 - z_1)^2$ term when calculating distance between two 3D points

## Cheatsheet

| Concept | 2D Formula | 3D Formula |
| --- | --- | --- |
| Distance between two points | $\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$ | $\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2 + (z_2-z_1)^2}$ |
| Midpoint of two points | $\left(\frac{x_1+x_2}{2}, \frac{y_1+y_2}{2}\right)$ | $\left(\frac{x_1+x_2}{2}, \frac{y_1+y_2}{2}, \frac{z_1+z_2}{2}\right)$ |

## What's next

The distance and midpoint formulas are foundational tools for geometric problem solving in IB AA SL, appearing in both Paper 1 and Paper 2, often combined with trigonometry to create multi-part exam questions. After mastering these core formulas, you will build on them with triangle trigonometry and trigonometric functions in this unit.

- [Right triangle trigonometry and the unit circle](https://www.owlsprep.com/study/ib-math-aa-sl-u3-right-triangle-trigonometry-and-the/)
- [Sine rule, cosine rule and area of triangles](https://www.owlsprep.com/study/ib-math-aa-sl-u3-sine-rule-cosine-rule-and/)
- [Graphs of trigonometric functions](https://www.owlsprep.com/study/ib-math-aa-sl-u3-graphs-of-trigonometric-functions/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-sl-u3-2d-and-3d-coordinate-geometry/
