Died: about 280 in China

**Liu Hui** lived in the Kingdom of Wei so it is likely that he worked in what is now the Shansi province in north-central China. The Kingdom of Wei had come about after the Han Empire, which lasted from around 200 BC to 220 AD, collapsed. However, the collapse of the Han Empire led to three Kingdoms coming into existence for, in addition to the Kingdom of Wei, two former Han generals set up Kingdoms, one to the south of the Yangtze and one in the west of China in the present Szechwan Province. This situation lasted for about sixty years, from 220 to 280, which must have been almost exactly the period of Liu Hui's life.

The period of the Three Kingdoms was one of almost constant warfare and political intrigue. However this fascinating period is now thought of as the most romantic in all of Chinese history. What influence the events of the period had on Liu Hui is unknown, for nothing is known of his life except that he wrote two works. One was an extremely important commentary on the *Jiuzhang suanshu* or, as it more commonly called Nine Chapters on the Mathematical Art, and the other was a much shorter work called *Haidao suanjing* or *Sea Island Mathematical Manual.* That no record of Liu Hui's life was written, or at least if it was it was not considered worth preserving, does not mean that he was particularly obscure during his lifetime. Although mathematics was an important topic in China, nevertheless being a mathematician seems to have been considered an occupation of minor importance. As a consequence many Chinese mathematical works are anonymous.

The only precise information about Liu Hui comes from a later work which states that he wrote his commentary on the Nine Chapters on the Mathematical Art in the fourth year of the era of the Jingyuan reign of Prince Chenliu of the Wei, which gives a date of 263 AD. He did not date his commentary, however, so even this "fact" is unconfirmed. One piece of information he gives us about his life in the Preface of the book is:-

I read theNine Chaptersas a boy, and studied it in full detail when I was older.

What exactly was is the text that Liu Hui is commenting on? It was a practical handbook of mathematics meant to provide methods to be used to solve everyday problems of engineering, surveying, trade, and taxation. How old was the original text? This is a hard question to which historians have found no definite answer. Liu Hui himself believed that the text which he was commentating on was originally written around 1000 BC but incorporating much material of later eras. He writes in the Preface:-

In the past, the tyrant Qin burnt written documents, which led to the destruction of classical knowledge. Later, Zhang Cang, Marquis of Peiping and Geng Shouchang, Vice-President of the Ministry of Agriculture, both became famous through their talent for calculation. Because the ancient texts had deteriorated, Zhang Cang and his team produced a new version removing the poor parts and filling in the missing parts. Thus, they revised some parts, with the result that these were different from the old parts ...

Let us give some dates for the events Liu Hui describes. The Qin dynasty preceded the Han dynasty and it was the Qin ruler Shih Huang Ti who tried to reform education by destroying all earlier learning. He ordered all books to be burnt in 213 BC and Zhang Cang, who Liu Hui refers to, did his reconstruction around 170 BC Most historians, however, would not believe that the original text of the Nine Chapters was nearly as old as Liu Hui believed. We discuss such issues in the article on The Nine Chapters on the Mathematical Art In fact most historians think that Liu Hui was quite wrong in what he wrote, for it is now thought that the text originated around 200 BC after the burning of the books by Shih Huang Ti.

Let us examine the mathematical contributions that Liu Hui made in writing his commentary. First we should note that he introduced a different approach to mathematics from that of the text on which he was commentating. The original text gave methods to solve various problems, but the methods were merely prescriptions without justification. What Liu Hui added was a more mathematical approach in providing at least principles on which the calculations are based. His methods are not exactly "proofs" in our understanding of a mathematical proof today. They are more the type of brief explanation that a mathematician will give to convince you that if you wanted to you could construct a proof. Liu Hui also shows that he understands that some of the methods of the original text are approximations, and he investigates the accuracy of the approximations. There is also evidence that he is beginning to understand concepts associated with early work on the differential and integral calculus.

As an example let us look at the contribution Liu Hui made to finding a good approximation to . This appears in the first chapter of the Nine Chapters. He found a recurrence relation to express the length of the side of a regular polygon with 3 2^{n} sides in terms of the length of the side of a regular polygon with 3 2^{n-1} sides. This is achieved with an application of Pythagoras's theorem, which Liu Hui knew as the Gougu theorem.

In the diagram we have a circle of radius *r* with centre *O*. We know *AB*, it is *p*_{n-1} , the length of the side of a regular polygon with 32^{n-1} sides, so *AY* has length *p*_{n-1}/2. Thus *OY* has length

√(

r^{2}- (p_{n-1}/2)^{2}).

Then *YX* has length *r* - √[*r*^{2} - (*p*_{n-1}/2)^{2}].

But now we know *AY* and *YX* so we can compute *AX* using the Gougu theorem (Pythagoras) to be

√{

r[2r- √(4r-p_{n-1}^{2})]}.

Then *p*_{n}= *AX* is the length of a side of a regular polygon with *N* = 3 2^{n} sides.

Putting *r* = 1 and taking *n* = 1 gives a regular hexagon of side *p*_{6}= 1. Then the perimeter of the hexagon is 6*p*_{1}= 6 giving an approximate value of π as 6p_{1}/2 = 3 (assuming the circumference of the circle is approximately the perimeter of the hexagon and using π = circumference/diameter).

