Compiled in the Western Han from earlier methods, its 246 problems set out applied mathematics including equations and right triangles, with the fangcheng method for simultaneous linear equations; Liu Hui of Wei later wrote a commentary, adding justifications, and devised the circle-division method.

Western Han to present
1984 · EvolutionIn 1984 the Zhangjiashan Han slips of the Suanshu shu (Book of Mathematics) came to light, first showing what lay before the Nine Chapters on the Mathematical Art (Cai Dan, Hubei Provincial Institute of Cultural Relics and Archaeology).2006 · EvolutionIn November 2006 the Hubei Provincial Institute of Cultural Relics and Archaeology and the Yunmeng County Museum carried out a rescue excavation of Han tomb no. 77 at Shuihudi and unearthed 216 bamboo slips of the Suanshu, whose contents overlap seven chapters of the Nine Chapters on the Mathematical Art.

The Nine Chapters on the Mathematical Art is a compiled book of unknown authorship. Liu Hui writes in the preface to his commentary: "The Duke of Zhou made rites and so the nine numbers; the line of the nine numbers is the Nine Chapters", and says that after the burning of books Zhang Cang and Geng Shouchang, "relying on the remains of the old text, each revised and supplemented it". The General Catalogue of the Four Treasuries infers from the name "Shanglin of Chang'an" in the book that whoever set it down lived after the middle of the Western Han. Excavated slips have changed this picture. The Nine Chapters, though the oldest surviving transmitted text, had a mathematical background before it that was long hard to establish for want of sources; the Zhangjiashan Suanshu shu (Book of Mathematics) of 1984 first showed what lay before it, and then came the Shuihudi Suanshu, the Yuelu Shu and the Peking University Suanshu. The Han-dynasty Shuihudi slips came out in 2006, and she says that its Suanshu overlaps the Nine Chapters in seven chapters.

The book has nine volumes and 246 problems, which correspond to only about a hundred "procedures", and the historian Guo Shuchun calls this arrangement "procedure text governing example problems". Each problem takes the form "Suppose there are ... Question ... Answer ... The procedure ...". The working itself is in the text of the Nine Chapters: in the fangcheng procedure the rows are laid out and worked by "multiplying all across" and "subtracting straight", and where a number cannot be subtracted the positive-negative rule applies: "Like names subtract, unlike names add; a positive with nothing to match enters as negative, a negative with nothing to match enters as positive". Liu Hui commented on the book in the fourth year of Jingyuan of Wei (263; the date comes from a later work and Liu Hui did not date his commentary). He says he "analysed the principles in words and took the forms apart in diagrams", and he gave arguments for most of the procedures. In Chapter 1 he used regular polygons inscribed in a circle, going up to ninety-six sides, to reach 3.14 for pi.

The book entered the system in the Tang. The Old Book of Tang's biography of Li Chunfeng records that Wang Sibian, the Grand Astrologer's Assistant for Observation, submitted that the ten mathematical classics including the Five Departments and Sunzi were "full of contradictions"; Li Chunfeng, with Liang Shu, Doctor of Mathematics in the Directorate of Education, and Wang Zhenru, Assistant Instructor in the Imperial Academy, "received an edict to annotate the ten classics including the Five Departments and Sunzi", and "when the work was done, Gaozong ordered it used in the state schools". The New Book of Tang's Treatise on Selection says that the Directorate's school of mathematics had "thirty students", and "the Nine Chapters and the Sea Island, three years in all". The General Catalogue records the later fate of the book: from the Northern Song its methods were rarely handed down; in the Qingyuan years of the Southern Song Bao Hanzhi obtained a copy and had it copied into the palace library; "in the Ming it was lost again", so that Ming mathematicians "had none who had seen it whole"; in the Qing nine chapters were collected from the Yongle Encyclopaedia, and the Catalogue concludes that it was "bright in the Tang, dim in the Song, lost in the Ming".

Scholars do not agree on what kind of mathematics the book shaped. The early mathematics represented by the Shuihudi Suanshu is summed up as "practical, attentive to methods of calculation, concerned with governing" and compares it with the Elements of Geometry, which rests on definitions, postulates and axioms and attends to abstract geometry. There are two further views: Karine Chemla and other scholars hold that the mathematical proof of ancient Greece should not be taken as the only form of proof, while Wu Wenjun points out that the methods of calculation of ancient China are "constructive" in character. The Qing attitude was another: reviewing the Tongwen suanzhi, the General Catalogue says "Chinese and Western methods each have their strengths, and neither can eclipse the other", and notes that the book "wished to replace the Nine Chapters with Western methods". By the late Ming even Xu Guangqi himself had not read the Nine Chapters.

The Nine Chapters is tied to several other canons. The counting rods treated in the entry on Counting Rods & Decimals were its tool at least for root extraction: Volume 4, Shao guang, gives methods for square and cube roots with counting rods. The Six Arts treated in the entry on Six Arts Curriculum include "number"; Liu Hui's preface says "reckoning belongs to the six arts", which the ancients used "to raise the able and instruct the sons of the state". The calendar treated in the entry on Lunisolar Calendar meets it in the person of Li Chunfeng: Li Chunfeng annotated the classics and also revised and compiled the Linde calendar, and the Old Book of Tang says he "revised Liu Zhuo's Huangji calendar". The arrival treated in the entry on Western Learning put the book in a position of comparison; the General Catalogue's account of the old method of the celestial unknown, recognised in the Qing by comparison with borrowed roots, is an example.

A book with no signature became the base text of mathematics through the work of generation after generation who added to it, annotated it and taught it: first the compiled methods, then Liu Hui's proofs, then the Tang Directorate that set it in a three-year course, then its near loss in the Ming and the nine chapters gathered back from the Yongle Encyclopaedia in the Qing. The excavated Suanshu shu and Suanshu have filled in the road that lay before it, and show that the book did not arise from a blank.

Nine Chapters is the class in the chapter on Sciences on a work of mathematics. It covers the Nine Chapters on the Mathematical Art, compiled in the Western Han from methods accumulated since pre-Qin times: in 246 problems it sets out applied mathematics such as equations and right triangles and gives a method for solving simultaneous linear equations (the fangcheng method); Liu Hui of Wei wrote a commentary on it, and in the Tang it became the core textbook of the School of Mathematics.

Sources (11)
  1. MAA: Nine Chapters
  2. MacTutor (DSB): Liu Hui
  3. 維基文庫《九章算術》
  4. 維基文庫《《九章算術》注序(劉徽)》
  5. 維基文庫《舊唐書·李淳風傳》
  6. 維基文庫《新唐書·選舉志上》
  7. 維基文庫《四庫全書總目提要·卷一百七》
  8. 东西问|蔡丹:云梦睡虎地汉简《算术》揭秘的中国古代数学(中国新闻网,2026-07-28)
  9. 中國古代的數學瑰寶,到底厲害在哪?(朱一文,中山大學;科普中國,新華網2024-08-02)
  10. MacTutor: Liu Hui
  11. MacTutor: Xu Guangqi