# Sylvester–Gallai theorem

"Sylvester's problem" redirects here. For the matrix equation, see Sylvester equation.

The Sylvester–Gallai theorem asserts that given a finite number of points in the Euclidean plane, either

1. all the points are collinear; or
2. there is a line which contains exactly two of the points.

This claim was posed as a problem by J. J. Sylvester (1893). Kelly (1986) suggests that Sylvester may have been motivated by a related phenomenon in algebraic geometry, in which the inflection points of a cubic curve in the complex projective plane form a configuration of nine points and twelve lines in which each line determined by two of the points contains a third point. The Sylvester–Gallai theorem implies that it is impossible for all nine of these points to have real coordinates. Woodall (1893) claimed to have a short proof, but it was already noted to be incomplete at the time of publication. Eberhard Melchior (1941) proved the projective dual of this theorem, (actually, of a slightly stronger result). Unaware of Melchior's proof, Paul Erdős (1943) again stated the conjecture, which was proved first by Tibor Gallai, and soon afterwards by other authors.[1]

A line that contains exactly two of a set of points is known as an ordinary line. There is an algorithm that finds an ordinary line in a set of n points in time proportional to n log n in the worst case.[2]

## Projective and dual versions

The question of the existence of an ordinary line can also be posed for points in the real projective plane RP2 instead of the Euclidean plane. This provides no additional generality, as any finite set of projective points can be transformed into a Euclidean point set preserving all ordinary lines; but the projective viewpoint allows certain configurations to be described more easily.

By projective duality, the existence of an ordinary line in a set of non-collinear points in RP2 is equivalent to the existence of an ordinary point in a nontrivial arrangement of finitely many lines. An arrangement is said to be trivial when all its lines pass through a common point, and nontrivial otherwise; an ordinary point is a point that belongs to exactly two lines.

## Proofs

### Kelly's proof

For a description of Gallai's original proof of the theorem, see e.g. Borwein & Moser (1990). The proof below is instead due to Kelly.

Suppose for contradiction that we have a finite set of points not all collinear but with at least three points on each line. Call it S. Define a connecting line to be a line which contains at least three points in the collection. Let (P,l) be the point and connecting line that are the smallest positive distance apart among all point-line pairs.

By the supposition, the connecting line l goes through at least three points of S, so dropping a perpendicular from P to l there must be at least two points on one side of the perpendicular (one might be exactly on the intersection of the perpendicular with l). Of those two points, call the point closer to the perpendicular B, and the other point C. Draw the line m connecting P to C. Then the distance from B to m is smaller than the distance from P to l, contradicting the original definition of P and l. One way to see this is to notice that the right triangle with hypotenuse BC is similar to and contained in the right triangle with hypotenuse PC.

Thus there cannot be a smallest positive distance between point-line pairs—every point must be distance 0 from every line. In other words, every point must lie on the same line if each connecting line has at least three points.

### Melchior's proof