In general we obtain an approximate value of π as *N* *p*_{n}/2. Larger values of *n* give more accurate values of π. Liu Hui used the approximation 3.14 which he obtained from taking *n* = 5, in other words using a regular polygon of 96 sides. He did not, like Archimedes, find bounds by using an inscribed as well as a circumscribed circle.

We iterate Liu Hui's procedure using a modern computer algebra program to obtain:

n= 1,N= 6,p_{n}=1,Np_{n}/2 =3

n= 2,N=12,p_{n}=0.5176380900,Np_{n}/2 =3.105828540

n= 3,N= 24,p_{n}=0.2610523842,Np_{n}/2 =3.132628610

n= 4,N= 48,p_{n}=0.1308062584,Np_{n}/2 =3.139350202

n= 5,N= 96,p_{n}=0.06543816562,Np_{n}/2 =3.141031950

n= 6,N= 192,p_{n}=0.03272346325,Np_{n}/2 =3.141452472

n= 7,N= 384,p_{n}=0.01636227920,Np_{n}/2 =3.141557606

n= 8,N= 768,p_{n}=0.008181208047,Np_{n}/2 =3.141583890

n= 9,N= 1536,p_{n}= .004090612582,Np_{n}/2 =3.141590463

n= 10,N= 3072,p_{n}=0.002045307359,Np_{n}/2 =3.141592104

n= 11,N= 6144,p_{n}=0.001022653813,Np_{n}/2 =3.141592514

In fact Liu Hui stopped one step short of our computer calculation, for he also obtained the better approximation from *n* = 3072, namely 3.14159. As well as the approximate value based on an approximation for π, Liu was able to show that:-

... multiplying half the diameter and half the circumference, one gets the area.

We must emphasise that, of course, Liu Hui did not use algebraic notation as we have done above, nor did he use the number system that we have used. However, the procedure he presented shows that he understood the iterative process we have described. He also understood the notion of a limit.

Other interesting examples of Liu Hui's contributions to the Nine Chapters on the Mathematical Art is in Chapter 5 on engineering works, where he computes the volume of various solids such as a prism, pyramid, tetrahedron, wedge, cylinder, cone and frustum of a cone. He fails, however, to find the volume of a sphere which he says he leaves to a future mathematician to compute. In Chapter 8 he looks at simultaneous linear equations and computes with both positive and negative numbers.

The other work which we mentioned above by Liu Hui is *Haidao suanjing* or *Sea Island Mathematical Manual.* This is a small work consisting of nine problems and it was originally written as part of his commentary on Chapter Nine of the Nine Chapters but later removed and made into a separate work by later editors. It shows how to use the Gougu theorem (Pythagoras theorem) to calculate heights of objects and distances to objects which cannot be measured directly. The first problem, which illustrates the style, concerns the height and distance to an island in the sea. It gives its name to the book.

*P*_{1} and *P*_{2} are poles 5 pu high and 1000 pu apart. When viewed from *X* at ground level, 123 pu behind *P*_{1}, the summit *S* of the island is in line with the top of *P*_{1}. Similarly when viewed from *Y* at ground level, 127 pu behind *P*_{2}, the top of the island is in line with the top of *P*_{2}. Calculate the height of the island and its distance from *P*_{1}.

[Note: 1 pu is about 2 metres.]

Suppose the poles are of height *h* and the distance between the poles is *d*. Liu Hui gives the height of the island as *h* *d*/(*P*_{2}*Y*-*P*_{1}*X*) + *h* and the distance to it to be *P*_{1}*X* *d*/(*P*_{2}*Y*-*P*_{1}*X*).

He then gives: height of the island: 1255 pu; distance from *P*_{1} to the island: 30750 pu.

Other problems in this work are the height of a tree on the side of a mountain, the distance to a square town, the depth of a gorge, the height of a tower on a hill, the width of a river, the depth of a valley with a lake at the bottom, the width of a ford viewed from a hill, and the size of a town seen from a mountain.

Since we have no information about Liu Hui's life, can we at least deduce some information about him from his work? Firstly we can see that he is an outstanding mathematician with a deep understanding of difficult concepts. He is also highly original, coming up with ideas which rank him among the leading mathematicians of all time. But we can deduce more: as the authors of [4] write:-

The techniques Liu employed are typical of a teacher of skill, patience and tireless zeal.

Liu Hui was a learned man, not only having great expertise in mathematics but also being familiar with the literary and historical classics of China. He could write with clarity and also with style, quoting from a wide variety of sources.

We can also see that he was a modest man who never claimed results of which he was not fully confident, preferring to write:-

Let us leave the problem to whoever can tell the truth.

He also shows himself to be someone who cared about the conditions of people and also about the economy of the country. This suggests that he may have held high office in the administration of his country, and if he did so then his comments would have us believe that he was very fair in his policies.

**Article by:** *J J O'Connor* and *E F Robertson*

**December 2003**

[http://www-history.mcs.st-andrews.ac.uk/Biographies/Liu_Hui.html]