2 : 1 · octave
← All deep dives
ongoing / /Updated 21 November 2026 /1 update ↓ / 18 min read

Is √2 the floor? Hunting for curves with small inscribed squares

Every closed curve should contain the four corners of a square, but how small can that square be? Claude and I hunted for curves that hold only tiny squares. Every search stopped just above √2, and we proved it for twenty of the hardest cases.

Draw any closed loop on a sheet of paper, as wild as you like, as long as it never crosses itself. Is there always a square whose four corners all sit on your loop?

Otto Toeplitz asked this in 1911. More than a century later, nobody knows. It is proved for smooth loops, for loops of finite length,1 and for many other kinds, but not for every loop. The hard cases are the wild ones, where a sequence of squares might shrink down to a single point and vanish.

Over a few days in November, Claude and I looked at a sharper version of the question. Instead of asking whether a square exists, we asked how big it must be. If you could prove that every loop holds a square of at least a certain size, compared with the loop itself, the squares could never shrink away, and Toeplitz’s question would be answered.

We didn’t prove that. What we did was hunt, hard and in many ways, for loops whose squares are as small as possible. Every hunt stopped at the same floor, just above the circle’s value. Along the way we proved a few things, turned the most important near-misses into computer-checked proofs, and learned exactly how a counterexample would have to look.

#The question

Take a simple closed curve γ\gamma and its inradius rr, the radius of the largest disc that fits inside it. Define

σ(γ)=side of the largest square inscribed in γr.\sigma(\gamma) = \frac{\text{side of the largest square inscribed in } \gamma}{r}.

The ratio doesn’t depend on scale. For a circle of radius 1, the inscribed square has side 2\sqrt{2}, so σ=2≈1.4142\sigma = \sqrt{2} \approx 1.4142. An equilateral triangle has about 1.61, a long stadium 2.

Why does this help with Toeplitz? Suppose every smooth curve had σ≥c\sigma \ge c for some fixed c>0c > 0. Any curve, however wild, can be approximated by smooth ones whose inradius stays at least half of the original. Each holds a square of side at least c r/2c\,r/2, and those squares can’t shrink to a point. Their limit is a genuine square on the original curve. So a size bound, any size bound, would settle the whole problem.

The obvious guess is that the circle is the worst case:

σ(γ)≥2for every simple closed curve γ.\sigma(\gamma) \ge \sqrt{2} \quad \text{for every simple closed curve } \gamma.

#What counts as a result

Before any search, we fixed what would count, because a computer search for small squares produces many things that look like results.

Finding all the squares is the hard part. To measure σ\sigma, you need the largest square, which means finding every square. We used two independent methods that have to agree. One scans a grid over pairs of points on the curve, looks for cells where the would-be third and fourth corners cross the curve in a twisting pattern, and refines each such cell with Newton’s method. The other launches tens of thousands of Newton searches from scattered starting points. A curve’s σ\sigma counts only when both agree.

This mattered from day one. An optimizer told to make σ\sigma small will find every weakness in how you measure it. Our very first “record” had larger squares that the first method had missed. A second near-record turned out to be resting on ghosts: near-squares whose fourth corner misses the curve by a few thousandths, left behind when two real squares merged and annihilated.

#The hunt

We searched for curves with small σ\sigma in every family we could think of:

  • Smooth curves given by short Fourier series, reshaped by an evolution strategy to push σ\sigma down.
  • The open range only, with a penalty unless the curve reaches beyond Matschke’s ratio of 2.414.
  • Polygons with 12 to 40 corners, so that sharp corners were allowed.
  • Spirals: a disc joined to a corridor that winds outward one and a half or two and a half times.
  • A learned search in the style of PatternBoost:3 a generative model proposes curves, a small neural network predicts their σ\sigma, and a local search polishes the best. Five rounds, 22,000 curves.
proved open (Matschke’s Remark 2.6) 10⁻⁴ 10⁻³ 10⁻² 10⁻¹ 1 1234567 outer radius ÷ inradius how far σ lies above √2 σ = 1.41432 a 40-gon at ratio 6.57 certified σ ≥ √2 verified, not certified no square around the centre
Every curve we verified, plotted by how far its largest square lies above √2 (log scale) and by how far the curve reaches from its incircle. None lies below √2: zero is infinitely far down. The filled points carry a certificate proving σ ≥ √2; twenty of them sit beyond Matschke’s ratio, out to 6.57.

