Ancient Chinese Mathematics (1600 BC - 600 AD)

**By: Tao Steven Zheng (鄭濤)**

## **Note to the reader**

This historical overview on the mathematics of ancient China includes the major developments of mathematical thought in ancient China from the Shang dynasty (1600 – 1046 BC) to the Northern and Southern dynasties (420 – 589 AD). The mathematical development from the Sui dynasty (589 – 618 AD) to the Qing dynasty (1644 – 1911 AD) would be considered Medieval Chinese mathematics, and will not be discussed in this article.

## **Section 1: Early Antiquity**

#### **Mathematics of the Shang**

Much of Chinese mathematics prior the Warring Sates period (476 – 221 BC) was developed out of mysticism and astronomy. The earliest inscriptions of numerals can be traced to oracle bone script of the Shang dynasty (1600 – 1046 BC). The words and numerals of this period were carved on hard media such as animal bones and tortoise shells. Such writing media were then heated until cracked, whereupon the cracks are then interpreted for divination. Aside from religious activities, the oracle bones of this bronze age civilization recorded astronomical occurrences. The records of this era provide a glimpse of the decimal system that is prevalent in East Asian languages. However, unlike the positional system used in later eras, there were many symbols for multiples and powers of tens.

#### **Mathematics of the Western Zhou**

Numerology was another form of divination developed in the early phases of Chinese civilization. This practice matured during the Zhou dynasty (1046 – 256 BC), and has survived to the present day. The oldest documentation of numerology in China is attributed to King Wen of Zhou, and this text is called the *Yijing*, or the *Book of Changes*. Over the next three millennia, the methods prescribed in the *Yijing* garnered much intellectual intrigue. The oracle bone divination of the Shang were essentially contrived interpretations of “responses” from ancestral spirits. The more secular divination of the Zhou reduced prophecy to the interpretation of cosmic actions with the occurrence of random numerical arrangements. These numerical arrangements also included the notions of yin and yang, which have been loosely translated to the female and male forces respectively. However, it is perhaps more accurate to identify yin and yang as metaphysical abstractions that supposedly interact within and between all things.

However numerical this form of divination may appear on the surface, it was far from mathematical. The introduction of the *Yijing* to Europe during the 18th century sparked interest among the European scholars, most notably Gottfried Leibniz. Leibniz was astounded by the similarities of the eight trigrams and sixty-four hexagrams of the *Yijing* to his newly conceived binary number system. Although the trigrams and hexagrams were indeed representations of a binary system, they were not utilised for computation in a scientific manner.

The sophistication of the Zhou court demanded greater mathematical methods for astronomy, surveying, and administration. Although many of the texts that are attributed to the Zhou dynasty were in fact revisions if not completely compiled during the Han dynasty (206 BC – 220 AD), many mathematical commentators of the Han period mention the roots of Chinese mathematical knowledge to the reign of King Wu of Zhou in the 11th century BC. According to the *Zhoubi Suanjing*, or *Arithmetic Book of the Zhou Gnomon*, there were several conversations between the Duke of Zhou and the chief astronomer Shang Gao. Many of these discussions were on the measurement of time and distances using rates, ratios, and right triangles (the Pythagorean Theorem). Although it is uncertain whether the conversations between the Duke of Zhou and Shang Gao were apocryphal, it would not be surprising for a civilization comparable to the ancient Egyptians, and Mesopotamians to have independently discovered mathematical techniques of basic arithmetic and geometry.

#### **Mathematics of the Eastern Zhou**

