The big idea: To find the straight-line distance between two points, draw an invisible right triangle and use Pythagoras. The formula wraps this up in one step.
Here (x₁, y₁) and (x₂, y₂) are the two points. The order does not matter because the differences are squared, so they are always positive.
Worked example — distance in 2D
Find the distance between A(1, 2) and B(5, 5).
Step by step
- Identify the coordinates.
- Substitute into the formula.
- Simplify.
Final answer
The distance AB = 5 units.
[Diagram: ] - Available in full study mode
The midpoint: The midpoint of a line segment is exactly halfway between the two endpoint. You simply average the x-coordinates and average the y-coordinate.
Worked example — midpoint
Find the midpoint of P(2, 8) and Q(6, 2).
Step by step
- Average the x-coordinate.
- Average the y-coordinate.
Final answer
Midpoint M = (4, 5).
IB exam tip: Midpoint questions often appear in Voronoi and perpendicular bisector context. Always label your midpoint clearly in your working.
Never wonder what to study next
Get a personalized daily plan based on your exam date, progress, and weak areas. We'll tell you exactly what to review each day.
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.
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 involve cuboids. You may be asked for the length of a space diagonal, which is the distance between two opposite corners of the cuboid.
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 as origin A(0, 0, 0) and the opposite corner as 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: Do not forget to square each difference separately. A frequent error is writing √(6+4+3) = √13 instead of √(36+16+9) = √61.