None of them got below 2\sqrt{2}. The best smooth curves stopped at 1.4149; the best in the open range at 1.4145; a 40-sided polygon reaching 6.57 times its inradius stopped at 1.4152. The learned search found the same floor by a different route (1.4151) but didn’t beat the hand-guided runs. The spirals, which I expected to be dangerous, were the opposite. Each turn of the spiral wraps around the disc like a ring, and squares with corners on the outer turns surround it, so σ\sigma came out between 3.8 and 10.5.

The closest approach came last, from a search I’ll describe later: σ=1.41432\sigma = 1.41432, just 0.0001 above the circle, at a ratio of 2.87.

Every near-record curve had the same shape. It touches its incircle at the four corners of a square, or very nearly, and sends arms or lobes outward everywhere else without creating a larger square.

If a curve touches its incircle at the four corners of a square, that square is inscribed, and σ≥2\sigma \ge \sqrt{2} is immediate. So the hunts kept rediscovering the trivial case. The real question became: can a curve avoid that configuration and still get close to 2\sqrt{2}?

#Two strengthenings that died

Our first idea for a proof was a short lemma, which is true and turns out to be the key to everything that follows.

That would prove everything if every curve had an inscribed square around its incircle’s centre. Every one of our first twenty hunted curves did, and in every case the largest square was one of them. So we hunted for a counterexample to that, and found three clear ones: curves where every inscribed square misses the centre, by 1% to 2% of the inradius. (The third curve on the right, above, is one of them.) But their largest squares were huge, with σ\sigma between 2.3 and 2.9.

So we tried the next guess: either some square contains the centre, or some square is enormous, with side at least 2r2r. That died too. A search found curves with no square around the centre and no square of side 2r2r, with σ\sigma near 1.67 and 1.71. They work by keeping the incircle in one lobe and all the squares in a second lobe almost as wide. Still far above 2\sqrt{2}, though. Losing the square around the centre was always expensive.

#Why the record curves stop at √2

Looking closely at the record curves, they all use one mechanism. Four arcs of the curve sit near the four corners of a square inscribed in the incircle, and the largest square has one corner on each arc. This can be made into a theorem.

Put the incircle’s centre at the origin, with radius 1. Near the angles θk=k⋅90∘+ηk\theta_k = k \cdot 90^\circ + \eta_k, suppose the curve is given in polar form by

ρk(φ)=1+gk+ak (φ−θk)2+O(∣φ−θk∣3),\rho_k(\varphi) = 1 + g_k + a_k\,(\varphi - \theta_k)^2 + O\big(|\varphi - \theta_k|^3\big),

where gk≥0g_k \ge 0 is the gap to the incircle (zero at a true contact) and ak>0a_k > 0 says the curve is flatter than the circle there. The rest of the curve can do anything: arms, spirals, any ratio. Now look at the quadratic

Φ(ψ)=∑k=03(−1)k[gk+ak (ψ−ηk)2].\Phi(\psi) = \sum_{k=0}^{3} (-1)^k \Big[ g_k + a_k\,(\psi - \eta_k)^2 \Big].

The proof puts three corners of a rotated square on three of the arcs, which is three equations in the square’s centre and size and has a unique solution for each rotation. The fourth corner then misses its arc by Φ(ψ)\Phi(\psi) plus a small error, so a sign change of Φ\Phi means the fourth corner crosses the curve. The square’s centre stays very close to the incircle’s centre, and the enclosure lemma does the rest.

Two checks made me trust it. On 300 random configurations, the sign of Φ\Phi predicted correctly in 299 cases whether the square exists; the one miss had a 1% margin, where the neglected terms decide. And every near-record curve we could analyse this way, fourteen of them, passes the sign test: its largest square is the four-arc square.

We then hunted inside the fold, where the theorem says nothing. The square didn’t disappear: it slid 10 to 30 degrees around the incircle and kept surrounding the centre, and σ\sigma rose to 1.424 and above.

#Borrowing Matschke’s lemma

The four-arc theorem only works near the incircle. To go further, we needed a global argument, and the one that worked came from re-reading how Matschke proved his own theorem.

