This question popped up in my mind one fine day, and I couldn’t stop thinking about it. So here’s a blog post about it.
The Problem
Find all such that points can be chosen in a 2D integer lattice to form a regular -gon.
Okay, let us unpack what this is asking.
- A lattice refers to the subset of points in where the coordinates are integer values1. In particular, a 2D integer lattice is the subset of points in such that and are both integers.
- A regular -gon refers to a polygon of sides (e.g., triangle, rectangle, pentagon) whose sides are of equal length and all internal angles are of equal measure. Common examples of regular -gons are equilateral triangles and squares.
So we are asking for all values of such that the points , , …, form a regular -gon, where each of the coordinates are integers.
There is an obvious value of for which this applies: , the case for which our polygon is a square. There are in fact an infinite number of squares that meet our requirement above. But the challenge is to find other values of that work (if they exist).
Another subtle challenge is that there are multiple orientations to consider when drawing the polygons. Just because a polygon doesn’t work for one orientation doesn’t mean that we can’t find any if the shape is rotated.
A Transformation
To deal with these challenges at the same time, let us consider how the points are located for a regular -gon.
As discussed above, an -gon consists of sides of equal length and internal angles which are of equal measure. But consider what this means for the vertices of the -gon — because the internal angles are of equal measure, that means that the angle between each of the points must be the same. Since there are radians ( degrees) in a full revolution, thus each angle between the points must be radians.
Now let us think about how we can ‘move’ from one point to another on an -gon. More generally, how do we rotate a point in the 2D plane by radians about the centre (i.e., origin)? We will use the idea of polar coordinates to help us with this. Instead of writing the coordinates of a point using and , we will specify the distance from the origin, typically denoted (for the radius of the circle that the point lies on) and the angle between the positive -axis and the point, typically denoted .
Suppose a point has the coordinates . By the Pythagorean theorem, the distance from the origin is . Using trigonometry, one also sees that the angle made between the positive -axis and the point is 2. To convert polar coordinates back to Cartesian coordinates, one can simply use the formulae and .
So what happens when we rotate a point by an angle about the origin? The point is still a distance from the origin, but the angle between the positive -axis and the point is now . In Cartesian coordinates, the point will have the new coordinates and . Using the angle addition formulae for sine and cosine, we see that
So, rotating a point about the origin by will result in the point with coordinates 3.
Back in our original problem, to ‘move’ from one point to another means to rotate that point by a multiple of . So, starting from a point on the regular -gon, another point on that -gon must be
where .
As we will soon see, this will lead to a problem if we want all points to have integer coordinates.
Rational Values of Sine and Cosine
The challenge lies in making sine and cosine rational. Before we reveal what the core result is, let us examine a lemma.
Lemma. There exists a polynomial such that
for all , where the degree of is and is a monic polynomial (i.e., the leading coefficient is 1) with integer coefficients.
This claim is readily proven using mathematical induction on . Let us first cover two base cases. For , note that the polynomial clearly works. For , we note that the polynomial works because
Now let’s assume that the lemma holds for and for some . We will show that the lemma holds for the case. Observe that, by the sum of cosines formula, we get
which means
and therefore
Hence,
works, with having degree . Also, the leading coefficient of is the same as the leading coefficient of , which is, by assumption, 1. Therefore, by induction, the lemma is proven. ∎
With this lemma we can prove the main result.
Theorem. The only values of , where , such that both and are rational are (and ), (and ), and (and ).
This result is quite surprising, but the proof is not too complicated. Suppose is rational, so we can write where and are both integers4 with . Suppose is rational. By the lemma, we observe that
which means that is a root of . Since is rational, and is a monic polynomial with integer coefficients, thus the Rational Root Theorem tells us that must be an integer.
However, note that since . Therefore, the only possible values that can take are -2, -1, 0, 1, and 2. Thus one must conclude that . Given that is between and inclusive, this means that with . ∎
One might deduce the following corollary from the above theorem, often called Niven’s Theorem5.
Corollary. The only values of , where , such that both and are rational are (and ), (and ), and (and ).
The proof is quite simple. Let , so . By the theorem above we know that is rational only when (which means ), (which means ), or (which means ). Consequently the values of that are rational are , , and . ∎
Consequences
Returning to our problem, what does this theorem tell us? Recall that if a point lies on the -gon, then
is another point on the -gon. We also want all the points on the -gon to be integers, which means that both and need to be integers. Let us just focus on . We know two things.
- By the above theorem, can only be rational when (which is impossible since ), , or .
- By the above corollary (Niven’s Theorem), can only be rational when (again, impossible since ), , or .
Thus, for to be rational, we must have . Regardless of the value of , we need consecutive points on the -gon to work, i.e. the case of needs to work. For that case we have which means that , i.e. a square.
In conclusion: the only (where ) such that points can be chosen in a 2D integer lattice to form a regular -gon is , which is the (boring) case of the square.
Image Credits
Cover image by D koi on Unsplash. Cropped from the original.
Footnotes
A lattice in general refers to a subset of with the following properties: (a) component-wise addition/subtraction of two lattice points still results in a lattice point; (b) there is a minimum distance between any two lattice points; and (c) there is a maximum distance for which any point in is within that maximum distance from a lattice point. Read more in this Wikipedia article. ↩
This is not actually true in general; it depends on which quadrant the point lies. In particular, if we let , then the angle is for the first quadrant, for the second quadrant, for the third quadrant, and for the fourth quadrant. But this also ignores the cases where . In general the angle is best described using the function which encompasses the messiness of this computation. ↩
Those familiar with linear algebra would recognise this transformation as the transformation by a rotation matrix on the vector . That is, the resulting point is given by the vector . ↩
In fact, in this representation, is an even number. ↩
Although we presented it as a corollary, this is the actual statement of Niven’s theorem. ↩