⭕ Ford Circles & Farey Sequence
About this simulation
Ford circles are a beautiful bridge between geometry and number theory. For every reduced fraction p/q, a circle of radius 1/(2q²) sits tangent to the number line at the point p/q. Lester R. Ford first described them in 1938, but the underlying arithmetic goes back to the Farey sequences studied by John Farey and Augustin-Louis Cauchy in the early 19th century. Remarkably, two Ford circles either are tangent to each other or do not intersect at all — they never overlap, no matter how many fractions you plot.
How it works
- The Farey sequence Fn lists every reduced fraction p/q with 0≤p/q≤1 and denominator q≤n, in increasing order.
- Each fraction p/q gets a Ford circle centred at (p/q, 1/(2q²)) with radius 1/(2q²), so it is always tangent to the x-axis.
- Two fractions a/b and c/d that are neighbours in a Farey sequence satisfy bc−ad=1; their Ford circles are exactly tangent to one another.
- The mediant (a+c)/(b+d) of two Farey neighbours is the simplest fraction that lies strictly between them, and it is exactly the new term that appears once n grows large enough to include denominator b+d.
Key equations
center = (p/q, 1/(2q²)), radius = 1/(2q²)
Tangency of Farey neighbours a/b, c/d: bc − ad = 1
Controls
- Farey order n — how many denominators to include; the sequence grows from 2 fractions at n=1 to 129 at n=20.
- Show mediant construction — animates the Farey sequence growing order by order, fading in each new mediant fraction's circle.
- Fraction labels — show or hide the p/q label under each tangent point (shown only for small denominators to avoid clutter).
- Zoom / pan — scroll to zoom, drag to pan along the number line; Reset view returns to the default framing.
Did you know?
Ford circles are closely tied to the Stern-Brocot tree and to continued fractions: following the chain of mediants that lead to a fraction traces out its continued-fraction expansion, and the sizes of the circles you pass through describe how well that fraction can be approximated by simpler ones — the very idea behind Diophantine approximation.