WorksMathematics
Avoiding Isosceles Triangles in the Integer Grid
Abstract
We construct a set of points in the integer grid containing no isosceles triangle (including degenerate triangles). For every , we also construct a set of grid points containing no isosceles right triangle in any orientation, improving upon a bound of Károlyi and Solymosi.
Introduction
For a positive integer , write . A set is isosceles-free if for every three distinct points . Thus three equally spaced points on a line are forbidden. Let be the largest cardinality of such a set.
Theorem 1.1. There is an absolute constant such that for all .
In 1973, Erdős [1] attributed to Riddell the question of how large an isosceles-free subset one can always extract from arbitrary points in the plane. He singled out the square lattice as a possible extremal example. On page 120 of that paper, he suggested that a method of his and Guy’s could yield points in the grid, and speculated that for some one might even find such points. He also suggested an upper bound with exponent strictly below two. Another paper of Erdős and Guy [2] concerns the related requirement that all pairwise distances be different. In an isosceles-free set a distance may occur repeatedly on disjoint pairs of points.
Wu [3] studied the rectangular-grid problem with positive-area triangles. Ellenberg [4] explicitly asked the square-grid question including collinear triples. Motivated by the problem of reconstructing point configurations from comparisons of distances, Ellenberg and Jain [5] asked whether, for small , the grid contains an isosceles-free set of size that meets every sufficiently large square in the grid. Green records Ellenberg’s grid question, brought to his attention by Zachary Chase, at the end of his discussion of Problem 20 in [6].
A first lower bound comes from a single row, where isosceles triangles are exactly three-term arithmetic progressions. By Behrend’s construction [7], there is an absolute such that for all sufficiently large .
Charton, Ellenberg, Wagner and Williamson [8] sampled points in the whole grid and deleted vertices of surviving triangles to obtain . They also searched small grids computationally and suggested that a random greedy process might yield a linear lower bound.
Song [9] obtained the lower estimate below by sparse hypergraph colouring, and Croot, Mao, Pohoata, Sheffer and Yip [10] proved the upper estimate. For an absolute , their bounds give
Theorem 1.1 removes the logarithmic loss in the lower bound by a deterministic construction.
The sieve of Croot et al. uses the fact that in an isosceles-free set, distinct pairs at a fixed distance cannot share a vertex. For some , they bound the size of a grid set with all pairwise distances distinct by . Thus for large an isosceles-free set as large as in Theorem 1.1 must repeat a distance on disjoint pairs. For Riddell’s question they announce that for some there are -point planar sets whose isosceles-free subsets have size . For the square grid, it remains open whether is unbounded and whether there is a fixed such that .
Green also discusses the problem of avoiding isosceles right triangles of arbitrary orientation. Let denote the largest size of a subset of containing no such triangle. In Gaussian integer coordinates, let be the right-angle vertex and choose the leg vector whose counterclockwise quarter-turn gives the other leg. The vertices are then , , . Pilatte [11] showed that for some , any subset of the grid avoiding these triangles has size . The stronger bound of Jaber, Liu, Lovett, Ostuni and Sawhney [12] for axis-parallel corners applies here as well, since each such corner is an isosceles right triangle.
Károlyi and Solymosi [13] used Gaussian integer digits to show that , where . Our second theorem improves this exponent.
Theorem 1.2. For every there is a constant such that for all .
Here . Modulo the Gaussian prime , the equation for an isosceles right triangle becomes a midpoint equation. We choose digit vectors on a sphere to rule out nonconstant solutions.
Proof of the linear lower bound
For a prime , write for the field of residues modulo , represented by the integers in . We place scaled copies of smaller isosceles-free sets in distinct residue classes on one line modulo . The first lemma forces any noncollinear isosceles triangle into one copy. The second lets us label the copies so that the same holds for equally spaced collinear triples.
Lemma 2.1. Let be an integer, let be prime, and fix . If the vertices of a noncollinear isosceles triangle in lie on the line , then they are congruent coordinatewise modulo .
Proof. Let be the apex and the other vertices. Set and . Both are nonzero because and lies off the line through and . The two equal sides give
Every difference of two points on the prescribed line is a multiple of modulo . This holds for and also for . Since , two nonzero multiples of this direction cannot be orthogonal modulo . Thus at least one of is zero modulo . Interchanging them if necessary, write , where is a nonzero integer vector. The coordinates of and have absolute value less than , so .
If , then divides , forcing . Thus is a nonzero integer of absolute value less than . Dividing by over the integers gives . Modulo , the only multiple of orthogonal to is zero, so as well. Now and modulo . Since is odd, .
Lemma 2.2. For every sufficiently large prime and every prime , there is a labelling such that any three-term arithmetic progression in whose labels form an arithmetic progression in is constant.
Proof. Put . Write each with 32 base- digits, allowing leading zeros. Colour by the parities of its digits and the sum of their squares. This uses at most colours.
Let have the same colour and satisfy . Corresponding digits of and have the same parity, so averaging them gives the digits of the integer . This integer lies in and is congruent to modulo , so it equals . The digit vector of is therefore the midpoint of the other two. All three lie on the same sphere, since the colour fixes the sum of squared digits. The midpoint of two distinct points on a sphere lies strictly inside it, so .
For labels, use the integers with base-four digits in , allowing leading zeros. All lie below , so a midpoint equation modulo holds over the integers. In base four there are no carries, and comparing digits forces all three labels to agree. The number of labels is , which exceeds the number of colours for large . Assign a distinct label to each colour and let be the label assigned to the colour of . A progression whose labels form a progression then has a single colour and is therefore constant.
:::
Proof of Theorem 1.1. For each , let be the largest prime at most and set . We shall choose an absolute constant and prove the following stronger claim by induction on . For every , the line contains an isosceles-free subset of of size at least . Prescribing the intercept will let us choose the label of each smaller copy.
Bertrand’s postulate gives and hence . For large enough that , let be the largest prime at most . Again by Bertrand’s postulate, . Since and , for all sufficiently large we have
Choose so that these inequalities and hold for every and is large enough for Lemma 2.2. Set . For a single point suffices since . When , take with represented in .
Fix and , and assume the claim for smaller grid sizes. For each , let be the unique point of on the prescribed line with first coordinate . Every point of reduces to modulo . Thus these copies are disjoint and lie on the prescribed line in .
Choose a labelling from Lemma 2.2. In the induction hypothesis at side length , the prime is , so the slope is . In copy we want every selected point to satisfy
Dilation by multiplies the intercept by , and translation by adds a fixed residue. Since is invertible modulo , exactly one starting intercept gives in copy . Apply the induction hypothesis in with that intercept. After dilation and translation, we obtain an isosceles-free set in copy with .
Let be the union of the sets . By Lemma 2.1, the vertices of any noncollinear isosceles triangle in would be congruent modulo and hence lie in a single .
For a collinear isosceles triangle in , let be the first coordinates modulo , with corresponding to the apex. The apex is the midpoint, so in . The left-hand side of (2) is linear in , so its values also form a progression, now modulo . Lemma 2.2 gives , again putting all three vertices in one . Since each is isosceles-free, so is .
Finally, gives . Summing over the disjoint sets gives the required bound
Isosceles right triangles
Proof of Theorem 1.2. Three distinct Gaussian integers form an isosceles right triangle if and only if they can be ordered as with . Put . The residue field is , and . Thus the triangle equation reduces to the midpoint equation .
We choose our digits using Behrend’s sphere construction [7, 14]. For an integer , partition according to the sum of the squares of the coordinates, and let be a largest class. There are at most possible sums, so . If satisfy modulo , the equality holds over the integers because each coordinate on either side lies between and . The three vectors lie on the same sphere, and the midpoint of two distinct points on a sphere lies strictly inside it. Hence .
For each integer , form the set of vectors
Reduction modulo recovers the first digit . Subtracting it and dividing by recovers the remaining digits in turn, so . Now suppose satisfy coordinatewise. Their first digits satisfy the midpoint equation in , so all three first digits agree. Subtract the common digit from each vector and divide by . Repeating this argument gives .
To place in the plane, put and encode a vector by the Gaussian integer
If for a Gaussian integer vector with for every , then divides , so . Dividing by and repeating gives .
Each coordinate of a vector in has modulus at most . Applying the preceding observation to differences shows that is injective on . If three images satisfy the triangle equation, then . Each coordinate of has modulus less than , so in . We have already shown that this forces .
Since and , the images fit after translation in a grid of side at most for a constant depending only on . For large , choose the largest with . Then , giving
Choose large enough that . This proves the stated bound for large , and decreasing covers the remaining grid sizes.
References
- [1]P. Erdős, Problems and results on combinatorial number theory, in A Survey of Combinatorial Theory, North-Holland, Amsterdam, 1973, 117–138.DOI
- [2]P. Erdős and R. K. Guy, Distinct distances between lattice points, Elem. Math. 25 (1970), 121–123.DOI
- [3]C. W. Wu, Counting the number of isosceles triangles in rectangular regular grids, arXiv:1605.00180, 2016, revised 2017.arxiv.org/abs/1605.00180
- [4]J. S. Ellenberg, Large finite subsets of Euclidean space with no isosceles (or approximately isosceles) triangles, MathOverflow, 11 March 2019.
- [5]J. S. Ellenberg and L. Jain, Convergence rates for ordinal embedding, arXiv:1904.12994, 2019.arxiv.org/abs/1904.12994
- [6]B. Green, 100 open problems, manuscript, January 2026 version.
- [7]F. A. Behrend, On sets of integers which contain no three terms in arithmetical progression, Proc. Natl. Acad. Sci. USA 32 (1946), 331–332.pubmed.ncbi.nlm.nih.gov/16578230
- [8]F. Charton, J. S. Ellenberg, A. Z. Wagner and G. Williamson, PatternBoost: Constructions in mathematics with a little help from AI, arXiv:2411.00566, 2024.arxiv.org/abs/2411.00566
- [9]Y. Song, Sparse coloring for isosceles-free grids: An AI-assisted proof case study, arXiv:2610.04194, 2026.arxiv.org/abs/2610.04194
- [10]E. Croot, J. Mao, C. Pohoata, A. Sheffer and C. H. Yip, A combinatorial large sieve for Sidon sets, distances, and norm forms, arXiv:2606.17487, 2026.arxiv.org/abs/2606.17487
- [11]C. Pilatte, New bound for Roth’s theorem with generalized coefficients, Discrete Anal. (2022).DOI
- [12]M. Jaber, Y. P. Liu, S. Lovett, A. Ostuni and M. Sawhney, Quasipolynomial bounds for the corners theorem, arXiv:2504.07006, 2025.arxiv.org/abs/2504.07006
- [13]G. Károlyi and J. Solymosi, A Salem–Spencer-type construction for large subsets of integer grids with no isosceles right triangles, arXiv:2607.22828, 2026.arxiv.org/abs/2607.22828
- [14]C. Elsholtz and P. P. Pach, Caps and progression-free sets in Z_n^m, Des. Codes Cryptogr. 88 (2020), 2133–2170.DOI