5 Ancient Chinese Mathematics
Documented civilization Dates from c. 3000 BC. Until around
AD 200, China refers roughly to the area in the map: north
of the Yangtze and around the Yellow river. A more de-
tailed timeline map can be found here.
Earliest mathematics Oracle Bone enumeration dates from the
Shang dynasty (c. 1600–1046 BC), commensurate with the
earliest known Chinese character script. Most information
on the Shang comes from later commentaries, though orig-
inal oracle bones have been excavated, particularly from
the ancient capital Anyang. Astronomy, the calendar and
trade were dominant drivers of mathematics.
Zhou dynasty (1046–256 BC) and the Warring States period (475–221 BC) Many mathematical texts
were written, though most have been lost; content must be inferred from later commentaries.
Rapid change created pressure for new systems of thought and technology. Feudal lords em-
ployed philosophers, of whom the most famous was Confucius (c. 500 BC).
25
Technological
developments included the compass (for navigation) and the use of iron in warfare.
26
Later history and expansion After the victory of the Qin Emperor Shi Huang Di
27
in 221 BC, China
was ruled by a succession of dynasties. In 1912, the Qing dynasty was overthrown and the
monarchy abolished, by which time Chinese territory had expanded to roughly its modern
borders. A Civil War (1927–1949) resulted in victory for the communists under Mao Zedong
and the foundation of the modern Chinese state. While this simple description might suggest
a long calm in which culture and technology could develop in comfort, in reality the empire
experienced many rebellions, schisms and flux, often exacerbated by the changing whims of
emperors and later leaders.
Transmission of knowledge East Asia (modern China, Korea, Japan, etc.) is geographically sepa-
rated from other areas of early civilization by tundra, desert, mountains and jungle. During
the Han dynasty (c. 200 BCAD 220) a network of trading routes known as the silk road was es-
tablished, connecting China, India, Persia and Eastern Europe; the Great Wall was in part con-
structed to protect these trade routes. Geographical separation meant that trade was limited,
and there is little evidence of mathematical and philosophical ideas making the journey until
many centuries later. For instance, there is no evidence of sexagesimal notation being used in
China, suggesting that Babylonian and Greek astronomy did not travel eastwards beyond In-
dia. Similarly, there are eastern mathematical ideas (e.g., matrix-style calculations) which saw
no analogue in the west until many centuries later. There are, however, indications that early
decimal calculations in India may have been inspired by the Chinese counting board method.
On balance, it seems reasonable to conclude that Chinese and Mediterranean mathematics de-
veloped essentially independently.
25
An adviser to Lu, a vassal state of the Zhou. Confucianism emphasises stability and unity as a counter to turmoil.
Taoism, the competing contemporary philosophical system, is more comfortable with change and adaptation.
26
Sun Tzu’s military classic The Art of War dates from this time.
27
Famous for book-burning, rebuilding the great walls, and for the Terracotta Army of Xi’an.
46
Early Mathematical Texts
Zhou Bi Suan Jing (The Mathematical Classic of the Zhou Gnomon
28
and the Circular Paths of Heaven)
The oldest suspected Chinese mathematical work was likely compiled some time in the period
500–200 BC. Largely concerned with astronomical calculations, it was presented in the form
of a dialogue between the 11
th
century Duke of Zhou (of I Ching fame) and Shang Gao (one
of his ministers, and a skilled mathematician). It contained perhaps the earliest statement of
Pythagoras’ Theorem as well as simple rules for fractions and arithmetic.
Suanshu Shu (A Book on Arithmetic) Compiled around 300–150 BC, it covered topics such as fractions,
the areas of rectangular fields, and the computation of fair taxes.
Jiu Zhang Suan Shu (Nine Chapters on the Mathematical Arts) Written between 300 BC and AD 200, this
the most famous ancient Chinese mathematical text. Many topics are covered, including square
roots, ratios (false position and the rule of three
29
), simultaneous linear equations, areas and
volumes, right-angled triangles, etc. The Nine Chapters was hugely influential, in part due to
the detailed commentary and solution manual to its 246 problems written by Liu Hui in AD 263.
Several of our examples below come from Liu’s work.
These texts typically involved worked examples with wide application. There is no notion of ax-
iomatics on which one could construct a modern-style proof.
The Gao Gu Unsurprisingly, the Chinese do not attribute Pythagoras’ Theorem to the Greeks: its
name instead refers to the shorter and the longer of the two non-hypotenuse sides of the triangle.
Here is an early mention of the gao gu. Is this a
‘proof’? Is it a claim about all right-triangles, or
merely an observation of the triple (3, 4, 5)? It can
be made rigorous (see Exercise 4), but it is unclear
whether this was the intention of the author.
Another example describes how to find the diameter of the circle
inscribed in a right-triangle with gao 8 and gu 15. A picture was
drawn and the answer stated:
d =
2 · 8 · 15
8 + 15 + 17
= 6
Here is a modern explanation. Given a = 8 and b = 5, the hypotenuse is c =
8
2
+ 15
2
= 17, and
the area of the large triangle is the sum of three smaller triangles, each having height
1
2
d:
1
2
ab =
1
2
a ·
1
2
d +
1
2
b ·
1
2
d +
1
2
c ·
1
2
d = d =
2ab
a + b + c
Again we ask: is this a general method or an example?
28
Gnomon: “One that knows or examines.” Also refers to the elevated piece of a sun/moondial.
29
Given equal ratios a : b = c : d, where a, b, c are known, then d =
bc
a
.
47
The Bamboo Problem Here is another problem from the Nine
Chapters, as depicted in Yang Hui’s 1262 Analysis of the Nine Chap-
ters.
A bamboo has height 10 chi. It breaks and the top touches the
ground 3 chi from the base of the stem. What is the height of the
break?
In modern language: if a, b, c are the sides of the triangle with
hypotenuse c, we know b + c = 10 and a = 3; we want b. The
solution given is
b =
1
2
10
3
2
10
=
91
20
chi
Think about why!
The Out-In Principle Liu made many other contributions to
mathematics, including estimating π in a manner similar to
Archimedes. He made particular use of the out-in principle for
comparing area and volume:
1. Area and volume are invariant under translations.
2. If a figure is subdivided, the sum of the areas/volumes of
the parts equals that of the whole.
These are essentially axioms for area/volume in Euclidean ge-
ometry. For instance, Liu gave the argument shown in the pic-
ture in justification of the gao gu: the large square is subdivided
and the in pieces A
i
, B
i
, C
i
translated to new out pieces A
o
, B
o
, C
o
to assemble the required squares.
A
o
A
i
B
o
B
i
C
o
C
i
Liu extended the out-in principle to analyze solids, comparing the volumes of four basic solids:
Cube (lifang)
Right triangular prism (qiandu)
Rectangular pyramid (yangma)
Tetrahedron (bienuan)
These could be assembled to calculate the volume of, say, a truncated pyramid:
48
Chinese Enumeration
The ancient Chinese had two parallel systems of enumeration. Both are essentially decimal.
Oracle Bone Script and Modern Numerals The earliest Chinese writing, oracle bone script, dates
from around 1600 BC. The numbers 1–10 had distinct symbols, as did 20, 100, 1000 and 10000. These
were decorated to denote various multiples. Some examples are shown below.
Given all the possibilities for decoration, the system is complex and more advanced than other con-
temporary systems. Modern Chinese numerals are a direct descendant of this script:
Observe the similarity between the expressions for the first 10 digits. The second image denotes 842,
where the second and fourth symbols represent 100’s and 10’s respectively (literally eight hundred four
ten two). A zero symbol is not required as a separator: one could not confuse 205 (two hundred five)
with 250 (two hundred five ten). The system is partly positional: for instance the symbol for 8 can also
mean 800 if placed correctly, but only if followed by the symbol for 100.
Rod Numerals and the Counting Board The second dominant form of enumeration dates from
around 300 BC and was in wide use by AD 300. Numbers were denoted by patterns known as zongs
and hengs: zongs represent units, 100’s, 10000’s, etc., while hengs were for 10’s, 1000’s, 100000’s, etc.
Rod numerals were immensely practical—in extremis they could easily be scratched in the dirt! More
commonly, short bamboo sticks or counting rods—of which any merchant would carry a bundle—
would be used in conjunction with a counting board: a grid of squares on which sticks could be placed
for ease of calculation. This technology facilitated easy trade and gave rise to several methods of
calculation which will seem familiar. There was no need for a zero in this system as an empty space
did the job. Variations of the rod numeral system persisted in China morphing into the Suzhou system
which can still be found in some traditional settings.
49
Basic Counting Board Calculations Addition and subtraction are straightforward by carrying and
borrowing in the usual way. The smallest number was typically placed on the right. Multiplication
is a little more fun. Here we multiply 387 by 147.
3 8 7
1 4 7
Arrange rods: we use modern numerals for clarity
3 8 7
4 4 1
1 4 7
3 × 147 = 441, note the position of 147
8 7
4 4 1
1 1 7 6
1 4 7
Delete 3, move 147 and multiply: 8 ×147 = 1176
8 7
5 5 8 6
1 4 7
Sum rows
7
5 5 8 6
1 0 2 9
1 4 7
Delete 8, move 147 and multiply: 7 ×147 = 1029
5 6 8 8 9
1 4 7
Sum rows: in conclusion, 387 ×147 = 56889
The algorithm is just long-multiplication, starting with the largest digit (3) instead of the units as is
more typical in Western education.
Division is similar to long-division. To divide 56889 by 147 one might have the following sequence
of boards
5 6 8 8 9
1 4 7
3
5 6 8 8 9
1 4 7
3 8
1 2 7 8 9
1 4 7
3 8 7
1 0 2 9
1 4 7
In the first two boards, 147 goes 3 times into 568.
In board 3, we subtract 3 × 147 from 568 to leave 127, shift 147 one place to the right, and observe
that 147 goes 8 times into 1278.
In the final step we have subtracted 8 × 147 from 1278 to leave 102, before shifting 147 to its final
position on the right. Since 147 divides exactly seven times into 1029, we are done.
There is nothing stopping us from dividing when the result is not an integer; one simply continues
as in long-division, with fractions represented as decimals.
50
Simultaneous linear equations The coefficients of a linear system were placed in adjacent columns
and then column operations were performed. The method is identical to what you learn in a linear
algebra class, but with columns rather than rows. Here is an example.
(
3x + 2y = 7
2x + y = 4
3 2
2 1
7 4
1 2
1 1
3 4
1 1
1 0
3 1
0 1
1 0
2 1
x = 1, y = 2
This matrix method was essentially unique to East Asia until the 1800s.
Euclidean algorithm The counting board lent also itself to the computation of greatest common
divisors, which were used for simplifying fractions. Here is the process applied to
35
91
:
35 35 35 14 14 7
91 56 21 21 7 7
At each stage, one subtracts the smaller number from the larger. Once the same number is in each
row you stop. You should recognize the division algorithm at work! Since gcd(35, 91) = 7, both
could be divided by 7 to obtain
35
91
=
5
13
in lowest terms.
Negative numbers There is a strong case that the Chinese are the oldest adopters of negative num-
bers, though these were not originally thought of as such. Different colored rods were used to denote
a deficiency in a quantity, commonly when balancing accounts. The Nine Chapters describes using red
and black rods in this manner. This practice was known by AD 1, roughly 500 years before negative
numbers were used in calculations in India. It is possible that there was some transference of this
idea from China to India.
Music, Mysticism and Approximations Like the Pythagoreans, the ancient
Chinese were interested in music and pattern for mystical reasons. While the
Pythagoreans delighted in the pentagram, the Chinese created magic squares
(grids whose rows, columns and diagonals sum to the same total) as symbols
of perfection.
8 3 4
1 5 9
6 7 2
3 × 3 magic square
The notion of equal temperament in musical tuning was first ‘solved’ in China by Zhu Zaiyu (1536–
1611), some 30 years before Mersenne & Stevin established the same idea in Europe. This required
the computation of the twelfth-root of 2 which Zhu found using approximations for square and cube
roots:
12
2 =
3
r
q
2
Zhu’s approximation was correct to 24 decimal places! Indeed the Chinese emphasis on practicality
meant that they often had the most accurate mathematical approximations of their time:
Approximations to π including
22
7
,
10,
355
113
,
377
120
. Most accurate in the world from 400–1400.
Methods for approximating square and cube roots were found earlier than in Europe. Ap-
proximations to solutions of higher-order equations similar to the Horner–Ruffini/Newton–
Raphson method were also discovered earlier.
Pascal’s triangle first appeared in China around 1100. It later appeared in Islamic mathematics
before making its way to Europe.
51
Two Famous Problems
We finish with two famous Chinese problems. The first is known as the Hundred Fowl Problem and
dates from the 5
th
century AD. It was copied later in India and then by Leonardo da Pisa (Fibonacci)
in Europe, thus demonstrating how some Chinese mathematics travelled westwards.
If cockerels cost 5 qian (a copper coin), hens 3 qian, and 3 chicks cost 1 qian, and if 100
fowl are bought for 100 qian, how many cockerels, hens and chicks are there?
In modern language, we want non-negative integers x, y, z satisfying
(
5x + 3y +
1
3
z = 100
x + y + z = 100
The stated answers are (4, 18, 78), (8, 11, 81), (12, 4, 84) while the solution (0, 25, 75) was ignored.
Finally we consider the Chinese Remainder Theorem for solving simultaneous congruence equations.
This result dates from the 4
th
century AD, after which it travelled to India where it was described
by Bhramagupta, and thence to Europe. This example comes from Qin Jiushao’s Shu Shu Jiu Zhang
(Nine Sections of Mathematics, 1247).
Three thieves stole three identical vessels filled with rice, but whose exact capacity was
unknown. The thieves were caught and their vessels examined: the quantities left in each
vessel were 1 ge, 14 ge and 1 ge respectively. The thieves did not know the exact quantities
they’d stolen. The first used a horse ladle (capacity 19 ge) to take rice from the first vessel.
The second used a wooden shoe (17 ge) to take rice from his vessel. The third used a bowl
(12 ge). What was the total amount of rice stolen?
In modern language, the capacity x of each vessel satisfies
x 1 (mod 19), x 14 (mod 17), x 1 (mod 12)
The given answer, x = 3193 ge, represents the smallest possible capacity of each vessel, with all other
solutions being congruent modulo 19 · 17 · 12 = 3876, as you should be able to confirm if you’ve
studied number theory! The total amount of rice stolen is then
(x 1) + (x 14) + (x 1) = 3x 16 = 9563
Since congruence equations are simply underdetermined linear equations
x 1 (mod 19) y Z such that x = 1 + 19y
solutions to both of these problems can be effected using counting board methods.
52
Exercises 5. 1. Verify the result of the Bamboo problem.
2. Solve the Hundred Fowl Problem by substituting z = 100 x y in the first equation and ob-
serving that x must be divisible by 4.
3. Use a counting board method to:
(a) Solve the linear system
(
8x + y = 28
3x + 2y = 17
(b) Multiply 218 × 191.
4. Turn Zhao Shuang’s pictorial argument from the
Arithmetical Classic of the Gnomon into a proof of
Pythagoras’ Theorem.
5. Solve problem 24 of chapter 9 of the Nine Chapters.
A deep well 5 ft in diameter is of unknown depth (to the water level). If a 5 ft post is
erected at the edge of the well, the line of sight from the top of the post to the edge of
the water passes through a point 0.4 ft from the lip of the well below the post. What
is the depth of the well?
6. Solve problem 26 of chapter 6 of the Nine Chapters.
Five channels bring water into a reservoir. If only the first channel is open, the reser-
voir fills in
1
3
of a day. The second channel by itself fills the reservoir in 1 day, the third
channel in 2
1
2
days, the fourth in 3 days, and the fifth in 5 days. If all the channels are
opened together, how long will the reservoir take to fill?
53