His proof rests on a general lemma (Lemma 2.5 in his paper). Take any region AA containing the curve, and look at all squares whose four corners lie in AA. Pick one family of these squares, a connected piece of that space that never contains a square shrunk to a point. If a nearby generic curve has an odd number of squares in the family, then so does every curve you can deform it into within AA, and in particular yours. Matschke then remarks that it would be desirable to extend the method to more general shapes. That is what we did.

First, curves star-shaped about their centre. Shrink the curve radially onto its incircle. Near the circle, the squares around the centre come in an odd number. As the curve grows back, the count can only change when some square has the centre exactly on one of its edges. That edge then joins two points of the curve in opposite directions, at distances a,b≥1a, b \ge 1, and a little geometry pins down the other two corners: they lie at least 5\sqrt{5} inradii from the centre, and the angle between them, seen from the centre, is

arctan⁡2+t1+t,t=ab+ba≥2,\arctan\frac{2 + t}{1 + t}, \qquad t = \frac{a}{b} + \frac{b}{a} \ge 2,

which always lies between 45∘45^\circ and 53.13∘53.13^\circ.

An adversarial search confirmed that the angle condition does real work. Without it, the search quickly found a star-shaped curve with no square around its centre (with σ\sigma still 2.71). With it, the search pressed right up against the condition’s edge and got stuck there, exactly where the proof says the only escape would be.

Second, the finer version. Matschke’s own theorem uses a sharper notion than “contains the centre”: the connected family of the incircle’s squares. Using the curve’s own interior minus the incircle as the region AA, the lemma gives a general criterion:

The point is that both conditions can be checked by a computer, one curve at a time.

Sealed

A 40-gon at ratio 6.57: the family of squares stays clustered around the centre.

Leaking

A curve with no square around its centre: the family drifts up the neck and reaches tiny squares.

Dots mark the centres of the squares in the incircle’s family, the ones the certificate tracks. If the family never shrinks to tiny squares, Matschke’s lemma guarantees the curve has a square in it.

#Turning near-misses into proofs

Checking the component theorem means flood-filling a four-dimensional grid of squares (centre, size, rotation) outward from the incircle’s squares, and showing the flood never reaches tiny squares. To make that a proof rather than a picture, every shortcut has to be replaced by a guaranteed bound:

  1. The curve is exact. Polygons are used exactly as given. Each smooth curve is replaced by a 20,000-sided polygon with a proved bound on how far the true curve can stray from it, about 2×10−72 \times 10^{-7} of the inradius. Each curve is also checked to be simple.
  2. Every cell is tested generously. A grid cell is kept if any square inside it could have its corners in the region, allowing for the most a corner can move within the cell. So the computed family always contains the true one.
  3. The centre is pinned down. The computed incircle isn’t exact, so the certificate boxes in the true incircle centre, excluding every region where it provably can’t be, to within 10−610^{-6} to 10−310^{-3} of the inradius. The squares in the family must then contain that whole box, or be big enough on their own.
  4. Rounding is covered. Every comparison carries a safety margin of 10−910^{-9}, far above the worst-case rounding error.

Then we handed the code and the claim to an independent reviewer, a separate Claude session given only the code and the statement, with instructions to break it. It found no fatal flaw. It sampled 3,100 squares with corners exactly in the region (the test missed none), ran 2.3 million random containment checks (no violations), and reran the certificate on round annuli, where it reproduced Matschke’s threshold, sealed at ratio 2.2 and leaking at 2.5. It also caught real problems: an empty search could have printed “certified”, and nothing checked that the curve was simple or that the centre was inside it. Those are fixed.

This proves nothing in general. What it does show is that the near-misses are genuine: every curve that came close to 2\sqrt{2} is a true instance of the conjecture, not an artefact of rounding or of a missed square.

#Where a counterexample would have to hide

The component theorem also tells you exactly what a counterexample would need. Either the incircle’s family of squares leaks down to tiny squares, or it contains squares smaller than 2 r\sqrt{2}\,r that miss the centre, while the curve still has no square of side 2 r\sqrt{2}\,r anywhere.

So we aimed one last search at those two routes, starting from the best curves we had. It found curves that defeat the certificate with σ\sigma as low as 1.4170, at ratio 4.07. But in every one of them, the largest square was still centred on the incircle, within a third of a percent of the inradius. The certificate couldn’t see that square, because the family also contained smaller squares missing the centre, but the square was there. Those escapes are weaknesses of the certificate, not of the conjecture. The leaking route never appeared at low σ\sigma at all. And one of the runs, which never escaped, produced the closest approach in this post: 1.41432, certified.

