Historical Context & Motivation
For thousands of years, geometry and algebra were treated as entirely separate branches of mathematics. Greek mathematicians like Euclid could prove elegant theorems about shapes, but they had no systematic way to attach numbers to every point in space. Meanwhile, algebraists could solve equations without any visual picture of what their solutions looked like. The breakthrough came when mathematicians realised they could merge these two worlds—placing shapes on a numbered grid so that every geometric question could be answered with an equation, and every equation could be drawn as a curve.
This fusion is called coordinate geometry (also known as analytic geometry), and it transformed how we think about distance, position, and shape. The timeline below traces the key moments that led to the tools you will use in SL 3.1.
The central question that coordinate geometry answers is deceptively simple: Given two points described by numbers, how far apart are they, and where is the point exactly halfway between them? In this lesson you will learn the formulas for distance and midpoint in both 2D and 3D, and you will see why these formulas are really just the Pythagorean theorem in disguise.
Core Principles & Definitions
Before diving into formulas, it is important to understand the foundational ideas that make coordinate geometry work. Every calculation in this topic rests on a small set of principles, each of which connects algebra to the geometric world you can visualise.
Ordered Pairs & Triples
The Pythagorean Theorem
Distance = Length of a Segment
Midpoint = Average of Coordinates
Seamless 2D → 3D Extension
Visual Explanation — Distance in 2D
The diagram below shows two points, A(1, 2) and B(7, 6), plotted on a Cartesian plane. A right triangle is constructed by drawing horizontal and vertical legs from one point to the other. The horizontal leg has length |7 − 1| = 6, and the vertical leg has length |6 − 2| = 4. The distance AB is the hypotenuse of this right triangle.
Notice how the right-angle box at the corner of the triangle confirms that Δx and Δy are perpendicular. This is the geometric heart of the distance formula: you always form a right triangle and apply the Pythagorean theorem. The midpoint M sits exactly halfway along both the horizontal and vertical directions, which is why you simply average the coordinates.
Mathematical Framework
Here are the four key formulas you need for SL 3.1. Each one is given in its general form, with all variables defined. Study the pattern: the 3D version always adds one more squared difference or one more averaged coordinate.
Extending to Three Dimensions
Moving from 2D to 3D can feel intimidating, but the geometry is essentially the same. In two dimensions, the distance formula uses a single right triangle. In three dimensions, you stack two right triangles together. First you find the distance across the xy-plane (using Δx and Δy), then you treat that result as one leg of a second right triangle whose other leg is Δz. The diagram below illustrates this two-step construction.
This two-step reasoning is exactly why the 3D formula looks the way it does: d = √(Δx² + Δy² + Δz²). Algebraically, if you substitute dxy² = Δx² + Δy² into d² = dxy² + Δz², you get d² = Δx² + Δy² + Δz², which is the formula from Section 4. Understanding the derivation means you can always reconstruct the formula even under pressure.
| Formula | 2D Version | 3D Version |
|---|---|---|
| Distance | √[(x₂−x₁)² + (y₂−y₁)²] | √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²] |
| Midpoint | ((x₁+x₂)/2, (y₁+y₂)/2) | ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2) |
| Key idea | One right triangle | Two stacked right triangles |
Worked Examples
Example 1 — Distance & Midpoint in 2D
Find the distance between A(−3, 4) and B(5, −2), and determine the midpoint of segment AB.
Example 2 — Distance in 3D
Find the distance between P(2, −1, 3) and Q(6, 3, −1).
Common Mistakes & Exam Tips
Even strong students make avoidable errors with the distance and midpoint formulas. The table below lists the most frequent mistakes alongside the correct approach. Reviewing these before an exam can save you easy marks.
| Common Mistake | Why It's Wrong | Correct Approach |
|---|---|---|
| Forgetting to square the differences | Writing √(Δx + Δy) instead of √(Δx² + Δy²) gives a completely different value and can even produce a negative under the radical. | Always square each difference before adding. |
| Sign errors with negatives | Subtracting a negative number, e.g. 5 − (−3), is frequently miscalculated as 5 − 3 = 2 instead of 8. | Use brackets: x₂ − (x₁). Subtracting a negative means adding. |
| Averaging differences instead of coordinates for midpoint | Computing (Δx/2, Δy/2) gives a vector, not a point. The midpoint must be a location in the coordinate system. | Average the actual x-values: (x₁ + x₂)/2. |
| Leaving answer as √(decimal) | IB examiners expect exact values where possible. Writing √6.25 instead of 2.5 loses clarity. | Simplify surds: √48 = 4√3. Give exact form first, then approximate if asked. |
| Mixing up distance and midpoint | Applying the midpoint formula when asked for distance (or vice versa) wastes time and earns zero marks. | Read the question carefully. Distance → subtract, square, sum, root. Midpoint → add, divide by 2. |
Connections to Advanced Topics
The distance and midpoint formulas are not isolated facts—they form the foundation for many topics you will meet later in the IB course and beyond. Understanding how these building blocks fit into the bigger picture will deepen your grasp of the syllabus and help you spot connections in unfamiliar exam questions.
| SL 3.1 Concept | Where It Leads |
|---|---|
| Distance in 2D | Equation of a circle: (x − h)² + (y − k)² = r² is just the distance formula set equal to the radius. |
| Distance in 3D | Equation of a sphere, vector magnitudes, and 3D applications in physics (kinematics, fields). |
| Midpoint | Perpendicular bisectors, Voronoi diagrams, and medians/centroids of triangles in later geometry. |
| Pythagorean derivation | In HL, the same logic extends to n-dimensional Euclidean distance and inner-product spaces in linear algebra. |
If you continue to HL or university mathematics, you will see that the distance formula generalises further—to curved surfaces, to higher dimensions, and even to abstract spaces where "distance" is defined by different rules (called metrics). For now, the key insight is that mastering the simple Cartesian distance and midpoint puts you on solid ground for every one of these extensions.
Practice Problems
Lesson Summary
In this lesson you learned the core tools of coordinate geometry as required by IB SL 3.1. The distance formula in 2D, d = √[(x₂ − x₁)² + (y₂ − y₁)²], is a direct application of the Pythagorean theorem, and it extends naturally to 3D by adding a (z₂ − z₁)² term under the radical. The midpoint formula finds the centre of a segment by averaging the coordinates of its endpoints: M = ((x₁ + x₂)/2, (y₁ + y₂)/2) in 2D, with an additional z-average in 3D.
Key exam strategies include watching out for sign errors with negatives, always squaring differences before adding, and simplifying surds to exact form. These formulas connect forward to the equation of a circle, perpendicular bisectors, and vector magnitudes—making them one of the most versatile tools in your IB geometry toolkit.