Topology

An odd number of squares on every polygon

Does every closed curve that does not cross itself pass through the four corners of some square? Toeplitz asked in 1911, and for polygons and smooth curves the answer is yes, because the squares can be counted and the count is odd. For rectangles of a fixed shape the count is even, which is why they needed a different proof — and for an arbitrary continuous curve the square is still not proved to exist.

Worth reading first: Which side of the line is inside · Two opposite points that agree twice.

Draw a closed curve that does not cross itself. Are there four points on it that are the corners of a square? Otto Toeplitz asked the question in 1911, and it looks as if it should be easy. A circle has infinitely many; a square has itself; a long thin ellipse has exactly one, with its sides parallel to the ellipse’s axes and its corners on the two diagonal lines through the centre. Every curve anyone draws turns out to have one.

Five squares on one octagon. Octagon [[1.0756,0.5516],[0.6082,1.2964],[-0.466,1.2294],[-0.8758,0.3153],[-0.797,-0.3348],[-0.3706,-0.7683],[0.2718,-0.6558],[1.1693,-0.4453]]; squares with sides 1.4975, 1.4588, 1.4407, 1.3929, 1.3921.
Fig. 1 An octagon that does not cross itself, and every square whose four corners lie on it, found exactly by solving four linear equations for every choice of four edges.

This octagon has five. They are all of similar size, sides between 1.39 and 1.50, and none of them is obvious — each is tilted to a different angle and each touches four different edges. They were found by an exact method, not by searching: a square is fixed by two of its corners, so put those on two edges, turn the side between them through a right angle to find the other two corners, and ask that those land on two more edges. Each requirement is linear in the positions along the edges, so for every choice of four edges there is one small linear system, and a polygon with eight edges has 4,096 of them.

Why the squares come out as isolated solutions, rather than as families, is a matter of counting dimensions. A square in the plane has four degrees of freedom — two for its centre, one for its size, one for its angle. Asking each of its four corners to lie on a curve is one condition per corner, four in all. Four conditions on four unknowns generically have isolated solutions, finitely many of them, and that is what the linear systems find. A circle is the exception that proves the rule: its symmetry makes every rotation of one inscribed square another, so the conditions are dependent and the solutions form a whole circle of squares. Perturb the circle even slightly and all but finitely many of them disappear.

The same count explains the classical way of looking for a square by hand. Fix one corner aa on the curve and turn the whole curve through a right angle about aa. Wherever the turned copy crosses the original, there is a point bb on the curve whose quarter-turn about aa is also on the curve — two corners of a square at aa, and a third. As aa moves round the curve the crossings move, and the fourth corner traces a path that crosses the curve at isolated places; those are the squares. It is a search in one parameter for a crossing in one more, and it is how the problem was attacked by hand before the linear systems made it mechanical for polygons.

For polygons, and for curves smooth enough to have a tangent everywhere, Toeplitz’s question has been answered: yes. The answer comes from a fact these figures show directly — the squares can be counted, and the count is odd. For a general continuous curve, the kind the Jordan curve theorem is about, the question is still open. It is known as the square peg problem.

Triangles: three, two or one

A triangle is the simplest closed polygon, and its squares can be found by hand.

Three squares, two, or one, in a triangle. acute: 3; right-angled: 2; obtuse: 1.
Fig. 2 Every square inscribed in an acute, a right-angled and an obtuse triangle.

Each square in a triangle has two corners on one side and one corner on each of the other two, and there is such a square on a side exactly when both angles at the ends of that side are at most a right angle. An acute triangle has three; an obtuse triangle has only the square on its longest side. A right-angled triangle has two, and that is the instructive case: the squares on its two shorter sides are the same square, sitting in the right-angled corner, so two squares that are separate in a nearly-right acute triangle have merged into one.

The sizes come from similar triangles. A square standing on a side of length aa, whose opposite vertex is at height hh above it, cuts off a smaller copy of the triangle above it, and matching proportions gives the square’s side as ah/(a+h)ah/(a + h). Since ahah is twice the triangle’s area whichever side is chosen, the square is largest when a+ha + h is smallest, which for an acute triangle is on the shortest side — the opposite of what the eye tends to guess, since the longest side looks as if it has the most room. In the acute triangle of the figure the three squares have sides 1.714, 1.720 and 1.731 — nearly equal, since the three values of a+ha + h are close — and the largest stands on the side of length 3.35, not on the base of length 4.

So the count is odd, except exactly at the right angle, where it is caught in the act of changing. Tilt the triangle from acute to obtuse and two of its three squares slide towards the corner, meet there at the moment the angle is right, and vanish. The count goes from three to one, by two, passing through an even number only at the instant of contact.

An odd number, every time

The same thing happens on every polygon tried.

An odd number of squares, every time. 500 polygons: 1 squares: 327; 3 squares: 166; 5 squares: 7.
Fig. 3 The number of inscribed squares in each of 500 random polygons with five to ten sides, each without self-crossings.

