# Liu Hui

Liu Hui (fl.  3rd century CE) was a Chinese mathematician who published a commentary in 263 CE on Jiu Zhang Suan Shu (The Nine Chapters on the Mathematical Art). He was a descendant of the Marquis of Zixiang of the Eastern Han dynasty and lived in the state of Cao Wei during the Three Kingdoms period (220–280 CE) of China.
His major contributions as recorded in his commentary on The Nine Chapters on the Mathematical Art include a proof of the Pythagorean theorem, theorems in solid geometry, an improvement on Archimedes's approximation of π, and a systematic method of solving linear equations in several unknowns. In his other work, Haidao Suanjing (The Sea Island Mathematical Manual), he wrote about geometrical problems and their application to surveying. He probably visited Luoyang, where he measured the sun's shadow.

## Mathematical work

Liu Hui expressed mathematical results in the form of decimal fractions that utilized metrological units (i.e., related units of length with base 10 such as 1 chǐ = 10 cùn, 1 cùn = 10 fēn, 1 fēn = 10 lí, etc.); this led Liu Hui to express a diameter of 1.355 feet as 1 chǐ, 3 cùn, 5 fēn, 5 lí. Han Yen (fl. 780-804 CE) is thought to be the first mathematician that dropped the terms referring to the units of length and used a notation system akin to the modern decimal system and Yang Hui (c. 1238–1298 CE) is considered to have introduced a unified decimal system.
Liu provided a proof of a theorem identical to the Pythagorean theorem. Liu called the figure of the drawn diagram for the theorem the "diagram giving the relations between the hypotenuse and the sum and difference of the other two sides whereby one can find the unknown from the known."
In the field of plane areas and solid figures, Liu Hui was one of the greatest contributors to empirical solid geometry. For example, he found that a wedge with rectangular base and both sides sloping could be broken down into a pyramid and a tetrahedral wedge. He also found that a wedge with trapezoid base and both sides sloping could be made to give two tetrahedral wedges separated by a pyramid. He computed the volume of solid figures such as cone, cylinder, frustum of a cone, prism, pyramid, tetrahedron, and a wedge. However, he failed to compute the volume of a sphere and noted that he left it to a future mathematician to compute.
In his commentaries on The Nine Chapters on the Mathematical Art, he presented:
* An algorithm for the approximation of pi (π). While at the time, it was common practice to assume π to equal 3, Liu utilized the method of inscribing a polygon within a circle to approximate π to equal 157/50 {\textstyle {\frac {157}{50}}} on the basis of a 192-sided polygon. This method was similar to the one employed by Archimedes whereby one calculates the length of the perimeter of the inscribed polygon utilizing the properties of right-angled triangles formed by each half-segment. Liu subsequently utilized a 3072-sided polygon to approximate π to equal 3.14159, which is a more accurate approximation than the one calculated by Archimedes or Ptolemy.
* Gaussian elimination.
* Cavalieri's principle to find the volume of a cylinder and the intersection of two perpendicular cylinders although this work was only finished by Zu Chongzhi and Zu Gengzhi. Liu's commentaries often include explanations why some methods work and why others do not. Although his commentary was a great contribution, some answers had slight errors which was later corrected by the Tang mathematician and Taoist believer Li Chunfeng.
* Through his work in the Nine Chapters, he could have been the first mathematician to discover and compute with negative numbers; definitely before Ancient Indian mathematician Brahmagupta started using negative numbers.

### Surveying

Liu Hui also presented, in a separate appendix of 263 AD called Haidao Suanjing or The Sea Island Mathematical Manual, several problems related to surveying. This book contained many practical problems of geometry, including the measurement of the heights of Chinese pagoda towers. This smaller work outlined instructions on how to measure distances and heights with "tall surveyor's poles and horizontal bars fixed at right angles to them". With this, the following cases are considered in his work:
* The measurement of the height of an island opposed to its sea level and viewed from the sea
* The height of a tree on a hill
* The size of a city wall viewed at a long distance
* The depth of a ravine (using hence-forward cross-bars)
* The height of a tower on a plain seen from a hill
* The breadth of a river-mouth seen from a distance on land
* The width of a valley seen from a cliff
* The depth of a transparent pool
* The width of a river as seen from a hill
* The size of a city seen from a mountain.
Liu Hui's information about surveying was known to his contemporaries as well. The cartographer and state minister Pei Xiu (224–271) outlined the advancements of cartography, surveying, and mathematics up until his time. This included the first use of a rectangular grid and graduated scale for accurate measurement of distances on representative terrain maps. Liu Hui provided commentary on the Nine Chapter's problems involving building canal and river dykes, giving results for total amount of materials used, the amount of labor needed, the amount of time needed for construction, etc.
Although translated into English long beforehand, Liu's work was translated into French by Guo Shuchun, a professor from the Chinese Academy of Sciences, who began in 1985 and took twenty years to complete his translation.