On this page
You use π every time you find the area of a circle, but few textbooks show how anyone first calculated it without a calculator. In third-century China, Liu Hui did it with one repeated use of the Pythagorean theorem. His method needs nothing beyond Class 9 geometry, so you can follow every step. This post covers who he was, the doubling method, the numbers it produces, and what students can learn from it.
Who was Liu Hui?
Almost nothing is known of his life. An archived copy of his MacTutor biography says he lived in the Kingdom of Wei during the Three Kingdoms period and wrote two works: a commentary on the *Jiuzhang suanshu*, or *Nine Chapters on the Mathematical Art*, and the shorter *Sea Island Mathematical Manual* on measuring heights and distances. A later source dates the commentary to 263 CE. In his preface he says: "I read the Nine Chapters as a boy, and studied it in full detail when I was older."
The *Nine Chapters* was a practical handbook of methods without explanations. MacTutor's page on the Nine Chapters notes that Liu Hui's commentary of 263 "has become part of the text". What he added was the reasoning: he showed why methods worked and checked how accurate the approximate ones were.
How did he get closer to pi?
His idea was to fit a regular polygon inside a circle and keep doubling its sides. The more sides, the closer the polygon hugs the circle.
Take a circle of radius 1. A regular hexagon fits inside with each side equal to 1, because it splits into six equilateral triangles. Its perimeter is 6, and since the circumference is 2π, this gives the rough estimate π ≈ 6/2 = 3.
Now double. Let one side AB have length p. Drop a line from the centre O through the midpoint Y of AB, meeting the circle at X. Then:
AY = p/2, and OY = √(1 − p²/4) by Pythagoras in triangle OAY.
YX = 1 − OY, because OX is a radius.
AX, a side of the new polygon, is √(AY² + YX²), again by Pythagoras.
That simplifies to the side of the doubled polygon, p′ = √(2 − √(4 − p²)). MacTutor gives this same recurrence for polygons with 3 × 2ⁿ sides, which Liu Hui obtained with the *gougu* theorem, the Chinese name for Pythagoras's theorem.
Worked example: from a hexagon to 96 sides
Use p′ = √(2 − √(4 − p²)) and the estimate π ≈ (number of sides × side)/2. Values are rounded to six decimal places, and they match the table in the MacTutor biography.
6 sides: p = 1, so π ≈ 6 × 1/2 = 3.
12 sides: p = √(2 − √3) = √(2 − 1.732051) = 0.517638, so π ≈ 12 × 0.517638/2 = 3.105829.
24 sides: p = 0.261052, so π ≈ 3.132629.
48 sides: p = 0.130806, so π ≈ 3.139350.
96 sides: p = 0.065438, so π ≈ 3.141032.
MacTutor reports that Liu Hui used 3.14 from the 96-sided polygon, and went on to 3.14159 from a polygon of 3072 sides, which is the hexagon doubled nine times. The biography also notes that, unlike Archimedes, he did not trap π between an inner and an outer polygon.
What mistakes do students make with this method?
Using the polygon's area when you meant its perimeter. Here the estimate comes from perimeter: π ≈ perimeter/diameter. Liu Hui also knew the area relation; MacTutor quotes him saying that "multiplying half the diameter and half the circumference, one gets the area".
Rounding square roots too early. If you round √3 to 1.7 in step 2 you get π ≈ 3.29, which is worse than the hexagon. Keep at least six digits through every doubling.
Thinking the polygon can overshoot. An inscribed polygon is always shorter than the circle, so each estimate is slightly too small and creeps upward. If your value goes above 3.1416, something has gone wrong.
These are good checks for any Class 10 or JEE question on areas related to circles. For a later Chinese mathematician who learned from Liu Hui's commentary and went much further, read our post on Zu Chongzhi and 355/113.
If seeing the polygon close in on the circle would help more than reading about it, the Fermi Simulation Lab has interactive simulations for ideas that are easier to see than read.
What can a student take from Liu Hui's way of working?
The MacTutor overview of Chinese mathematics says Liu Hui "gave a more mathematical approach than earlier Chinese texts, providing principles on which his calculations are based", and that he understood iterative processes and the idea of a limit. He also knew where to stop claiming. When he could not find the volume of a sphere, MacTutor reports, he left it for a future mathematician and wrote: "Let us leave the problem to whoever can tell the truth."
That is a good model for your own work. Explain why a method works instead of just using it, check how accurate an approximation is, and say plainly what you have not solved.
Try it now: carry the table one more step to 192 sides and check that you get about 3.141452.