By 770 BC the official Zhou court diminished its authoritative power over the increasing number of dukedoms. This marked the first year of what will later be called the Eastern Zhou dynasty (770 – 256 BC). This time period would prove to be a pivotal five centuries for Chinese civilization. The first half of the Eastern Zhou dynasty was called the Spring-Autumn period, and the second half was called the Warring States period. This era of strife was responsible for establishing several feudal kingdoms that vied for supremacy with rapidly technological progress. Several schools of thought, such as Legalism, Daoism, Confucianism, and Mohism began to evaluate the current social structures and moral culture in hope of understanding more about human nature and improving government. On the battlefields, generals fought mentally and physically with larger armies, espionage, and economic wars. The introduction of iron weaponry and the invention of the crossbow slowly displaced the chariot warfare of the Shang and Western Zhou dynasties. As for mathematics, several innovations made mathematics more accessible to the commoner. The oldest decimal multiplication table uncovered from archaeological excavations were compiled around the 4th century BC. This multiplication table was written on bamboo strips, which included the 9 x 9 multiplication table, products with one-half, and select products up to 90 squared.

The most important mathematical innovation of the Eastern Zhou dynasty would be the counting board and counting rods. Unique to the Far East, the counting board was the chief computing tool from the Warring States period (476 – 221 BC) to the 15th century AD. Numbers were now written using digits that correspond to different place values. This was due to one key innovation: the decimal positional system. With the decimal positional system, the number 9999 would only require four symbols (but twenty counting rods).

Not only did the counting board ease the expression of numbers, but the built-in place values quickened computation time. The rules of carrying in addition, borrowing in subtraction can now be easily visualized. The counting board standardized many arithmetic algorithms taught in the modern day.

The Warring States period also experienced a growth of enriched mathematical thought, most notably the abstractions of logic and infinity. Several philosophical schools of the Warring States period delved into the art of argumentation and semantics. The Mohist (墨家) and Dialecticians (名辯家) were most prolific in writing down their contemplations of categories and classes, especially on the notions of universals and particulars. The philosopher Gongsun Long (c. 325 - 250 BC) applied such concepts of classes in conjunction with negation to produce ambiguous statements such as *a white horse is not a horse* (白馬非馬). However, such statements were later dismissed by more dominant schools of thought, particularly Confucianism, as perversions of verbal sense. What is clearer than the “white horse argument” is the discussion of contradiction. The notion of contradiction can be found in an anecdote in the Legalist work, the *Han Feizi*. The anecdote introduces a weapons dealer who sells shields and spears. The weapons dealer boasts that his spears that are so sharp that there is nothing it cannot penetrate, but simultaneously his shields are so strong that nothing can penetrate it. This story not only encapsulates the idea of contradiction, but is the origin of the Chinese word for contradiction, *mao-dun* (矛盾), which literally translates to *spear and shield*.

Several paradoxes were recorded by the Daoist philosopher Zhuang Zhou (fl. 4th century BC). These paradoxes were attributed to his longtime friend and dialectician Hui Shi (c. 370 - 310 BC). In the final chapter of Zhang Zhou's work, *Zhuangzi*, what remains of Hui Shi's paradoxical arguments explicitly introduces the concepts of the infinite and the infinitesimal. Hui Shi called what is so vast that it has no exterior, the one of vastness, and what is so small it has no interior, the one of smallness. Hui Shi also created a paradox similar to the paradoxes of the Greek philosopher Zeno of Elea. One states:

一尺之棰，日截其半，萬世不竭

[A rod of one chi halved each day will not cease to be cut after ten thousand generations].

This paradox illustrates the limit of approaching the infinitesimal length. From the above examples, it appears many of these mathematical ideas were littered throughout isolated quotations and anecdotes instead of scientific treatises. Nevertheless, there is one exception: the *Mojing*, or the *Mohist canon*. The *Mojing* can be considered a treasure-trove of scientific thought native to China. What differentiates the Mohists from other schools of thought is their attitude towards the natural sciences. Many schools of thought only appreciate the utility of scientific knowledge; hence, disregarding the need for theory. The Mohist thinkers investigated the mechanics of nature out of the need to understand its fundamental principles. In doing so, the Mohists were driven to define and explain geometric concepts similar to the definitions in Euclid’s elements. With a more theoretical foundation, the Mohists extended their more organized knowledge to experiment and record the principles of simple machines, and ray optics. Nevertheless, with all this achievement, the Mohist school of thought, though considerably influential in its day, was largely dissolved by the end of the Warring States period. During this era of turmoil, kingdoms valued industrial and agricultural knowledge over scientific curiosity. This tragedy in the history of Chinese science was perhaps a reminder that the political environment can chart the destiny of an entire stream of intellectual growth.