Five hundred random polygons, star-shaped about a centre and so certainly without self-crossings, with five to ten sides: 327 have exactly one inscribed square, 166 have three and 7 have five. Not one has an even number, and so not one has none.

The reason is the same as for the triangle. The squares on a polygon depend continuously on the polygon, so as the polygon is deformed each square moves smoothly — except at isolated moments when two squares meet and annihilate, or one square is born and immediately splits into two. A deformation can therefore change the count only by two. Deform any polygon into a triangle, or into a shape whose squares can be counted directly, and the count was odd all along, which proves there is at least one. Lev Schnirelmann gave essentially this argument for smooth curves in 1929, Walter Stromquist extended it in 1989 to every curve that is locally monotone — a class including all polygons and all smooth curves — and Igor Pak wrote down a version of it for polygons alone.

Squares born in pairs

The parity argument can be watched directly.

Squares appear and vanish in pairs. Counts along the path: 0.00:3 0.05:3 0.10:3 0.15:3 0.20:3 0.25:3 0.30:1 0.35:1 0.40:1 0.45:1 0.50:1 0.55:1 0.60:1 0.65:1 0.70:1 0.75:3 0.80:5 0.85:5 0.90:5 0.95:5 1.00:5; changes 0.269: 3→1, 0.750: 1→3, 0.756: 3→5, 0.925: 5→7, 0.938: 7→5.
Fig. 4 The number of inscribed squares along a path of octagons joining two octagons, counted at 161 points, with three of the octagons drawn above with their squares.

Two octagons are joined by a path of octagons — each vertex’s angle and distance from the centre moved steadily from one to the other — and the inscribed squares are counted at 161 points along the way. The count starts at 3, drops to 1 at a quarter of the way, rises to 3 and immediately to 5 at three quarters, goes to 7 briefly at 0.93 and returns to 5. Every change is by exactly two, and every one of the 161 octagons sampled has an odd number of squares, because the sampled points did not land exactly on a moment of contact. The middle octagon, with one square, looks like the others; nothing in its shape advertises that it has lost two.

There is a subtlety the figure hides. A deformation between two polygons can pass through polygons that are not generic — where squares are tangent to one another rather than crossing cleanly through birth or death — and the parity argument has to show that every such degeneracy changes the count by an even number. That is where the work in Schnirelmann’s and Stromquist’s proofs lies, and it is why the argument needs some smoothness, or a polygon, to control what the squares can do.

Rectangles of a fixed shape

Replace the square by a rectangle with its long side rr times its short side, and the same method finds them all.

Rectangles of three proportions on one octagon. 1.5:1 — 6; 2:1 — 4; 3:1 — 4.
Fig. 5 The octagon of the first figure with every inscribed rectangle of proportions 1.5, 2 and 3 to one.

The octagon has six rectangles of proportion 1.5, four of proportion 2 and four of proportion 3. All even, where its squares were odd.

That every closed curve has some inscribed rectangle, of unspecified shape, is an old and beautiful theorem, usually credited to Herbert Vaughan. A rectangle is two chords of the curve that share a midpoint and have the same length, its two diagonals. To each unordered pair of points on the curve assign the point in space above their midpoint at a height equal to their distance apart; the unordered pairs of points on a closed curve form a Möbius band, and this map sends its edge — the pairs of coincident points — onto the curve itself in the plane. If the band were embedded in space without touching itself, it could be capped with the disc inside the curve to make an embedded projective plane, which is impossible. So two different pairs map to the same point, and they are the diagonals of a rectangle. The argument says nothing about the rectangle’s proportions.

Squares in odd numbers, rectangles in even

Counting the rectangles as the proportion changes shows what goes wrong for rectangles.

Squares in odd numbers, rectangles in even. Counts: 1.00:5 1.03:10 1.07:10 1.10:10 1.13:10 1.17:10 1.20:10 1.23:8 1.27:8 1.30:6 1.33:6 1.37:6 1.67:6 2.00:4 2.33:4 2.67:4 3.00:4 3.33:4 3.67:4 4.00:4 4.33:6 4.67:6 5.00:6 5.33:6 5.67:8 6.00:8.
Fig. 6 The number of rectangles of proportion r to one inscribed in the octagon of the first figure, for r from 1 to 6.

At r=1r = 1 there are five squares. Just above it there are ten rectangles: each square opens into two, one with its long side close to each of the square’s two side directions. From there the count changes by two at a time, falling to 8, 6 and 4 as pairs annihilate and rising again to 6 and 8, and it stays even — between 4 and 10 — at every proportion other than one.

