# Circle packing in a square

Circle packing in a square is a packing problem in recreational mathematics, where the aim is to pack n unit circles into the smallest possible square. Equivalently, the problem is to arrange n points in a unit square aiming to get the greatest minimal separation, dn, between points.[1] To convert between these two formulations of the problem, the square side for unit circles will be L = 2 + 2/dn.

## Solutions

Solutions (not necessarily optimal) have been computed for every N ≤ 10,000.[2] Solutions up to N =20 are shown below.[2] The obvious square packing is optimal for 1, 4, 9, 16, 25, and 36 circles (the six smallest square numbers), but ceases to be optimal for larger squares from 49 onwards.[2]

Number of circles (n) Square side length (L) dn[1] Number density (n/L2) Figure
1 2 0.25
2 ${\displaystyle 2+{\sqrt {2}}}$
≈ 3.414...
${\displaystyle {\sqrt {2}}}$
≈ 1.414...
0.172...
3 ${\displaystyle 2+{\frac {\sqrt {2}}{2}}+{\frac {\sqrt {6}}{2}}}$
≈ 3.931...
${\displaystyle {\sqrt {6}}-{\sqrt {2}}}$
≈ 1.035...
0.194...
4 4 1 0.25
5 ${\displaystyle 2+2{\sqrt {2}}}$
≈ 4.828...
${\displaystyle {\frac {\sqrt {2}}{2}}}$
≈ 0.707...
0.215...
6 ${\displaystyle 2+{\frac {12}{\sqrt {13}}}}$
≈ 5.328...
${\displaystyle {\frac {\sqrt {13}}{6}}}$
≈ 0.601...
0.211...
7 ${\displaystyle 4+{\sqrt {3}}}$
≈ 5.732...
${\displaystyle 4-2{\sqrt {3}}}$
≈ 0.536...
0.213...
8 ${\displaystyle 2+{\sqrt {2}}+{\sqrt {6}}}$
≈ 5.863...
${\displaystyle {\frac {\sqrt {6}}{2}}-{\frac {\sqrt {2}}{2}}}$
≈ 0.518...
0.233...
9 6 0.5 0.25
10 6.747... 0.421... 0.220...
11 ${\displaystyle 3+{\sqrt {2}}+{\frac {\sqrt {6}}{2}}+{\frac {\sqrt {2+4{\sqrt {2}}}}{2}}}$
≈ 7.022...
0.398... 0.223...
12 ${\displaystyle 2+15{\sqrt {\frac {2}{17}}}}$
≈ 7.144...
${\displaystyle {\frac {\sqrt {34}}{15}}}$
≈ 0.389...
0.235...
13 7.463... 0.366... 0.233...
14 ${\displaystyle 6+{\sqrt {3}}}$
≈ 7.732...
${\displaystyle {\frac {8}{13}}-{\frac {2{\sqrt {3}}}{13}}}$
≈ 0.349...
0.226...
15 ${\displaystyle 4+{\sqrt {2}}+{\sqrt {6}}}$
≈ 7.863...
${\displaystyle {\frac {1}{2}}+{\frac {\sqrt {2}}{2}}-{\frac {\sqrt {3}}{2}}}$
≈ 0.341...
0.243...
16 8 0.333... 0.25
17 8.532... 0.306... 0.234...
18 ${\displaystyle 2+{\frac {24}{\sqrt {13}}}}$
≈ 8.656...
${\displaystyle {\frac {\sqrt {13}}{12}}}$
≈ 0.300...
0.240...
19 8.907... 0.290... 0.240...
20 ${\displaystyle {\frac {130}{17}}+{\frac {16}{17}}{\sqrt {2}}}$
≈ 8.978...
${\displaystyle {\frac {3}{8}}-{\frac {\sqrt {2}}{16}}}$
≈ 0.287...
0.248...

## Circle packing in a rectangle

Dense packings of circles in non-square rectangles have also been the subject of investigations.[3][4]