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
- Write the general distance formula. The distance d between two points is the square root of the squared horizontal gap plus the squared vertical gap.
- Substitute the question's coordinates A(1, 2) as (x₁, y₁) and B(5, 5) as (x₂, y₂).
- Work out each bracket, then add and take the square root.
Final answer
The distance AB = 5 units.
[Diagram: math-coord-distance] - Available in full study mode
The midpoint: The midpoint of a line segment is exactly halfway between the two endpoints.
You simply average the x-coordinates and average the y-coordinates.
Worked example — midpoint
Find the midpoint of P(2, 8) and Q(6, 2).
Step by step
- Write the general midpoint formula. The midpoint is the average of the two x-coordinates paired with the average of the two y-coordinates.
- Substitute the question's coordinates P(2, 8) and Q(6, 2).
- Evaluate each average.
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.