Maths WorkshopMaths problems with full solutions
Exercise 1977Combinatorics › Pigeonhole principleOlympiadAdded 5 Nov 2026

The Sylvester–Gallai theorem

#combinatorial geometry#extremal principle#minimal distance

Statement

Let SS be a finite set of points in the plane, not all on one line. Prove that there is a line containing exactly two points of SS.

Hint

Among all pairs (point PP of SS, line ℓ\ell through at least two points of SS with P∉ℓP\notin\ell), choose one with the smallest distance from PP to ℓ\ell. Show that ℓ\ell contains no third point.

Show solutionHide solution

Solution

Idea (Kelly). Minimise a distance, then find a smaller one if the line has three points.

Setup. Since the points are not all collinear, such pairs (P,ℓ)(P,\ell) exist, and there are finitely many, so one pair minimises d(P,ℓ)=PQ>0d(P,\ell)=PQ>0.

Claim. ℓ\ell contains exactly two points of SS. Suppose it contains at least three. Among three points of ℓ\ell, two (say B≠CB\ne C) lie on the same side of QQ on ℓ\ell; label them so that BB lies between QQ and CC. Then BC≤QC<PCBC\le QC<PC, because PCPC is the hypotenuse of the right triangle PQCPQC.

Consider the line m=PCm=PC (it contains the two points P,CP,C of SS) and the point B∈SB\in S. BB is not on mm. The distance from BB to mm is
d(B,m)=BCsin⁡∠PCQ=BC⋅PQPC<PQ,d(B,m)=BC\sin\angle PCQ=BC\cdot\frac{PQ}{PC}<PQ,
contradicting the minimality of PQPQ. Hence ℓ\ell contains exactly two points of SS. ∎

Remark. Finiteness is needed: for the set of all points with rational coordinates every line through two points contains infinitely many.

Lesson. Extremal principle: pick the configuration minimising a distance, then show a violation would produce a smaller one.