That is the trouble. An even count can be nought, so a parity argument proves nothing about rectangles of a given proportion. It took a different method entirely: Joshua Greene and Andrew Lobb proved in 2020 that every smooth closed curve has an inscribed rectangle of every proportion, by showing that the rectangles correspond to intersections of a certain surface with itself — a Klein bottle in four-dimensional space, which cannot be placed there without the intersections that the rectangles are. The difference between the two counts comes from symmetry. A square is unchanged by a quarter-turn and a rectangle is not, and the doubling just above r=1r = 1 shows the consequence: every square becomes two rectangles, so whatever the squares’ count is, the rectangles’ is twice it, and twice anything is even.

Why a continuous curve is harder

Every proof above needs control of the curve: a polygon has finitely many edges, a smooth curve has a tangent, a locally monotone curve has no wild oscillations. An arbitrary continuous curve has none of these. It can have a corner at every point, or have positive area. The natural strategy is to approximate it by polygons, each of which has an inscribed square, and take a limit of those squares. The limit of squares is a square — or a single point, if the squares shrink to nothing. Nobody has been able to rule out that the squares inscribed in finer and finer polygonal approximations of some wild curve shrink to a point, and that is exactly the gap.

Partial results nibble at it. Terence Tao proved in 2017 that the conjecture holds for curves that are the union of two graphs of functions with Lipschitz constant less than one; others have handled curves with various bounds on how fast they oscillate. Each result adds a condition that keeps the squares from shrinking, and each condition fails on some curve. The same frustration runs through everything known about such curves: every simple closed curve is a circle in disguise, but the disguise can be so wild that no geometric property of the circle survives it, and squares are a geometric property.

Other shapes, and other dimensions

Squares and rectangles are not the only shapes asked about. Triangles are easy: Mogens Nielsen proved in 1992 that every closed curve that does not cross itself has inscribed triangles similar to any triangle one names, and on a smooth curve there is a whole one-parameter family of each, because a triangle has four degrees of freedom and only three corners to place. The difficulty begins with four corners, where conditions and freedoms balance and the solutions are isolated, and the question becomes whether there must be at least one. Among quadrilaterals, only those whose corners lie on a circle can possibly appear on every curve, since the circle itself is a curve and carries no others. Greene and Lobb extended their argument in 2021 to show that every smooth closed curve does carry every such quadrilateral, up to similarity.

In higher dimensions the question splits, as the Jordan curve theorem itself does: a closed curve in space no longer bounds anything, and the natural analogue asks about closed surfaces and inscribed shapes with more corners. Some versions are known by the same kind of counting and many are open. Underneath, every parity argument here is a statement about cycles that do or do not bound, counted modulo two: the squares on a polygon are the crossings of two cycles in a space of configurations, and the number of crossings of two cycles is fixed modulo two however they are moved. In higher dimensions the spaces of configurations are larger and their cycles more varied, and which counts are available depends on them. The pattern holds throughout: where there is a count, and the count is odd on a shape where everything can be computed, existence follows on everything that can be deformed to it smoothly; where the count is even, a different invariant has to be found.

The method and its limits

The squares in these figures are exact up to floating-point rounding: each is the unique solution of a four-by-four linear system with its four parameters checked to lie between nought and one, and each square’s sides are checked to be equal and perpendicular. A square with a corner exactly at a vertex of the polygon is found from both edges meeting there, and the duplicates are removed by comparing corners; that comparison is the only tolerance in the method.

The parity seen in the counts is not proved by them. It is a theorem for polygons in general position, and the 500 random polygons are a check that the method finds every square — a missed square would show up as an even count. It does not show up on these polygons. On very thin polygons with spikes, where two edges run almost parallel a tiny distance apart, near-coincident squares appear and the tolerance can merge two of them or fail to; the random polygons are kept away from that regime by giving each vertex its own sector of angle.

Still open: the square peg

Does every simple closed curve in the plane have four points forming a square? It is true for polygons, for smooth curves, for locally monotone curves, for curves close enough to being Lipschitz graphs, and for many other classes. For an arbitrary continuous curve, it is open more than a century after Toeplitz asked. The analogous question about rectangles of every proportion is open for continuous curves too, even though some rectangle always exists. Related questions — which shapes other than squares and rectangles must appear inscribed in every curve, and in which dimensions the analogues for surfaces hold — are in the same state: settled for nice cases, open in general, and closed only by proofs that find a quantity the curve cannot change, as the two opposite points that agree are found by one.

Odd, so not nought

A polygon’s inscribed squares can be listed exactly, and there is always an odd number of them — five on the octagon here, three, two or one on a triangle, and odd on all 500 random polygons — because deforming the polygon creates and destroys squares only in pairs. An odd number is never nought, and that proves every polygon and every smooth curve has a square. Rectangles of a fixed proportion come in even numbers, so the same argument fails and a different one was needed. For an arbitrary continuous curve no quantity has yet been found that keeps the squares from shrinking away, and the square peg problem remains open.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

ConjectureExhaustive searchInscribed squareJordan curveMöbius bandParityPolygon