## **Section 2: The Early Imperial Age**

#### **The Math-deprived Qin?**

Five hundred years of feudal wars ended with the ascendance of Qin Shihuang, the first emperor of China. In the span of 27 years, Qin Shihuang exploited the best military technologies, and a brutally efficient political philosophy to conquer all of China. The Legalism of Shang Yang, Han Fei and Li Si, with many socio-economic reforms, and its uncompromising meritocracy transformed the kingdom of Qin from the backwaters of China, into an agricultural and industrial powerhouse. Qin Shihuang was a controversial figure in Chinese history. He was the man who forged the Chinese identity, but simultaneously regarded as a ruthless tyrant. However, there is little evidence of any mathematical progress during the Qin dynasty. There were probably two reasons: first, the short time span; second, the immense amount of reform. The Qin dynasty lasted only 15 years, outliving Qin Shihuang by only four years. Much of the 15 years was spent on the standardization of writing, weights and measures, roads, and the construction of numerous mega-projects. There was little time for cultivating culture or intellectual curiosity. Furthermore, Qin Shihuang attempted to destroy much of the “antiquated” schools of thought. Later mathematicians such as Liu Hui even accused the Qin court for burning mathematical texts alongside the Confucian classics. This accusation, although possibly true, was not founded on historical fact.

#### **Mathematics of the Han**

After the fall of Qin, China descended into a civil war between two factions: Han and Chu. The Han prevailed and ushered a new approach to the unification of China. Unlike the despotism of Qin, which favoured efficiency, the Han emperors favoured growth and stability. In doing so, the Han emperors adopted Confucianism as state philosophy with certain Legalist characteristics. During the reign of Han Wudi, the Han Empire expanded its borders in all directions. This expansion in territory opened up trade with foreign kingdoms. It was during the Han dynasty that Chinese culture began to diffused throughout continental East Asia, and even central Asia. Culture blossomed for the next four centuries, and alongside the time to advance mathematics.

The Warring States witnessed two styles of mathematics: the practical, and the theoretical. Since the Mohists largely perished by the Qin dynasty, much of the geometric and semantic definitions did not integrate into Han dynasty mathematics. In the Confucian tradition, which included mathematics as one of the six arts, favoured calculation over abstraction. Nevertheless, one should not discredit the Confucian achievements of mathematics during the Han dynasty. The greatest contribution of the Han dynasty mathematicians would be the organization of mathematical knowledge. This labour of producing curriculum and word problems was credited to Zhang Cang (253 – 152 BC), the first prime minister of the Han dynasty. Zhang Cang was a scholar well-versed in astrology, mathematics, and music theory. The mathematical curriculum that Zhang Cang is credited to have created is organized into nine mathematical methods. Each topic follows certain algorithms called shu.

Throughout the entirety of the Han dynasty, several standardized mathematical texts were compiled. These texts typically include many word problems that involve scenarios relating to commerce, agriculture, surveying and civil engineering. One text called the *Jiuzhang Suanshu*, or the *Nine Chapters of Mathematical Methods*, is considered the chief mathematics textbook in the Far East for nearly two millennia. Finalized in the year 179 AD, the *Jiuzhang Suanshu* details the types of problems and solutions expected for technical experts and civil servants.

**Contents of the Jiuzhang Suanshu**

1. *Fangtian* [Rectangular field] – Areas of various shapes (not just rectangles).
2. *Sumi* [Millet and rice] – Rates of various pricing of grains.
3. *Cuifen* [Proportional distribution] – Distribution of commodities and money at proportional rates; deriving arithmetic and geometric sums.
4. *Shaoguang* [Reducing dimensions] – Continued fractions, computing square roots and cubic roots using a method similar to the Horner-Ruffini method.
5. *Shanggong* [Civil engineering] – Volumes of solids.
6. *Junshu* [Equitable distribution] – More difficult problems on proportion that involve taxation, sharing, and travelling.
7. *Yingbuzu* [Excess and deficit] – Simple systems of linear equations (two variables) solved using the double-false position method.
8. *Fangcheng* [Rectangular arrays] – System of linear equations (more than two variables) solved with a method known in the West as Gaussian elimination.
9. *Gougu* [Base and altitude] – Problems involving right triangles, often times the Pythagorean Theorem, Pythagorean triples, and quadratic equations derived using proportion.

One should note that the formulas for calculating areas and volumes found in the Jiuzhang Suanshu take the value of pi as 3. This was common throughout the entire history of ancient Chinese mathematics. However, by the Han dynasty, the Chinese mathematicians were well aware of its inaccuracy, and attempts were made to improve the value of pi. Around 5 AD, the astronomer Liu Xin approximated pi as 3.1457. Unfortunately, the exact method Liu Xin used to obtain this value is not preserved.

Aside from the organization of Chinese mathematical knowledge, the Han dynasty made many strides in mathematical thinking. Among the most influential would be the first use of negative numbers. As opposed the Greeks, who viewed negative quantities as absurd and non-constructible, the Chinese embraced negative numbers as a very practical construct. One practical example of the distinction between positive and negative numbers would be the representation of gains and losses. This acceptance of negative numbers quickly made its way to the use of coloured counting rods. In the convention of the time, red counting rods represented positive numbers, while black counting rods represented negative numbers. The use of negative numbers spread westward along the ancient Silk Road, making its way into India by the 5th century, the Middle East by the 9th century, and Europe by the 13th century.

## **Section 3: Era of Disunity**

After the fall of the Han dynasty, China did not experience a decline of intellectual development. In fact, mathematical discourse flourished during yet another period of warring kingdoms. Interestingly, it is this era where mathematical theory grew in attempt to understand the underlying principles of the methods prescribed in the Han dynasty texts.

#### **Liu Hui**

The first period of disunity was the Three Kingdoms (220 – 280 AD). Perhaps the most famous mathematician of ancient China lived during this period. Liu Hui (fl. 3rd century AD) was probably the most creative mathematician of ancient China. He was born not long after the fall of the Han dynasty into a family descendant from the line of the Marquis of Zixiang. Little is known about his personal life, aside from the year he completed his commentary of the *Jiuzhang Suanshu* (263 AD). Nevertheless, Liu’s mathematical ideas and works are well kept and disseminated by later mathematicians. There is no doubt that Liu Hui left an irreplaceable mark on the development of ancient Chinese mathematics.

Liu’s most influential work was his commentary of the *Jiuzhang Suanshu*. Liu Hui provided better explanations to the old Han algorithms, and sought to improve certain geometric formulas. He suggested using the value 3.14 for pi, and derived formulas for calculating pyramids, cones, wedges, and frustums, using dissection arguments. Liu Hui expanded the *Jiuzhang Suanshu* by adding an appendix to the text, where he produced more advanced surveying problems using the chongcha method. The chongcha method was a nascent form of trigonometry which, according to Liu, originated from the Han dynasty.

Liu Hui investigated solids with curvature with a more theoretical approach. He implemented what the Cavalieri principle to prove the volumes of solids cones, cylinders. He failed to obtain the precise formula for the sphere, but succeeded in determining the ratio of the sphere to another solid called the Mou He Fang Gai.

Liu also refined the value of pi using a geometric method called the *Geyuan Shu*. This method he devised is similar to the method used by Archimedes in the 3rd century BC. Whereas Archimedes only inscribed polygons in a circle, Liu Hui inscribed and circumscribed polygons. The *Geyuan Shu* produces a tighter bound for the approximate value of pi. Liu Hui later devised a quick method for the *Geyuan Shu* and utilized geometric series to refine his value of pi. Using the quick method, he calculated the π=3.1416 using a 3072-gon.

Liu Hui derived the volumetric formulas of various solids via two methods: dissection, and the analysis of infinitesimals. The first method involves breaking up a solid into several other solids. The second method is much more interesting, and it involves the comparison to cross-sections between two solids of equal height.

