IB Maths AI HL Voronoi Diagrams Paper 1 & 2 Perp bisectors & cells ~8 min read

Drawing Voronoi Diagrams

A Voronoi diagram divides a plane into cells, one per site (a fixed point), where each cell contains every location closer to that site than to any other. The edges are perpendicular bisectors between pairs of sites; the vertices are points equidistant from three sites. Most exam questions ask you to find the equation of an edge or locate a missing site — both reduce to standard perpendicular-bisector work.

📘 What you need to know

Cells, edges, and the perpendicular bisector

Every edge in a Voronoi diagram is the perpendicular bisector of the segment joining the two sites in the neighbouring cells. Every point on that edge is equidistant from those two sites, which is exactly the boundary condition: cross the edge and you switch which site is nearest. Three edges meet at a vertex, which is then equidistant from three sites simultaneously — the circumcentre of the triangle formed by those three sites.

Voronoi diagram for three sites x y cell of A cell of B cell of C ⊥ AB ⊥ AC ⊥ BC A (2, 6) B (8, 6) C (5, 1) V equidistant from A, B, C Edge-equation toolkit ① Midpoint of (x₁, y₁) and (x₂, y₂) M = x₁ + x₂ 2 , y₁ + y₂ 2 ② Gradient of segment m = y₂ − y₁ x₂ − x₁ ③ Perpendicular gradient m⊥ = − x₂ − x₁ y₂ − y₁ edge form a x + b y + d = 0
Three sites A(2, 6), B(8, 6), C(5, 1) define a Voronoi diagram with three cells meeting at the vertex V. Each edge (in teal) is a perpendicular bisector; the vertex is equidistant from all three sites.
Edge between sites (x1, y1) and (x2, y2) pass through M = (x1+x22, y1+y22) with gradient m = −x2x1y2y1 use yyM = m(xxM), then rearrange to ax + by + d = 0 (integer coefficients)

Finding a vertex or a missing site

A vertex is the intersection of any two perpendicular bisectors (the third will pass through it automatically because it’s equidistant from all three sites). To find a vertex: write the equations of two edges and solve them simultaneously. To find a missing site: pick a known site in a neighbouring cell, and reflect it across the shared edge. The reflection sits on the perpendicular through the original site, the same distance on the other side — that’s the missing site.

Reflection shortcut: to reflect point P across a line, drop a perpendicular from P to the line, find the foot F, then the reflection P′ satisfies F = midpoint of PP′, so P′ = 2F − P.

🧭 Recipe — equation of an edge

  1. Identify the two sites whose cells share the edge.
  2. Compute the midpoint of the segment between them.
  3. Compute the gradient of the segment.
  4. Perpendicular gradient is the negative reciprocal.
  5. Use point-slope form with the midpoint and perpendicular gradient, then rearrange to ax + by + d = 0 with integer a, b, d.

Worked examples

WE 1

Equation of an edge between two sites

Two sites in a Voronoi diagram are P(0, 0) and Q(8, 6). Find the equation of the edge between the two cells, giving your answer in the form ax + by + d = 0 with integer a, b, d.

midpoint of PQ M = ((0+8)/2, (0+6)/2) = (4, 3) gradient of PQ m = (6 − 0)/(8 − 0) = 3/4 perpendicular gradient m⊥ = −4/3 point-slope through M y − 3 = −4/3 (x − 4) 3y − 9 = −4x + 16 4x + 3y − 25 = 0 check: M = (4, 3) gives 4·4 + 3·3 − 25 = 16 + 9 − 25 = 0 ✓
WE 2

Edge with negative coordinates

Two sites are M(−2, 3) and N(4, −1). Find the equation of the perpendicular bisector that forms the edge between their cells, in the form ax + by + d = 0 with integer coefficients.

midpoint of MN ((−2+4)/2, (3+(−1))/2) = (1, 1) gradient of MN m = (−1 − 3)/(4 − (−2)) = −4/6 = −2/3 perpendicular gradient m⊥ = 3/2 point-slope through (1, 1) y − 1 = 3/2 (x − 1) 2y − 2 = 3x − 3 3x − 2y − 1 = 0 check at (1,1): 3 − 2 − 1 = 0 ✓
WE 3

Vertex of a Voronoi diagram (three sites forming a right triangle)

A Voronoi diagram has three sites P(0, 0), Q(10, 0), and R(0, 10). Find the coordinates of the vertex of the diagram — the point equidistant from all three sites.

perpendicular bisector of PQ (horizontal segment) midpoint (5, 0), PQ horizontal → ⊥ is vertical ⊥PQ: x = 5 perpendicular bisector of PR (vertical segment) midpoint (0, 5), PR vertical → ⊥ is horizontal ⊥PR: y = 5 vertex = intersection V = (5, 5) since △PQR is right-angled at P, the vertex is the midpoint of the hypotenuse QR.
WE 4

Vertex from two edge equations

On a Voronoi diagram, the edge between cells P and Q has equation 2x + y = 10, and the edge between cells Q and R has equation xy = 2. Find the coordinates of the vertex where these two edges meet.

solve the simultaneous equations 2x + y = 10 x − y = 2 add the two 3x = 12 → x = 4 y = x − 2 = 2 V = (4, 2) two perpendicular bisectors are enough — the third will pass through V automatically.
WE 5

Locate a missing site by reflection

A Voronoi diagram has site P(3, 1). The edge of P’s cell that separates P from the missing site Q has equation y = −x + 8. Find the coordinates of Q.

edge has gradient −1, so PQ has gradient +1 line through P(3, 1) with gradient 1: y = x − 2 foot of perpendicular F = intersection of edge and PQ x − 2 = −x + 8 → 2x = 10 → x = 5 y = 3, so F = (5, 3) Q = 2·F − P (reflect P across the edge) Q = (2·5 − 3, 2·3 − 1) = (7, 5) Q = (7, 5) check: midpoint of PQ = (5, 3) lies on the edge, and PQ ⊥ edge ✓
WE 6

Vertex of three sites with a vertical symmetry axis

A Voronoi diagram has sites P(2, 2), Q(8, 2), and R(5, 8). Find the coordinates of the vertex equidistant from all three sites.

⊥PQ: PQ is horizontal, midpoint (5, 2) ⊥PQ: x = 5 ⊥PR: midpoint (3.5, 5), gradient PR = 2 m⊥ = −1/2 y − 5 = −1/2 (x − 3.5) substitute x = 5 into ⊥PR y − 5 = −1/2 (5 − 3.5) = −0.75 y = 4.25 = 17/4 V = (5, 17/4) check distances: PV² = 9 + (9/4)² = 9 + 81/16 = 225/16; QV² same by symmetry; RV² = 0 + (8 − 17/4)² = (15/4)² = 225/16 ✓

💡 Top tips

⚠ Common mistakes

Next up — Interpreting Voronoi Diagrams. With the construction in hand, the focus shifts to using a Voronoi diagram to answer practical questions: which site is closest to a given point, what’s the shortest distance, and which site’s data should be used to predict outcomes at a new location (nearest-neighbour interpolation).

Need help with Voronoi Diagrams?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →