Equiangular Lines and Spherical Codes in Euclidean Space
Abstract
A family of lines through the origin in Euclidean space is called equiangular if any pair of lines defines the same angle. The problem of estimating the maximum cardinality of such a family in was extensively studied for the last 70 years. Motivated by a question of Lemmens and Seidel from 1973, in this paper we prove that for every fixed angle and sufficiently large there are at most lines in with common angle . Moreover, this is achievable only for . We also show that for any set of fixed angles, one can find at most lines in having these angles. This bound, conjectured by Bukh, substantially improves the estimate of Delsarte, Goethals and Seidel from 1975. Various extensions of these results to the more general setting of spherical codes will be discussed as well.
1 Introduction
A set of lines through the origin in dimensional Euclidean space is called equiangular if any pair of lines defines the same angle. Equiangular sets of lines appear naturally in various areas of mathematics. In elliptic geometry, they correspond to equilateral sets of points, or, in other words, to regular simplexes. These simplexes were first studied 70 years ago [14], since the existence of large regular simplexes leads to high congruence orders of elliptic spaces, see [4, 15, 20]. In frame theory, socalled Grassmannian frames “are characterised by the property that the frame elements have minimal crosscorrelation among a given class of frames” [16]. It turns out that optimal Grassmannian frames are equiangular; hence searching for equiangular sets of lines is closely related to searching for optimal Grassmannian frames, see [16]. In the theory of polytopes, the convex hull of the points of intersection of an equiangular set of lines with the unit sphere is a spherical polytope of some kind of regularity, see [7].
It is therefore a natural question to determine the maximum cardinality of an equiangular set of lines in . This is also considered to be one of the founding problems of algebraic graph theory, see e.g. [13, p. 249]. While it is easy to see that and that the three diagonals of a regular hexagon achieve this bound, matters already become more difficult in dimensions. This problem was first studied by Haantjes [14] in 1948, who showed that and that an optimal configuration in (and ) dimensions is given by the diagonals of a convex regular icosahedron. In 1966, van Lint and Seidel [20] formally posed the problem of determining for all positive integers and furthermore showed that , and .
A general upper bound of on was established by Gerzon (see [19]). Let us outline his proof. Given an equiangular set of lines in , one can choose a unit vector along the th line to obtain vectors satisfying for . Consider the family of outer products ; they live in the dimensional space of symmetric matrices, equipped with the inner product . It is a routine calculation to verify that , which equals if and otherwise. This family of matrices is therefore linearly independent, which implies .
In dimensions and this gives upper bounds of and , respectively, matching the actual maxima. In , the above bound shows . This can be achieved by considering the set of all permutations of the vector , see [20, 27]. Indeed, one can verify that the dot product of any two distinct such vectors equals either or , so that after normalising the vectors to unit length this constitutes an equiangular set of lines. Since the sum of the coordinates of each such vector is , they all live in the same dimensional subspace. It is also known that there is an equiangular set of 276 lines in , see e.g. [19], which again matches Gerzon’s bound. Strikingly, these four examples are the only known ones to match his bound [2]. In fact, for a long time it was even an open problem to determine whether is the correct order of magnitude. In 2000, de Caen [6] constructed a set of equiangular lines in for all of the form . Subsequently, several other constructions of the same order were found [2, 12, 17]. For further progress on finding upper and lower bounds on see e.g. [2] and its references.
Interestingly, all the above examples of size have a common angle on the order of . On the other hand, all known construction of equiangular lines with a fixed common angle have much smaller size. It is therefore natural to consider the maximum number of equiangular lines in with common angle , where does not depend on dimension. This question was first raised by Lemmens and Seidel [19] in 1973, who showed that for sufficiently large , and also conjectured that equals . This conjecture was later confirmed by Neumaier [23], see also [12] for more details. Interest in the case where is an odd integer was due to a general result of Neumann [19, p. 498], who proved that if , then is an odd integer.
Despite active research on this problem, for many years these were the best results known. Recently, Bukh [5] made important progress by showing that , where is a large constant only depending on . Our first main result completely resolves the question of maximising over constant . We show that for sufficiently large , is maximised at .
Theorem 1.1.
Fix . For sufficiently large relative to , the number of equiangular lines in with angle is bounded by if and by otherwise.
A more general setting than that of equiangular lines is the framework of spherical codes, introduced in a seminal paper by Delsarte, Goethals and Seidel [9] in 1977 and extensively studied since.
Definition 1.2.
Let be a subset of the interval . A finite nonempty set of unit vectors in Euclidean space is called a spherical code, or for short an code, if for any pair of distinct vectors in .
Note that if , then an code corresponds to a set of equiangular lines with common angle , where . For , finding the maximum cardinality of an code is equivalent to the classical problem of finding nonoverlapping spherical caps of angular radius ; for exact formulae were obtained by Rankin [25]. Generalising Gerzon’s result, Delsarte, Goethals and Seidel [8] obtained bounds on the cardinality of sets of lines having a prescribed number of angles. They proved that, for and , spherical codes have size at most . They subsequently extended this result to an upper bound of on the size of an code when has cardinality , see [9]. A short proof of this estimate based on the polynomial method is due to Koornwinder [18].
Bukh [5] observed that, in some sense, the negative values of pose less of a constraint on the size of codes than the positive ones, as long as they are separated away from . Specifically, he proved that for , where is fixed, the size of any code is at most linear in the dimension. Motivated by the abovementioned work of Delsarte, Goethals and Seidel [8] he made the following conjecture.
Conjecture 1.3.
Let be fixed and let be any reals. Then any spherical code in has size at most for some constant depending only on and .
We verify this conjecture in the following strong form.
Theorem 1.4.
Let for some fixed . Then there exists a constant such that any spherical code in has size at most . Moreover, if are also fixed then such a code has size at most
In particular, if are fixed this substantially improves the aforementioned bound of Delsarte, Goethals and Seidel [8, 9] from to . We furthermore show that the second statement of Theorem 1.4 is tight up to a constant factor.
Theorem 1.5.
Let be positive integers and with and being fixed and . Then there exist , and a spherical code of size in with .
This also resolves another question of Bukh, who asked whether the maximum size of a spherical code in is linear in . By taking to be say , our construction demonstrates that this is not the case.
The rest of this paper is organised as follows. In Section 2 we give a construction of an equiangular set of lines in and prove Theorem 1.1. In Section 3 we prove a special case of Theorem 1.4, namely the case . We provide the construction which shows that our bounds are asymptotically tight in Section 4. In Section 5, we prove Theorem 1.4. The last section of the paper contains some concluding remarks and open problems.
Notation
We will always assume that the dimension and write , respectively to mean as , respectively for some constant and sufficiently large. We will say is fixed to mean that it does not depend on .
Let be a spherical code in . We define to be the associated Gram matrix given by . We also define an associated complete edgelabelled graph as follows: let be its vertex set and for any distinct , we give the edge the value iff . We also say that is a edge and for brevity, we sometimes refer to as the “angle” between and , instead of the “cosine of the angle”. For , we slightly abuse our notation and say that is a edge if . We call a subset a clique if is a edge for all distinct . For any we define the neighbourhood of to be . Furthermore, we define the degree and the maximum degree .
We denote the identity matrix by and denote the all 1’s matrix by , where the size of the matrices is always clear from context. Let be a set of vectors in . We define to be the subspace spanned by the vectors of and for a subspace , define to be the orthogonal complement. For all define to be the normalised (i.e. unit length) projection of onto the orthogonal complement of , provided that the projection is nonzero. That is, if we write for , and , then . More generally, for a set of vectors we write .
2 Equiangular lines
Suppose that we are given a set of equiangular lines in dimensional Euclidean space with common angle . By identifying each line with a unit vector along this line, we obtain a set of unit vectors with the property that the inner product of any two vectors equals either or . As we have already mentioned in the introduction, we will refer to such a set as a code. Given a code , we call an edge of positive and a edge negative.
Observe that a particular set of equiangular lines corresponds to various codes, depending on which of the two possible vectors we choose along each line. Conversely, this means that we can negate any number of vectors in a code without changing the underlying set of equiangular lines. In the corresponding graph, this means that we can switch all the edges adjacent to some vertex from positive to negative and vice versa.
The proof of Theorem 1.1 builds on several key observations. The first is that we can find a large positive clique in and, after appropriately negating some vertices, we can furthermore show that almost all vertices in attach to this clique entirely via positive edges. We then project this large set onto the orthogonal complement of the positive clique. Next we observe that the resulting graph contains few negative edges, which implies that the diagonal entries of the Gram matrix of the projected vectors are significantly larger in absolute value than all other entries. Combining this with an inequality which bounds the rank of such matrices already gives us a bound of . To prove the exact result, we use more carefully the semidefiniteness of the Gram matrix together with some estimates on the largest eigenvalue of a graph.
We finish this discussion by giving an example of an equiangular set of lines with common angle in , first given by Lemmens and Seidel [19]. This is equivalent to constructing a spherical of size . For any such code , observe that the Gram matrix is a symmetric, positivesemidefinite matrix with s on the diagonal and rank at most . Conversely, if is any matrix satisfying all properties listed, then is the Gram matrix of a set of unit vectors in , see e.g. [13, Lemma 8.6.1]. Thus it suffices to construct such a matrix. To that end, consider the matrix with blocks on the diagonal, each of the form code
and all other entries . Clearly is a symmetric matrix, so we just have to verify that it is positivesemidefinite and of rank . To do so, we need to show that has smallest eigenvalue with multiplicity . This is a routine calculation.
2.1 Orthogonal projections
Before we can delve into the proof of Theorem 1.1, we will set the ground by providing some necessary lemmas. We start with a wellknown upper bound on the size of a negative clique, which will guarantee us a large positive clique using Ramsey’s theorem. For later purposes, the lemma is stated in some more generality.
Lemma 2.1.
Let and let be a spherical code in . Then .
Proof.
Let . Then, since every is a unit vector and for ,
which we can rewrite into the desired upper bound on . ∎
Remark 2.2.
We note that equality in the above lemma occurs only if the vectors of form a regular simplex.
As indicated above, this lemma enables us to find a large positive clique in our graph. The next step is to understand how the remaining vertices attach to this clique. A key tool towards this goal is orthogonal projection. We will first need a lemma that lets us compute the inner product between two vectors in the span of a clique in terms of the inner products between the vectors and the clique. Because we will need it again in a later section, we state it in some generality.
Lemma 2.3.
Let and . Suppose is a spherical code of size and is the matrix with as column vectors. Then for all we have
where for are the vectors of inner products between and .
Proof.
Let us first prove that is linearly independent. Suppose that for some reals . Taking the inner product with some gives
Since this equation is true for all and , all are identical. Unless they equal , this implies that , a contradiction.
By passing to a subspace, we may assume that , so that is invertible and we have . Thus
To obtain the result, we observe that is the Gram matrix of , so that and moreover
The following lemma shows how the angle between two vectors changes under an appropriate projection. Recall that denotes the normalised projection of onto the orthogonal complement of .
Lemma 2.4.
Let and let be a set of unit vectors in so that all pairwise inner products, except possibly , equal . Suppose additionally that has size if is negative. Then and are welldefined and we have
(1) 
Proof.
For , write where and . Let be the matrix with as columns and observe that . Let and observe that and , so we can apply Lemma 2.3 to obtain
Thus using the fact that is a unit vector and are orthogonal, we have for . Since , we can finish the proof by computing
∎
Remark 2.5.
Note that when the conditions of the lemma are met we have , which in particular implies that when . Note furthermore that if , then the righthand side of (1) simplifies to (this is most easily seen by looking at the secondtolast term in the final equation of the above proof) and that, for fixed , the latter is a decreasing function in .
In particular, after projecting onto a positive clique (i.e. ) of size , an angle of becomes (that is, if , then ) and an angle of becomes
Since these two angles will frequently pop up, we will make the following definition.
Definition 2.6.
For and , let , where and .
Note that comprises the two possible angles after projecting onto a positive clique of size . A set attached to a positive clique in a code entirely via positive edges therefore turns into an code after projecting. When we project, we will continue to call edges positive or negative according to whether their original values are or . Note in particular that a positive edge may obtain a negative value after projection.
Equipped with this machinery to handle projections, the next lemma gives an upper bound on the number of vertices which are not attached to the positive clique entirely via positive edges. The result is analogous to Lemma 5 of Bukh [5].
Lemma 2.7.
Let be a code in in which all edges incident to any are positive and all edges between and are negative. If , then .
Proof.
Let us first project onto the orthogonal complement of , and let us denote by and by . By Lemma 2.4 and the subsequent paragraph, we verify that is an code in which all edges incident to are negative and have value , which, by creftypecap 2.5, is at most . The positive angles equal and since we get the bound . Let us now project onto the orthogonal complement of . By Lemma 2.4 and creftypecap 2.5 we find that the positive angle becomes
(2) 
Furthermore, using and creftypecap 2.5, the positive angle is at most . Since , this yields an upper bound of on positive angles after projection. Again by creftypecap 2.5, negative angles are still at most . Therefore, after projecting onto the orthogonal complement of , we obtain a spherical code. By Lemma 2.1, it has size at most , concluding the proof of the lemma. ∎
Using this lemma, we will see that, after appropriately negating some vertices, all but a fixed number of vertices are attached to the positive clique via positive edges. Hence Theorem 1.1 can be reduced to studying codes, as follows.
Lemma 2.8.
Let be fixed and let . For all sufficiently large and for any spherical code in , there exists a spherical code in such that
Proof.
Recall that denotes the complete edgelabelled graph corresponding to . From Lemma 2.1 we know that doesn’t contain a negative clique of size . By Ramsey’s theorem there exists some integer such that every graph on at least vertices contains either a negative clique of size at least or a positive clique of size . A wellknown bound of Erdős and Szekeres [11] shows . Thus if , then we are done by taking . Otherwise we have by Ramsey’s theorem that contains a positive clique of size .
For any , let comprise all vertices in for which the edge () is positive precisely when . Let us negate all vertices which lie in for some and note that remains a code. However, all sets for are now empty. Given some with , pick a vertex and consider the code . Since any edge incident to is positive, all edges between and are negative and for large enough, we can apply Lemma 2.7 to deduce that . Moreover, by Lemma 2.4 and creftypecap 2.5 we have that is an code with . Thus we conclude
2.2 Spectral techniques
In view of Lemma 2.8, we just need to bound the size of codes. Our main tool will be an inequality bounding the rank of a matrix in terms of its trace and the trace of its square. This inequality goes back to [3, p. 138] and its proof is based on a trick employed by Schnirelman in his work on Goldbach’s conjecture [26]. For various combinatorial applications of this inequality, see, for instance, the survey by Alon [1] and other recent results [10].
Lemma 2.9.
Let be a symmetric real matrix. Then .
Proof.
Let denote the rank of . Since is a symmetric real matrix, has precisely nonzero real eigenvalues . Note that and . Applying Cauchy–Schwarz yields , which is equivalent to the desired inequality. ∎
We use Lemma 2.9 to deduce the next claim.
Lemma 2.10.
Let be an code in and let denote the average degree of the graph spanned by the negative edges in . Then .
Proof.
Recall that . Every diagonal entry of equals and contains exactly nonzero offdiagonal entries, each of which equals . Observe that by the subadditivity of the rank. Furthermore, and . By applying Lemma 2.9 to we can therefore deduce
which is equivalent to the desired inequality after dividing by . ∎
It thus proves necessary to obtain upper bounds on the average degree of the negative edges in .
Remark 2.11.
The proof of Lemma 2.7 provides us with a bound on , and if we are a bit more careful, we already have enough to prove that for a fixed and , any code has size at most . Indeed, suppose that is an code with . Let and let be the vertices connected to via negative edges. We project onto the orthogonal complement of and observe that since , and hence the positive angle (2) in Lemma 2.7 becomes . Thus we obtain a code which has size at most by Lemma 2.1. Since this holds for all , we have that and hence applying Lemma 2.10 we conclude .
The following lemma shows that it will be sufficient to find an upper bound on in terms of the largest eigenvalue of some fixedsize subgraph of , by which we mean a subgraph of size . Let us fix some standard notation. For a matrix , we denote its largest eigenvalue by . If is a graph, then we can identify with its adjacency matrix , so that we will write to mean . It is wellknown that is monotone in the following sense: if is a subgraph of , then (see e.g. [21, chapter 11, exercise 13])
Lemma 2.12.
Let be a fixedsize code in and assume that as . Let be the subgraph of containing precisely all negative edges. Then .
Proof.
The Gram matrix and are related by the equation
where denotes the allones matrix. Let be a normalised eigenvector of with eigenvalue . Since is positivesemidefinite, we deduce
(3) 
where follows from the fact that is the largest eigenvalue of . Since and are all and , (3) yields the required . ∎
The following two lemmas are concerned with establishing a connection between the average degree of a graph and its largest eigenvalue. The first lemma and its proof are inspired by Nilli’s proof [24] of the AlonBoppana bound on the second eigenvalue of a graph.
Lemma 2.13.
Let be a graph with minimum degree . Let be some vertex of and let be the subgraph consisting of all vertices within distance of . Then .
Proof.
For , let denote the set of vertices at distance from in , let denote the number of edges in and let denote the number of edges in , where we set and, since we will need it later in the proof, . Let us define a function on the vertices of by if . Letting denote the adjacency matrix of , we have . In order to prove the desired bound on , we therefore need to bound the quantity from above in terms of . We have
Note that for , counts the sum of the degrees of all vertices in and is therefore of size at least . Moreover, since every vertex in is adjacent to some vertex in we have . Fix any in the range . Using the above two observations we find
(4) 
Observe that and that we have the identity
Collecting terms belonging to the same in the first sum of (4) and using the estimate and identity of the previous sentence, we find
Averaging over all yields
which is equivalent to the desired inequality. ∎
Lemma 2.14.
Let be a connected graph on

[label=()]

vertices and edges. Then .

vertices and edges. Then .

vertices and edges, so that some vertex has degree . Then .

vertices and edges so that some vertex has degree . Then .

edges so that some vertex has degree . Then .
Proof.
Let denote the adjacency matrix of and the allones vector of appropriate length. Note that , where denotes the average degree of . This is sufficient to establish (i) and (ii), since the average degree of the graphs is and , respectively.
Suppose that is a star with leaves, as in (iii). Let be the vector giving weight to its internal vertex and weight to each leaf. Then and yielding the required .
Suppose that is as in (iv). Let be the vector giving weight to the vertex of degree and to the others. Then and yielding the required .
Finally, suppose that is as in (v) and let be the vertex of degree . If two of the neighbours of are adjacent, we are done by (iv). Otherwise, let be the vector giving weight to , weight to its neighbours and weight to all other vertices. Then and since there are at most vertices of weight . Hence . ∎
The next lemma deals with codes in which the negative edges are very sparse. This will be the case when is rather large.
Lemma 2.15.
Let and let be an code in . If the negative edges form a matching, then .
Proof.
Recall that . Let denote the allones matrix. Since the rank of matrices is subadditive, we have
(5) 
Since the negative edges of form a matching, the matrix consists of identical blocks with ’s on the diagonal and off the diagonal, and identical identity matrices, where denotes the number of negative edges. The former have determinant , the latter . Since , these quantities are nonzero, so that has full rank, that is, . Together with (5) this gives the desired inequality. ∎
Remark 2.16.
Note that one can also prove with some more work.
2.3 Proof of the main result
In this section, we present the proof of Theorem 1.1. First, combining Lemma 2.10 with the newly gained information about the relation between , the largest eigenvalue of fixedsize graphs and , we prove the following theorem about codes. This theorem will allow us to analyse equiangular lines for all angles except .
Theorem 2.17.
Let and so that as . Let be an code in for which every vertex is incident to at most negative edges. Then for sufficiently large .
Proof.
Recall that , where and ; note that . Throughout the proof, let denote the graph consisting only of the negative edges of the graph corresponding to (that is, we delete from all positive edges to obtain ). We split the proof of this lemma into different regimes, depending on the value of .
Case 1, : We will show that no two edges in are adjacent. Together with Lemma 2.15 this will show that . Let . If , cannot contain any edges and we are done. Otherwise, suppose to the contrary that and are unit vectors in so that and are negative edges. Let us decompose and as and , where and are orthogonal to . Since and are unit vectors, taking norms on both sides of each equation and rearranging yields . Since and , we have for sufficiently large and hence . Therefore, . Furthermore, taking the inner product of and gives
a contradiction to , finishing the proof of the first case.
Case 2, : We will prove that decomposes into trees on at most vertices. Lemma 2.12 shows that cannot contain a fixedsize subgraph with . In particular, by Lemma 2.14, doesn’t contain a subgraph on vertices and edges or a subgraph on vertices and edges for any . Since any connected graph on at least vertices contains a tree on vertices, all components have at most vertices, and since the only acyclic components are trees, all components are trees on at most vertices. The average degree of any component is therefore at most and hence so is the average degree of . Applying Lemma 2.10 establishes the required bound
Case 3, : Lemma 2.12 implies that cannot contain a fixedsize subgraph with . We can therefore deduce from Lemma 2.14 that doesn’t contain a vertex of degree higher than , that the neighbourhood of a vertex of degree contains no edges and that the neighbourhood of a vertex of degree is incident to at most more edges. The latter two properties imply that each vertex of degree is adjacent to a leaf. On the other hand, each leaf is adjacent to exactly one vertex (not necessarily of degree ), so contains no more vertices of degree than leaves. Since also doesn’t contain any vertices of higher degree than , the average degree of is at most . Applying Lemma 2.10 establishes the required bound
Case 4, : Let be the average degree of the negative edges in and suppose for the sake of contradiction that . Combining this lower bound on with the upper bound given by Lemma 2.10 yields . Let be the integer satisfying ; note that implies . It is well known that a graph with average degree contains a subgraph with minimum degree at least . Hence contains a subgraph with minimum degree at least . Applying Lemma 2.13 to for , we find that contains a subgraph with maximal eigenvalue and, since the maximum degree of is bounded by a constant independent of , so is the size of by construction. Lemma 2.12 then gives
which together with Lemma 2.10 and yields the required
Now that we have finished all the necessary preparation, we are ready to complete the proof of our first theorem.
Proof of Theorem 1.1.
Let be a code in and let