Liu Hui may have been inspired by Hui Shi, a philosopher of the ming jia school of thought who made several references to infinity and infinitesimals in his 10 paradoxes. Paradox 1 and 2, as recorded by the Daoist philosopher Zhuangzi (c. 370 – 287 BC), outlined Hui Shi’s meditations on the infinite and infinitesimal.

至大無外，謂之大一﹔至小無內，謂之小一。

[The largest thing has nothing beyond; it is called the one of largeness. The smallest thing has nothing within; it is called the one of smallness.]

無厚不可積也，其大千里。

[That which has no thickness cannot be piled up, yet it is a thousand li thick.]

This principle of examining infinitesimal cross-sections by the comparison of two solids was discovered by Bonaventura Cavalieri (1598 – 1647 AD) in the West, who called it the “method of indivisibles.”

#### **Sunzi Suanjing**

The *Sunzi Suanjing* (lit. Master Sun’s Mathematical Scripture) is a mathematical text written sometime between the 3rd and 5th century AD by an obscure mathematician Sun Zi (not to be confused with the general and military theorist from the 5th century BC). A precise dating of the *Sunzi Suanjing* is somewhat difficult. The text makes references to Buddhist sutras, and the taxation system issued in 280 AD, suggesting it was written during the Jin dynasty (265 – 420 AD). In terms of mathematical knowledge, the methods discussed in the *Sunzi Suanjing* were known since the Han dynasty. Only one problem on the Chinese remainder theorem was not found in previous mathematical texts. However, the study of modular congruences was probably instigated by the making of the Taichu Calendar of 104 BC during the Han dynasty.

The top scroll of the *Sunzi Suanjing* deals with basic quantitative knowledge: measurements, numbers, and simple arithmetic calculations. Interestingly, Sun Zi briefly discusses large numbers in one of his passages.

凡大數之法，萬萬曰億，萬萬億曰兆，萬萬兆曰京，萬萬京曰陔，萬萬陔曰秭，萬萬秭曰壤，萬萬壤曰溝，萬萬溝曰澗，萬萬澗曰正，萬萬正曰載。

[The rule of large numbers states, wan-wan is called yi, wan-wan-yi is called zhao, wan-wan-zhao is called jing, wan-wan-jing is called hai, wan-wan-hai is called zi, wan-wan-zi is called rang , wan-wan-rang is called gou, wan-wan-gou is jian, wan-wan-jian is called zheng, wan-wan-zheng is called zai.]

According to this section, the Chinese hierarchy of large number is organized based on wan (often translated into English as myriad, an archaic term for the number 10000).

#### **Zhang Qiujian Suanjing**

Like Sun Zi nothing is known about Zhang Qiujian aside from his work, the *Zhang Qiujian Suanjing* (lit. Zhang Qiujian Mathematical Scripture). It is uncertain when this book was written, but many scholars have settled to sometime between 468 AD and 486 AD. Many of the methods found in the *Zhang Qiujian Suanjing* can be traced to the Han dynasty. Although Zhang’s problems are original, the methods are not; except, the well-known hundred fowl problem. This problem is a system of linear equations with two equations yet having three unknowns. Such systems are indeterminate, having multiple if not infinitely many solutions. An indeterminate system of linear equations can be found in chapter 8 of the *Jiuzhang Suanshu*; however, the hundred fowl problem differs by having a number-theoretic solution rather than an algorithmic solution. Variations of the hundred fowl problem made its way westward to India, Egypt, and Europe by the 9th century AD.

#### **Zu Chongzhi and Zu Geng**