In 1941 (thus, prior to Erdős publishing the question and Gallai's subsequent proof) Melchior showed that any nontrivial finite arrangement of lines in the projective plane has at least three ordinary points. By duality, this results also says that any finite nontrivial set of points on the plane has at least three ordinary lines.

Melchior observed that, for any graph embedded in RP2, the formula V − E + F must equal 1, the Euler characteristic of RP2; where V, E, and F, are the number of vertices, edges, and faces of the graph, respectively. Any nontrivial line arrangement on RP2 defines a graph in which each face is bounded by at least three edges, and each edge bounds two faces; so, double counting gives the additional inequality F ≤ 2E/3. Using this inequality to eliminate F from the Euler characteristic leads to the inequality E ≤ 3V − 3. But if every vertex in the arrangement were the crossing point of three or more lines, then the total number of edges would be at least 3V, contradicting this inequality. Therefore, some vertices must be the crossing point of only two lines, and as Melchior's more careful analysis shows, at least three ordinary vertices are needed in order to satisfy the inequality E ≤ 3V − 3.

#### Melchior's inequality

By a similar argument, Melchior was able to prove a more general result. For every k ≥ 2, let tk be the number of points to which k lines are incident. Then

$\displaystyle \sum_{k\geq2} (k-3) t_k \leq -3.\,\!$

Equivalently,

$\displaystyle t_2 \geqslant 3 + \sum_{k\geq4} (k-3) t_k.\,\!$

This is often referred to as Melchior's inequality.

### Coxeter's proof

H. S. M. Coxeter (1969) gave another proof of the Sylvester–Gallai theorem within ordered geometry, an axiomatization of geometry that includes not only Euclidean geometry but several other related geometries. See Pambuccian (2009) for minimal axiom systems inside which the Sylvester–Gallai theorem can be proved.

## The number of ordinary lines

The two known examples of point sets with fewer than n/2 ordinary lines.

While the Sylvester–Gallai theorem states that an arrangement of points, not all collinear, must determine an ordinary line, it does not say how many must be determined.

Let t2(n) be the minimum number of ordinary lines determined over every set of n non-collinear points. Melchior's proof showed that t2(n) ≥ 3. de Bruijn and Erdős (1948) raised the question of whether t2(n) approaches infinity with n. Theodore Motzkin (1951) confirmed that it does by proving that $t_2\ge\sqrt n$. Gabriel Dirac (1951) conjectured that $t_2\ge\lfloor n/2\rfloor$, for all values of n, a conjecture that still stands as of 2011. This is often referred to as the Dirac-Motzkin conjecture, see for example Brass, Moser & Pach (2005, p. 304). Kelly & Moser (1958) proved that t2(n) ≥ 3n/7.

Example of Böröczky's (even) configuration with 10 points determining 5 ordinary lines.

Dirac's conjectured lower bound is asymptotically the best possible, since there is a proven matching upper bound t2(n) ≤ n/2 for even n greater than four.[3] The construction, due to Károly Böröczky, that achieves this bound consists of the vertices of a regular m-gon in the real projective plane and another m points (thus, n = 2m) on the line at infinity corresponding to each of the directions determined by pairs of vertices; although there are m(m − 1)/2 pairs, they determine only m distinct directions. This arrangement has only m ordinary lines, namely those that connect a vertex v with the point at infinity corresponding to the line determined by v's two neighboring vertices. Note that, as with any finite configuration in the real projective plane, this construction can be perturbed so that all points are finite, without changing the number of ordinary lines.

For odd n, only two examples are known that match Dirac's lower bound conjecture, that is, with t2(n) = (n − 1)/2. One example, by Kelly & Moser (1958), consists of the vertices, edge midpoints, and centroid of an equilateral triangle; these seven points determine only three ordinary lines. The configuration in which these three ordinary lines are replaced by a single line cannot be realized in the Euclidean plane, but forms a finite projective space known as the Fano plane. Because of this connection, the Kelly–Moser example has also been called the non-Fano configuration.[4] The other counterexample, due to McKee,[3] consists of two regular pentagons joined edge-to-edge together with the midpoint of the shared edge and four points on the line at infinity in the projective plane; these 13 points have among them 6 ordinary lines. Modifications of Böröczky's construction lead to sets of odd numbers of points with $3\lfloor n/4\rfloor$ ordinary lines.[5]

In 2009, Csima and Sawyer Csima & Sawyer (1993) proved that $t_2(n)\ge\lceil 6n/13\rceil$ except when n is seven. Asymptotically, this formula is already 12/13 ~ 92.3% of the proven n/2 upper bound. The n = 7 case is an exception because otherwise the Kelly–Moser construction would be a counterexample; their construction shows that t2(7) ≤ 3. However, were the Csima–Sawyer bound valid for n = 7, it would claim that t2(7) ≥ 4.

A closely related result is Beck's theorem, stating a tradeoff between the number of lines with few points and the number of points on a single line.

Ben Green and Terence Tao showed that for all sufficiently large point sets, n > n0, the number of ordinary lines is indeed at least n/2.[6] Furthermore when n is odd, the number of ordinary lines is at least 3n/4 − C, for some constant C. Thus, the constructions of Böröczky for even and odd (discussed above) are best possible.

## The number of connecting lines

As Paul Erdős observed, the Sylvester–Gallai theorem immediately implies that any set of n points that are not collinear determines at least n different lines. As a base case, the result is clearly true for n = 3. For any larger value of n, the result can be reduced from n points to n − 1 points, by deleting an ordinary line and one of the two points on it. Thus, it follows by mathematical induction. The example of a near-pencil (a set of n − 1 collinear points together with one additional point that is not on the same line as the other points) shows that this bound is tight.[5]

## Generalizations

The Hesse configuration, in which the line through every pair of points contains a third point. The Sylvester–Gallai theorem shows that it cannot be realized by straight lines in the Euclidean plane, but it has a realization in the complex projective plane.

The Sylvester–Gallai theorem does not directly apply to sets of infinitely many points or to geometries over finite fields: the set of all points in the plane or the set of all points in a finite geometry is an obvious example of a point set without any ordinary lines.

For geometries defined using complex number or quaternion coordinates, however, the situation is more complicated. For instance, in the complex projective plane there exists a configuration of nine points, Hesse's configuration (the inflection points of a cubic curve), in which every line is non-ordinary, violating the Sylvester–Gallai theorem. Such a configuration is known as a Sylvester–Gallai configuration, and it cannot be realized by points and lines of the Euclidean plane. Another way of stating the Sylvester–Gallai theorem is that whenever the points of a Sylvester–Gallai configuration are embedded into a Euclidean space, preserving colinearities, the points must all lie on a single line, and the example of the Hesse configuration shows that this is false for the complex projective plane. However, Kelly (1986) proved a complex-number analogue of the Sylvester–Gallai theorem: whenever the points of a Sylvester–Gallai configuration are embedded into a complex projective space, the points must all lie in a two-dimensional subspace. Similarly, Elkies, Pretorius & Swanepoel (2006) showed that whenever they are embedded into a space defined over the quaternions, they must lie in a three-dimensional subspace.

Every set of points in the plane, and the lines connecting them, may be abstracted as the elements and flats of a rank-3 oriented matroid. In this context, the result of Kelly & Moser (1958) lower-bounding the number of ordinary lines can be generalized to oriented matroids: every rank-3 oriented matroid with n elements has at least 3n/7 two-point lines, or equivalently every rank-3 matroid with fewer two-point lines must be non-orientable.[7] A matroid without any two-point lines is called a Sylvester matroid. Relatedly, the Kelly–Moser configuration with seven points and only three ordinary lines forms one of the forbidden minors for GF(4)-representable matroids.[4]