JZSSZ0 九章筭術注序 Preface of the Jiuzhang Suanshu

昔在庖犧氏始畫八卦，以通神明之德，以類萬物之情，作九九之術，以合六爻之變。暨於黃帝神而化之，引而伸之，於是建曆紀，恊律呂，用稽道原，然後兩儀四象精微之氣可得而效焉。記稱「隸首作數」，其詳未之聞也。按：周公制禮而有九數，九數之流，則《九章》是矣。往者暴秦焚書，經術散壞。自時厥後，漢北平侯張蒼、大司農中丞耿壽昌皆以善筭命世。蒼等因舊文之遺殘，各稱刪補。故校其目則與古或異，而所論者多近語也。

In the past, Pao Xi (庖犧 páo xī) was the first to draw the Eight Trigrams (八卦 bā guà) in order to ascertain the illuminative divine power (神明之德 shén míng zhī dé), to classify the properties of all things in existence, and generate the method of nine-nines (九九之術 jiǔ jiǔ zhī shù) in accordance with the transformations of the hexagrams (六爻之變 liù yáo zhī biàn). By the time of the Yellow Emperor (黃帝 huáng dì), the knowledge [of the trigrams and method of nine-nines] have changed, developed, and extended; thus, the calendar was established, and the musical scales were harmonized, through investigating the origins of the Dao (道 dào), after which the subtle and profound essence (氣 qì) of the complementary dual (兩儀 liǎng yí) and four images (四象 sì xiàng) could be understood. It is recorded in the classics that Li Shou (隸首 lì shǒu) invented mathematics, but the details are unclear. Comment: the "nine categories of numbers" (九數 jiǔ shù) was created when the Duke of Zhou (周公 zhōu gōng) created the system of rites which later became the *Nine Chapters* (九章 jiǔ zhāng). However, in the past, the brutal Qin dynasty burned the books, and destroyed or damaged many classic texts. Later during the Han dynasty, the Marquis of Beiping (北平侯 běi píng hóu) Zhang Cang (張蒼 zhāng cāng) and the Deputy Grand Minister of Agriculture and Finance (大司農中丞 dà sī nóng zhōng chéng) Geng Shouchang (耿壽昌 gěng shòu chāng), were renowned for their computational prowess. Working on the basis of the remains of the incomplete manuscripts, Zhang Cang and others revised and supplemented each of the texts. This is why when comparing their titles and contents, the reconstructed works and the ancient texts may differ, and the contents contain more recent terms.
 徽幼習《九章》，長再詳覽。觀陰陽之割裂，總筭術之根源，探賾之暇，遂悟其意。是以敢竭頑魯，采其所見，為之作注。事類相推，各有攸歸，故枝條雖分而同本幹知，發其一端而已。又所析理以辭，解體用圖，庶亦約而能周，通而不黷，覽之者思過半矣。且筭在六藝，古者以賓興賢能，教習國子。雖曰九數，其能窮纖入微，探測無方。至於以法相傳，亦猶規矩度量可得而共，非特難為也。當今好之者寡，故世雖多通才達學，而未必能綜於此耳。 | I [Liu Hui] studied the *Nine Chapters* (九章 jiǔ zhāng) as a boy, and read it in detail when I was older. By observing the complementary duality of *yin* (陰 yīn) and *yang* (陽 yáng), investigating to the origins of the mathematical art, and exploring its mysteries at leisure, I succeeded in understanding its essential meaning. Now I dare to take the liberty of writing a commentary after collecting all the knowledge that I have encountered. Things can be examined based on their categories, and everything has its ultimate place. Although the branches may be different, they all share the same trunk, and they all develop from the same source. Through using precise words to analyze the mathematical principles, and diagrams to dissect geometric figures, the brief yet thorough explanations should cover everything without being overly complex; I hope those who read them will receive a reasonable understanding. Since mathematics is one of the Six Arts (六藝 liù yì), the ancients selected those who were virtuous and capable to teach the sons of nobility. Although it is called the Nine Mathematical Arts (九數 jiǔ shù), it can exhaustively analyze the minutest detail, and can examine anything without limits. As for the methods (法 fǎ) that have been passed down the generations, just like the compass and gnomon can be used to measure quantities in general, none of this is particularly difficult. Nowadays, there are few men who are adept mathematicians, which explains why that although there are erudite scholars aplenty, they are not necessarily proficient in the art of mathematics.
 《周官‧大司徒》職，夏至日中立八尺之表，其景尺有五寸，謂之地中。說雲，南戴日下萬五千里。夫雲爾者，以術推之。按《九章》立四表望遠及因木望山之術，皆端旁互見，無有超邈若斯之類。然則蒼等為術猶未足以博盡羣數也。徽尋九數有重差之名，原其指趣乃所以施於此也。凡望極高、測絕深而兼知其遠者必用重差、句股，則必以重差為率，故曰重差也。立兩表於洛陽之城，令高八尺。南北各盡平地，同日度其正中之時，以景差為法，表高乘表間，實，實如法而一。所得加表高，即日去地也。以南表之景乘表間為實，實如法而一，即為從南表至南戴日下也。以南戴日下及日去地為句、股，為之求弦，即日去人也。以徑寸之筩南望日，日滿筩空，則定筩之長短以為股率，以筩徑為句率，日去人之數為大股，大股之句即日徑也。雖夫圓穹之象猶曰可度，又況泰山之高與江海之廣哉。徽以為今之史籍且略舉天地之物，考論厥數，載之於志，以闡世術之美。輒造《重差》，並為註解，以究古人之意，綴於《句股》之下。度高者重表，測深者累矩，孤離者三望，離而又旁求者四望。觸類而長之，則雖幽遐詭伏，靡所不入。博物君子，詳而覽焉。
（晉劉徽序）

[1] 庖犧 páo xī：皇帝的人称代词。Personal pronoun of the Chinese emperor.

[2] 隸首 lì shǒu：The Yellow Emperor's Minister of Records who is said to have invented counting and mathematics.

Eight Trigrams (八卦 bā guà)
(神明之德 shén míng zhī dé)
(六爻之變 liù yáo zhī biàn)
(黃帝 huáng dì)
(道 dào)
(氣 qì)
(兩儀 liǎng yí)
(四象 sì xiàng)