#What didn’t work

A partial list, because the dead ends taught as much as the results:

  • A first “theorem” that was already known. Early on we certified, with interval arithmetic, a square on a chiral Koch-type pinwheel curve, and were pleased with it, until the literature check showed that the curve sits inside Matschke’s annulus, so his theorem already covers it.
  • The circle, again and again. Told to avoid the four-contact configuration without any other constraint, the optimizer simply flattened the curve back onto its incircle, where squares slide freely and σ\sigma creeps down to 2\sqrt{2} from above. It had to be told to keep the curve off the circle.
  • Hiding in the error term. When we tested the fold using the four-arc model instead of the real geometry, the optimizer found curves that fooled the model, where the square was in fact still there.
  • Coarse grids. One apparent leak in the last search was an artefact of the grid. On a finer grid, that curve was certified.
  • Twin lobes. We tried to hide the incircle in a lobe too open to hold a square, next to a second lobe holding a slightly smaller one. The opening itself grows a square across its mouth, about 2sin⁡α2\sin\alpha times the inradius for a mouth of half-angle α\alpha, always above 2\sqrt{2}.
  • A proof of the two-contact case. I got half of it: any square with two adjacent corners on the incircle and the other two on the curve is automatically large enough. The existence half fails exactly where it matters, for large excursions.

#What I take away from it

The circle’s 2\sqrt{2} held against everything we threw at it, and for twenty of the hardest curves it now holds by proof, not just by search. The mechanism is clearer too: near-record curves pin a square of four contacts on their incircle, and the only way to lose that square is to let the incircle’s family of squares leak or slide, which in every case we found cost a much larger square elsewhere.

A few lessons I’ll carry into other work:

  • The optimizer is an adversary of your measurement, not just of the problem. Ghosts, missed squares, a misplaced centre, model error, coarse grids: it found every one. Two independent measurements, and a strict one at the end, were not optional.
  • Read how the theorem was proved, not just what it says. The most useful step of the whole project was noticing that our own argument was an instance of Matschke’s lemma, which immediately made it stronger.
  • Have the proof checked by someone who wants to break it. The audit found three real defects in code I would otherwise have trusted.

#Where this goes next

Three things are open. The certificate uses floating point with explicit safety margins; redoing it in interval arithmetic, and with a second, independent implementation, would make the twenty proofs fully rigorous. The certificate is blind to which squares in a family surround the centre, and a count that keeps track of orientation might close the gap the last search exposed. And the general question, Matschke’s Remark 2.6, is still open: nothing here rules out a wild curve that leaks where none of our searches looked.

This post is marked as ongoing, and new findings will be added below as updates.

Update ·

Following the squares into the spirals

At the top of this post I said the hard cases are the wild loops, where a sequence of squares might shrink to a single point and vanish. Since then Claude and I have gone after exactly that failure, at the places where it can happen.

Squares can only vanish at the wild points. Take a loop of finite length everywhere except near a few points, and suppose it holds no square. Smooth the loop near those points, however slightly. The smoothed loop has finite length, so by Asano and Ike it holds a square. But as the smoothing gets finer, those squares can’t settle anywhere on the original loop, which has none. They have to crowd into the smoothed pieces and shrink to a point inside one of them. So the whole question comes down to what happens right next to the wild points. If we could show that a loop can always be smoothed there without creating new tiny squares, those squares would have nowhere to go, and the question would be answered for every loop of this kind.

The classic wild point is a slow spiral. Picture a loop that winds around a centre forever, its turns crowding closer and closer, like a radius of θ−1/2 at angle θ. It has infinite length, and it is outside the class Asano and Ike’s theorem covers.4 Here is what we can now show:

  • Slow round spirals hold squares, and rectangles of every shape, shrinking to the centre. There are now two independent proofs. One finds rectangles between nearby turns, for any spiral that stays close to a smooth, steadily shrinking shape. The other, from a manuscript I’ve been writing alongside, builds rectangles that span many turns, with corners hundreds of turns apart (the right panel below shows a square of this kind). It works for any spiral whose radius keeps shrinking, however irregularly, as long as neighbouring turns end up nearly the same size. So the two proofs cover different spirals: the first also allows turns that wobble in and out, and the second allows steps and kinks. We checked the second construction numerically on several spirals, including a wobbling one and a stepped one.
  • Spirals whose turns aren’t circles hold them too. Zoom in on one turn of an elliptic spiral and the zoomed turns settle onto one fixed oval. A square on that oval that survives small nudges then reappears, slightly shifted, on every turn close enough to the centre (the left panel). A standard degree argument proves it, and the computed squares match the predicted size on turns 50, 500 and 5,000. It works the same for a lopsided shape with no symmetry, and for 2:1 rectangles.

Elliptic spiral

All four corners on one turn (highlighted).

Pinned square

Three corners on outer turns, one deep in the centre.

Two exact squares on spirals with no end. Both spirals keep winding towards the centre forever. Their inner turns are too close together to draw, so they are shaded as a disc. Left: radius θ−1/2(1 + 0.3 cos 2θ), with a square on its tenth turn. Right: radius θ−1/2, with one corner on turn 6, two on turn 12 and one on turn 185. Every corner lies on its spiral to within 10−14.

Squares are special. The same manuscript found an example that sharpens the whole picture. Take a Fermat spiral, whose turns all enclose the same area, run it into the centre and back out along a second arm, and you get a double coil. It can wind as many times as you like, and it contains no square at all. The proof is short: in any rectangle, the two pairs of opposite corners have the same total squared distance from the centre, and on this curve that makes the spiral’s angles cancel out of the square equations, leaving only degenerate solutions. Every other rectangle shape survives. With 40,000 random starts on a coil of about eight turns in and eight back out, we found no squares, but well over a thousand exact rectangles for each of 60°, 72° and even 88.2°.

The coil isn’t a counterexample. It is only a piece of a loop, and once it joins the rest of a loop of finite length, Asano and Ike give that loop a square. What it shows is that winding alone can’t force a square. Whatever forces one near a wild point has to involve how the spiral connects to the rest of the loop. I haven’t found this example in the literature, but the Fermat spiral is a classical curve, so it may well be known.

What is still open. Two kinds of wildness, and they are the real problem:

  1. Wild points that aren’t tidy spirals. Turns that fold like a fractal, or never settle onto any shape, or spirals that alternate long nearly circular stretches with sudden drops. The coil above says any argument here has to use how the wild point is joined to the rest of the loop. This is where Hugelmeyer’s open conjecture on relation-avoiding paths lives too.5
  2. Loops that are wild everywhere. The localization above needs the wildness to sit at a few points. A loop with no stretch of finite length anywhere isn’t covered.

How sure I am. The spiral results are proved in two write-ups that aren’t public or peer reviewed yet. The coil’s proof is elementary, and I checked it line by line. Every construction was also checked numerically, with each corner on its curve to better than one part in a billion. My manuscript also has a sheaf-theoretic version of the localization step. One lemma it depends on still needs a complete proof, so I’ve left those parts out here. None of this settles Toeplitz’s question, and none of it touches the √2 floor: these squares are tiny, and the floor is about the largest one.

#Footnotes

  1. T. Asano and Y. Ike, The rectifiable rectangular peg problem. They prove that every simple closed curve of finite length contains the corners of a square, and of every rectangle shape. ↩

  2. B. Matschke, On the square peg problem and its relatives, Theorem 1.3, Lemma 2.5 and Remark 2.6. His theorem allows any closed curve that winds once around an annulus 1≤∣x∣≤1+21 \le |x| \le 1 + \sqrt{2}. For a simple closed curve, centring the annulus on the incircle shows that “every ratio” is the same as σ≥2\sigma \ge \sqrt{2} for all curves. ↩

  3. F. Charton, J. S. Ellenberg, A. Z. Wagner and G. Williamson, PatternBoost: Constructions in Mathematics with a Little Help from AI (2024). Our version used a simpler generator and surrogate than their transformer. ↩

  4. T. Asano and Y. Ike, Liouville regular Jordan curves, Theorem 6.3: the spiral with radius θ−α(log⁡θ)−β\theta^{-\alpha}(\log\theta)^{-\beta} is Liouville regular, the condition their theorem needs, only when 2α>12\alpha > 1, or 2α=12\alpha = 1 and 2β>12\beta > 1. ↩

  5. C. Hugelmeyer, Inscribed squares and relation avoiding paths. He shows that conjectures on relation-avoiding paths would settle the square peg problem for loops with finitely many arbitrarily complicated singular points. ↩