Ancient WorldAD 263

Liu Hui and the Nine Chapters: Mathematics in Ancient China

The Nine Chapters on the Mathematical Art was China's key ancient maths text. Liu Hui's commentary of AD 263 added proofs and a polygon method for pi.

Set of lead counting rods from the Western Han period found at Xi'an, displayed in the National Museum of China
Set of lead counting rods from the Western Han period found at Xi'an, displayed in the National Museum of China. Image: Gary Todd (CC0), Wikimedia Commons
Contents

The Nine Chapters on the Mathematical Art was the most influential mathematics book of ancient China, a collection of practical problems and solution methods compiled during the Han dynasty. In AD 263 the mathematician Liu Hui, living in the state of Wei during the Three Kingdoms period, wrote a commentary that explained why its methods worked and added new results, including a careful method for calculating pi. Together the book and its commentary shaped mathematics in East Asia for more than a thousand years.

The Nine Chapters

The Nine Chapters (Jiuzhang suanshu) has no single author. Liu Hui wrote that it grew from older material and was edited by the Han officials Zhang Cang and Geng Shouchang in the 2nd and 1st centuries BC. Most historians date its final form to about the 1st century AD. An earlier mathematical text on bamboo strips, the Book on Numbers and Computation, found in a tomb at Zhangjiashan in 1984 and dating to around 186 BC, shows that similar problems were already being studied.

The book contains 246 problems, each with a question, an answer and a general method. Its chapters deal with:

  • areas of fields, including fractions;
  • exchange of grain and other proportions;
  • distribution by proportion and taxation;
  • square and cube roots;
  • volumes of walls, canals and other solids for public works;
  • fair distribution of labour and transport;
  • “excess and deficit”, a method of false position;
  • fangcheng, systems of linear equations;
  • gougu, right-angled triangles.

Calculations were carried out with counting rods laid out on a board. The method for systems of equations in chapter eight works much like the elimination method later taught in Europe as Gaussian elimination, and it requires rules for positive and negative numbers, which the book provides.

Liu Hui and his commentary

Almost nothing is known about Liu Hui himself. He says in his preface that he studied the Nine Chapters as a child, and that he wrote his commentary to set out the reasoning behind its rules. He completed it in 263, in the fourth year of the Jingyuan era of Wei.

His commentary is the earliest surviving Chinese text that systematically justifies mathematical procedures. He explained area formulas by cutting and rearranging shapes, gave a dissection proof of the right-triangle rule known in the West as Pythagoras’ theorem, and used rods of different colours to explain operations on signed numbers. Unlike Euclid’s Elements, his work does not build a system of axioms; instead it shows why each algorithm gives correct results.

Calculating pi

The Nine Chapters used the old value of 3 for the ratio of a circle’s circumference to its diameter. Liu Hui showed that this was too small. He inscribed a regular hexagon in a circle and repeatedly doubled the number of sides, calculating each new side length with the right-triangle rule.

He reasoned that the finer the polygon is cut, the less is lost, until it merges with the circle. Using a 192-sided polygon he showed that pi lies between about 3.141024 and 3.142704 and recommended 3.14 for practical use. He is also credited with extending the calculation to 3,072 sides to obtain 3.1416. Around five centuries earlier, Archimedes had used a similar polygon method in Greece, but there is no evidence that Liu Hui knew of his work.

Volumes and surveying

Liu Hui found that the Nine Chapters rule for the volume of a sphere was wrong. He defined a solid formed where two cylinders cross at right angles, which he called the “double box lid”, and showed that the sphere’s volume could be found from it, but he could not calculate its volume himself. The problem was solved about two centuries later by Zu Gengzhi, son of the astronomer Zu Chongzhi, who calculated pi to seven decimal places.

He also added a short work on surveying, later called the Sea Island Mathematical Manual. Its nine problems show how to measure the height and distance of distant objects, such as an island seen from the shore, using poles and lines of sight.

Legacy

In 656, under the Tang dynasty, the Nine Chapters with Liu Hui’s commentary became part of the Ten Computational Canons, a set of official textbooks edited by Li Chunfeng and used in the state examinations in mathematics. The work spread to Korea and Japan and remained a model for East Asian mathematics until the arrival of European methods. In the 18th century the Qing scholar Dai Zhen recovered much of the text from the Ming-dynasty Yongle Encyclopedia, and modern translations into English and French have made it known worldwide.

Timeline

  • About 186 BC: Date of the Zhangjiashan bamboo text on mathematics.
  • 2nd-1st century BC: Zhang Cang and Geng Shouchang edit the Nine Chapters, according to Liu Hui.
  • About 1st century AD: The Nine Chapters reaches its final form.
  • 263: Liu Hui completes his commentary in Wei.
  • 5th century: Zu Chongzhi calculates pi to seven decimal places.
  • 656: The text enters the Tang Ten Computational Canons.

Why it matters

The Nine Chapters and Liu Hui’s commentary show that ancient China developed advanced mathematics independently of Greece and India, including signed numbers, systems of equations and precise approximations of pi. Like the Egyptian Rhind Mathematical Papyrus, the book was rooted in practical problems, but Liu Hui gave it a depth of reasoning that makes him one of the great mathematicians of the ancient world.

Frequently asked questions

What is the Nine Chapters on the Mathematical Art?

It is an anonymous Chinese mathematics book, the Jiuzhang suanshu, put together over several centuries and in its final form by about the 1st century AD. Its 246 problems, arranged in nine chapters, cover land measurement, proportions, volumes, systems of equations and right-angled triangles.

Who was Liu Hui?

Liu Hui was a mathematician of the state of Wei who completed a commentary on the Nine Chapters in AD 263. Almost nothing is known of his life, but his commentary explains and justifies the book's methods and adds new ones.

How did Liu Hui calculate pi?

He inscribed regular polygons in a circle, starting from a hexagon and doubling the number of sides. With a 192-sided polygon he showed that pi lies between about 3.141024 and 3.142704 and recommended 3.14, and he reportedly extended the method to 3,072 sides to obtain 3.1416.

Did the Nine Chapters use negative numbers?

Yes. Its eighth chapter solves systems of linear equations on a counting board and gives rules for adding and subtracting positive and negative quantities, which Liu Hui says were represented by rods of different colours. This is among the earliest known systematic use of negative numbers.

What is the Sea Island Mathematical Manual?

It is a short work by Liu Hui on surveying with poles and sighting, originally an appendix to his commentary on the ninth chapter. Its first problem calculates the height and distance of an island seen from the shore, which gave the work its name.

Sources and further reading

  • Shen Kangshen, Crossley, John N. and Lun, Anthony W.-C., The Nine Chapters on the Mathematical Art: Companion and Commentary (1999)
  • Chemla, Karine and Guo Shuchun, Les Neuf Chapitres: le classique mathématique de la Chine ancienne et ses commentaires (2004)
  • Needham, Joseph, Science and Civilisation in China, Volume 3: Mathematics and the Sciences of the Heavens and the Earth (1959)
  • Encyclopaedia Britannica, "Liu Hui"

Cite this article

“Liu Hui and the Nine Chapters: Mathematics in Ancient China.” Chronicle, https://chronicle.bigworldlist.com/articles/liu-hui-and-the-nine-chapters/.