Zu Chongzhi (429 – 500 AD) and Zu Geng (450 – 520 AD), a father-son pair, belonged to a family of astronomers during the Northern and Southern dynasties (420 – 589 AD). Since the Han dynasty, calendar making was an active and important area of research. On the practical side, calendars played a crucial role to agricultural productivity and taxation in China, both of which secured the Mandate of Heaven for the emperor. In 462 AD Zu Chongzhi devised a new, more accurate calendar called the Daming Li. This calendar was based on a 391-year cycle which incorporated all his astronomical talents to organize. The calendar took into account the precession of the equinoxes and the distinction between the tropical year and the sidereal year. Zu’s calculations were astonishingly accurate on many temporal figures. He calculated the length of a tropical year to be 365.2428 days (an excess of only 50 seconds from the modern value 365.2422 days), the length of a nodal month 27.2123 days (an excess of only 8 seconds from the modern value 27.2122 days), and the orbital period of Jupiter to be 11.859 years (an error of 4 Earth days from the modern value 11.862 years).

After resigning from the imperial service in 464 AD, Zu Chongzhi devoted himself to the study of mathematics in the spirit of Liu Hui. Zu Chongzhi’s mathematical achievements were written in the *Zhui Shu*, a treatise that was lost since the 12th century AD. Scholars speculate that the book include his method of calculating the bound 3.1415926<π<3.1415927, his approximation of π=355/113, the method for obtaining the volume of a sphere πd3/6, and algebraic methods used in astronomy and calendrics. It is uncertain whether the *Zhui Shu* was authored by Zu Chongzhi, his son Zu Geng, or both, since Zu Geng is credited for figuring out the precise formula for calculating the volume of a sphere.

## **References**

**Chinese books (Simplified Chinese)**

[1] 钱宝琮. 中国数学史. 科学出版社. 1964

[2] 杨世明, 王雪琴. 数学发现的艺术.青岛海洋出版社.1998

[3] 方孝博. 《墨经中的数学和物理学》. 中国社会科学出版社. 1983

[4] 李志军, 胡中华. 两大世界科学高峰. 广西科学技术出版社. 1998

**Chinese books (Traditional Chinese)**

[1] 李繼斌.《九章算術》及其劉徽注研究. 九章出版社.1992

[2] 郭正昭, 陳勝崑, 蔡仁堅. 中國科技文明論集. 牧童出版.1978

**English Books**

[1] Jean-Claude Martzloff. *A History of Chinese Mathematics*.
Springer-Verlag. 1997, 2006

[2] Roger Hart. *Imagined Civilizations*. John Hopkins University Press. 2013

[3] Victor J. Katz. *The Mathematics of Egypt, Mesopotamia, China, India, and Islam: A*
Sourcebook*. Princeton University Press. 2007*

[4] Victor J. Katz. *A History of Mathematics, 3rd Edition*. Pearson
Education, Inc. 2009

[5] Roger Hart. *The Chinese Roots of Linear Algebra*. John Hopkins University Press. 2011

[6] Fukagawa Hidetoshi, Tony Rothman. *Sacred Mathematics*. Princeton University
Press. 2008

[7] Caroline Blunden, Mark Elvin. *Cultural Atlas of China*. Equinox (Oxford) Ltd. 1983

[8] Howard Eves. *An*
Introduction to the History of Mathematics, 6th Edition*.*
Saunders College Publishing. 1992

[9] Dominic Olivastro. *Ancient Puzzles: Classic Brainteasers and Other Timeless Mathematical*
Games of The Last 10 Centuries*. Bantam Books. 1993*

**Papers**

[1] Shen Kangshen. *Historical Development of the Chinese remainder Theorem*. 1988

[2] Phillip D. Straffin. *Liu Hui and the First Golden Age of Chinese Mathematics*. 1988

[3] Yuan Ya-xiang. *Jiu Zhang Suan Shu and the Gauss Algorithm for Linear Equations*. 2012

**Websites**

[1] The Story of Mathematics. *Chinese Mathematics*.

http://www.storyofmathematics.com/chinese.html

[2] David E. Joyce. *History of Mathematics:* *Mathematics in China*.

http://aleph0.clarku.edu/~djoyce/mathhist/china.html

[3] MacTutor History of Mathematics Archives. *Index of Chinese Mathematics*.

http://www-history.mcs.st-and.ac.uk/Indexes/Chinese.html

[4] J.J. O’Conner, E.F. Robertson. *Chinese problems*.

http://aleph0.clarku.edu/~djoyce/mathhist/china.html