1. Introduction
The Nine Chapters on Mathematical Procedures (Jiuzhang Suanshu [九章筭術], ca. 100 BCE or 100 CE,Footnote 1 hereafter The Nine Chapters) is seen as the most important classical mathematical text from ancient China.Footnote 2 Nearly a hundred procedures (written in Chinese) were recorded in The Nine Chapters. Historians of mathematics assume that all these procedures were carried out with one particular instrument, namely, counting rods (suan chou [筭籌]).Footnote 3 From antiquity, counting rods served as the primary mathematical tool for Chinese scholars until the abacus rose to popularity in the sixteenth century.Footnote 4 However, The Nine Chapters does not contain much information about how counting rods were used.Footnote 5
During the fifth and sixth centuries, China was divided into two regions, one controlled by the Southern dynasties (420–589 CE) and one controlled by the Northern dynasties (439–581 CE). Three mathematical books from northern China, the Mathematical Canon by Master Sun (Sunzi Suanjing [孫子筭經], ca. 400 CE, hereafter Master Sun), the Mathematical Canon by Zhang Qiujian (Zhang Qiujian Suanjing [張丘建筭經], ca. 431–450 CE, hereafter Zhang Qiujian), and the Mathematical Canon by Xiahou Yang (Xiahou Yang Suanjing [夏侯陽筭經], hereafter Xiahou Yang)Footnote 6 recorded fundamental mathematical knowledge about the uses of counting rods, such as for subtraction, multiplication, division, and fraction operations.Footnote 7 In 656 CE, Li Chunfeng (李淳風, 602–670 CE), an official scholar, with his colleagues, edited, sub-commented, and compiled the four already mentioned texts (i.e., The Nine Chapters, Master Sun, Zhang Qiujian, and Xiahou Yang), along with six others, to create the Ten Mathematical Classics (shi bu suan jing [十部筭經]).Footnote 8 The Ten Mathematical Classics, together with another two elementary books related to number systems, served as textbooks in the School of Mathematics of the Imperial University of the Tang dynasty (618–907 CE).Footnote 9
Recent studies have shown that since the fifth century, when official scholars, such as Huang Kan (皇侃, 488–545 CE), Kong Yingda (孔穎達, 574–648 CE), and Jia Gongyan (賈公彥, fl. 650–655 CE), commented and sub-commented on Confucian classics, counting rods were no longer widely used.Footnote 10 However, in the domain of mathematical texts, counting rods continued to serve as the main instrument for mathematical computations.Footnote 11 Moreover, official scholars of the Tang dynasty were required to take counting sacks (suan dai [筭袋], which were used to store counting rods) when they traveled to the imperial court. This shows that counting rods remained a symbol of mathematics in imperial China. For the modern study of the history of mathematics, the aforementioned four books constitute a major source of information. Historians of mathematics have utilized these texts as a foundation for investigating how mathematical procedures were conducted using rods, highlighting the importance of counting rods in Chinese mathematics.Footnote 12 Nevertheless, these previous studies have only partially revealed the interplay between textual procedures and material operations.
In the eleventh century, the central government of the Song dynasty (960–1279) continued to support the School of Mathematics at the Imperial University. The four books were also used as textbooks in the School of Mathematics. However, the capital of the Song dynasty (the city of Kai Feng [開封] in present-day China) was captured by the Jin dynasty army (1115–1234) in 1127. Thereafter, the Song dynasty relocated to the south of China (the capital was Hang Zhou [杭州] in present-day China), dividing China into two parts. As a result, numerous mathematical books were scattered and lost, and the School of Mathematics was never rebuilt during the reign of the southern Song dynasty. During his collection and printing of mathematical books in 1213, Bao Huanzhi (鮑澣之) in the southern region discovered The Nine Chapters, Master Sun, Zhang Qiujian, and other books, but failed to find the Xia Houyang.Footnote 13 In the thirteenth century, scholars specialized in mathematics, such as Qin Jiushao (秦九韶, 1208–ca. 1268) and Yang Hui (楊輝, fl. 1261–1275) in the south, as well as Li Ye (李冶, 1192–1279) in the north, all wrote down counting diagrams (suan tu [筭图]) in their mathematical writings (see figure 3 and tables 2 and 3), which were related to how counting rods were used on the computational surface. Notably, Yang Hui’s treatises (written from 1261 to 1275) reveal that he read The Nine Chapters and Master Sun. By contrast, Qin Jiushao’s mathematical knowledge was mainly derived from calendarists. His own preface in his Mathematical Book in Nine Chapters (Shushu Jiuzhang [數書九章], hereafter Mathematical Book) from 1247 shows that he also read The Nine Chapters. However, it seems that Qin did not know Master Sun.Footnote 14 These thirteenth-century scholars followed the tradition of using counting rods and added counting diagrams in their writings.
Chemla (Reference Chemla2010) has convincingly argued that diagrams from the third century are material objects, whereas those from the thirteenth century were written on the surface of the page. Chemla (Reference Chemla2018) has also argued that geometrical diagrams were used to ensure the correctness of certain procedures in one of Yang Hui’s treatises. While her study did not extend to discuss counting diagrams, I concur with her assertion in a broader sense. I have further claimed (Zhu Reference Yiwen2020a) that the use of counting diagrams in the thirteenth century, in particular in Qin Jiushao’s treatise, represents an intermediate phase in textualization and symbolization in Chinese mathematics. Therefore, for the modern study of the history of mathematics, counting diagrams in thirteenth-century mathematical writings comprise another major source for investigating counting rods operations, a topic which still requires comprehensive research.Footnote 15
More specifically, further research is necessary for the following reasons. First, some technical details regarding material operations have not been carefully analyzed.Footnote 16 Second, counting diagrams in thirteenth-century texts and their relation to procedural texts and material operations have not been fully investigated.Footnote 17 Third, the operational similarity between counting rods and the abacus needs to be reconsidered in the context of the Ming dynasty (1368–1644).Footnote 18 Moreover, modern historians of mathematics usually consider counting rods as a tool for representing numbers (referred to as “rod numerals”) and performing calculations (i.e., addition, subtraction, multiplication, and division). Consequently, they often compare counting rods to the abacus and modern Hindu-Arabic numerals, without revealing the additional functions of counting rods (e.g. Needham Reference Needham1959, 5–17, 70–72; Lam and Ang Reference Lam and Tian Se2004, 43–41, 54–56; Martzloff Reference Martzloff2006, 185–190, 210–211). Modern historians of mathematics often use modern notations to interpret ancient procedures, overlooking the possibility that this approach might differ from the actual historical operations with counting rods.Footnote 19 In summary, all previous studies have relied on an unwritten common hypothesis, namely, that the operations carried out with counting rods and the procedural texts have a basic one-to-one correspondence, thereby allowing historians to investigate counting rods operations based on the relevant sources.
However, counting rods were not only used to represent numbers and do calculations; they also had other functions, such as determining positions, as will be discussed in this article. Furthermore, textual procedures were sometimes designed and written down based on the operations of counting rods.Footnote 20 In addition, procedural texts did not always record all the details of counting rod operations.Footnote 21 Indeed, even the translation of “suan chou” 筭筹 as “counting rods” implies that rods were used for counting. However, “suan” should be understood as relating to mathematics; hence, “mathematical rods” may be a more correct translation for suan chou, which also implies that the rods were a part of the mathematical knowledge system, not just a simple tool.Footnote 22 More specifically, sufficient direct and detailed evidence of how the counting rods were used for computations is lacking. Therefore, this article argues that this unwritten common hypothesis may not always hold true – the relationship between the textual and material practices could vary and, in some cases, could be very different. Therefore, reconsidering this hypothesis is necessary.
The aim of this article is twofold. First, it seeks to analyze the complex relationships between texts and operations, which heavily depend on their historical context. Second, it aims to contribute methodologically by providing a new perspective to investigate visual and material cultures in the history of mathematics, an area that holds significant interest in the history of science.Footnote 23 To achieve this aim, I compare The Nine Chapters and Master Sun to analyze the relationship between procedural texts and material operations. I then compare the counting diagrams in Qin Jiushao’s and Yang Hui’s writings to analyze the relationship between textual diagrams and material operations. In each of these sources, I focus on a single procedure: root extraction, a procedure which held a special position in mathematics of the period. On the one hand, root extraction was usually viewed as a type of division in ancient Chinese mathematics.Footnote 24 Hence, it can be considered as belonging to one of the basic four operations (i.e., addition, subtraction, multiplication, and division). On the other hand, it was developed to solve linear equations with one unknown value and higher degrees in the thirteenth century. This could explain why Qin and Yang used the counting diagrams for this procedure as examples of operations using counting rods.
2. The relationship between operations carried out with counting rods and textual procedures: The Nine Chapters and Master Sun
The earliest record of counting rods being used to execute the square root extraction procedure comes from The Nine Chapters. This procedure was called kai fang (開方 literally, “to open/establish a square”). From a modern viewpoint, this procedure relied on equality (a+b)2 = a2+2ab+b2, whereas its geometrical meaning could be understood as computing the length of the sides of a square with a given area.Footnote 25 The Master Sun was completed later than The Nine Chapters. The former contains two problems involving a square root extraction procedure using counting rods. Some scholars have argued that the procedure in Master Sun improved upon the one in The Nine Chapters.Footnote 26 The two procedures were not the same.
Generally, the procedures described in each book can be viewed as a series of steps that compute each digit in the results, from the highest to lowest order (e.g., hundreds, tens, and units) one by one. For example, in The Nine Chapters, the author extracts the square root of 55,225, which has an integer result of 235, and obtained “2,” “3,” and “5” in successive order. In Master Sun, the author extracted the square root of 234,567, which has an integer result of 484, and successively obtained “4,” “8,” and “4.” Scholars believe that there are two main operational differences between the procedures depicted in The Nine Chapters and those in Master Sun: first, the methods necessary to determine the positions in the first step, and second, the methods necessary to determine positions in the following steps. Both relate to the movements of a counting rod (called jie suan [借筭], literally “a borrowed counting rod”).Footnote 27 The differences can be compared using the example of the radicand (i.e., dividend) 234,567 in Master Sun.
The Nine Chapters and Master Sun include different operations for the first step. The Nine Chapters states: “The procedure for extracting the square root is: Put down the area (ji積) as the dividend (shi實).Footnote 28 Borrow a counting rod and move it, skipping every other position (deng等).”Footnote 29 If the radicand is 234,567, one uses the counting rods to represent this value on the computational surface (figure 1). This is what the phrase “put down the area as the dividend” means. The square root must be less than 1,000 because 234,567 < 10002. One must move the borrowed rods from the ones place to the ten-thousands place, i.e., from the place under the number 7 to the place under the number 3. This is what the instruction “borrow a counting rod and move it, skipping every other position” indicates. Although historians of mathematics have different explanations of the term “deng,” they all agree that the borrowed counting rods should be moved to the ten-thousands place.Footnote 30 Figure 1 shows the operation that determines the positions in the first step according to The Nine Chapters.

Figure 1. Movement of the borrowed counting rod in the first round of the square root extraction procedure.
Master Sun offers different instructions. It states:
The procedure is: put down the area (ji積), 234,567 bu,Footnote 31 as the dividend (shi實). Next, borrow a counting rod as the lower divisor (xia fa下法) and move it, skipping every other place (wei位) to reach the hundreds and stop (至百而止).Footnote 32
There are three differences from The Nine Chapters: 1) Master Sun provides detailed quantities (i.e., 234,567 bu) whereas The Nine Chapters does not; 2) some technical terms are different, such as deng 等 (position) in The Nine Chapters and wei 位 (place) in Master Sun,Footnote 33 and jie suan 借筭 (borrowed rod) in The Nine Chapters and xia fa 下法 (lower divisor) in Master Sun; and 3) The Nine Chapters states: “skip every other position,” whereas Master Sun states “skip every other place (wei位) to reach the hundreds and stop.” Lam and Ang (Reference Lam and Tian Se2004, 95) argue that “there is an error in the wording of the last sentence. The word ‘hundreds’ should be replaced by ‘ten thousands.’” As a result, they claim that the material operation behind the text is also similar to what is shown in figure 1. Ji Zhigang (Reference Zhigang1999, 39) disagrees with Lam and Ang, arguing that Master Sun’s real meaning is “when the quotient is in the hundreds place, the lower divisor (i.e., the borrowed rod) stops.” For Ji, the result is between 400 and 500; thus, the borrowed rod should also be moved to the ten-thousands place. Thus, Ji also interprets the material operation as shown in figure 1.Footnote 34 Therefore, although scholars have different interpretations of the sentence in Master Sun, they all agree with the operations carried out with counting rods shown in figure 1.
A new general conclusion can be drawn: Although the procedural texts of square root extraction for the first step in The Nine Chapters and in Master Sun are different, the results of the operations carried out with counting rods are the same. For example, 4, 400, and 40,000 are written differently in Chinese texts, but they look the same when counting rods are used to represent them because zero is shown by leaving an empty space on the computational surface.Footnote
35
Also, for example, when three numbers, e.g., 2, 3, and 4, are placed in three rows from top to bottom on the surface, one does the calculations as follows: 2 × 4 + 3. This can be understood as a multiplication with an addition. However, in another case, three numbers could be a result of 11 ÷ 4 (i.e., 2 + 3/4). Hence, 2 × 4 + 3 can be also understood as an inverse operation of the division. Furthermore, the operation can also be understood as a transformation of the fraction (i.e., 2 + 3/4 = (2 × 4+3)/4), called tong fen na zi通分内子 (communicate the fraction and add the numerator). In summary, the same operation (i.e., 2 × 4 + 3) carried out with counting rods could have three different mathematical meanings and thus correspond to three different procedural texts. Therefore, although the procedural texts in The Nine Chapters and Master Sun are different, the operations carried out with counting rods could be similar. More precisely, for similar operations, they could have different mathematical meanings in the two texts.Footnote
36
Analyzing how positions are determined in the second round in each book will make this conclusion clear. The first digit of the quotient is 4; 400 times 400 is 16,000, and 234,567 minus 160,000 is 74,567.Footnote 37 The Nine Chapters continues as follows: “Once the division is done, double the divisor, which makes the determined divisor (ding fa定法). For the next step in the square root process, move the (determined) divisor back (zhe折). Again, take a borrowed counting rod and move it as at the start.”Footnote 38 This operation is shown in two steps, demonstrated in figure 2: First, double 4 makes 8 (which is called ding fa);Footnote 39 8 is then moved to the thousands place; second, a counting rod is borrowed again and moved from the ones place to the hundreds place (because the second digit of the quotient will be in the tens place, the borrowed rod should be moved to the hundreds place). The rod is moved as it was moved at the beginning; the deng is 10 in this round and the rod is skipped past the tens place and stopped at the hundreds place.

Figure 2. Movement of the borrowed counting rod in the second round of the square root extraction procedure.
Master Sun again offers a different perspective: “Once the division is done, double the square divisor (fang fa方法). Move backward (tui退) (the square divisor to the right) by one place and the lower divisor by two places.”Footnote 40 Compared to The Nine Chapters, Master Sun also uses different terms. fang fa方法 (square divisor) in Master Sun corresponds to ding fa定法 (determined divisor) in The Nine Chapters; similarly, tui退 (move backward) in Master Sun corresponds to zhe折 (move back) in The Nine Chapters. However, these terms designate the same quantities or operations using counting rods. Further, both texts refer to the same operation: Double 4 and move the resulting 8 to the thousands place. Wang L. and Joseph (Reference Wang1955), Xu (Reference Xintong1986), Chemla (Reference Chemla1987), Guo et al. (Reference Shuchun2010, 244), and others claim that in Master Sun (and also in Zhang Qiujian), the lower divisor (i.e., the borrowed rod) is moved from the ten-thousands place to the hundreds place (i.e., it is moved two places), whereas in The Nine Chapters, the borrowed rod is moved from the ones place to the hundreds place. I agree with the statement that this demonstrates an operational difference between Master Sun and The Nine Chapters. Xu and Chemla further note another improvement in Master Sun, namely, the addition of new rows for different divisors (i.e., square divisor, rectangle divisor, and corner divisor). Therefore, Chemla (Reference Chemla1987, 308) stresses that “these algorithms bring a positional notation for equations into play and show the evolution of this notation in the computations: this is not the case in the Nine Chapters.” However, she also argues that “nothing has changed in the actual computations; they are just described in a new way” (ibid., 307). I agree with all her statements in this regard.
Nevertheless, this article argues that, although the change or evolution that Chemla argues for does happen when we look at and compare the procedural texts in The Nine Chapters and Master Sun, comparing the two procedures carried out with counting rods reveals that in some steps (e.g., as shown in figures 1 and 2) the two material operations are similar or almost identical. More precisely, in the case of square root extraction, not all the changes are reflected in the operations. In summary, there are more differences between the procedural texts in The Nine Chapters and Master Sun than in both texts’ results of the material operations. This phenomenon can be explained by Liu Hui, who offered a geometrical basis for square root extraction in his 263 CE commentary on The Nine Chapters; he understood square root extraction as computing the length of the sides when the area of a square is given. Master Sun used the same material instrument to execute the procedure as that employed by Liu Hui.
Furthermore, the difference between the procedural texts is less pronounced than that between the material operations in other cases. For example, in The Nine Chapters, Master Sun, and other mathematical writings, the term kai fang (to open/establish a square) was used to name the square root extraction procedure. However, in the scholars’ commentary and sub-commentary in canonical Confucian literature, the term kai fang also means to square a number, which is in contrast to the discussion above.Footnote 41 Moreover, in these mathematical writings, because the root extraction was viewed as a type of division (as established above), the term kai fang chu zhi (開方除之; to divide by square root extraction) was usually used. However, in Confucian literature, the term kai fang cheng zhi (開方乘之; multiply by squaring) was used, showing that squaring was regarded as a type of multiplication.Footnote 42 Hence, although the same term (i.e., kai fang) is used, their mathematical meanings and operations can be different. In summary, the two procedural texts might have been almost identical; however, their corresponding material operations were completely different. The reason is that these texts belonged to different domains, both of which produced mathematical practices.Footnote 43
This analysis reveals that the differences between procedural texts and between material operations do not exhibit a one-to-one correspondence. Nevertheless, the procedures written down in Chinese characters and the operations carried out with counting rods represent the two layers of Chinese mathematics. These two layers offer a new interpretation of the technical term suan shu (筭術) that was usually used in the name of mathematical books, i.e., textual procedures (shu) carried out with counting rods (suan). This fact makes using only the difference in procedural texts to draw a simple conclusion about material operations difficult. More specifically, upon discovering that the procedural texts in different writings are dissimilar, it cannot be simply inferred that the material operations informing the texts are different nor that the operations are the same for no reason other than the fact that texts use the same terms. Indeed, it is necessary to draw heavily on historical texts to understand the differences in mathematical writings, which is the core issue in the study of the history of mathematics.
3. The relationship between operations carried out with counting rods and counting diagrams: Qin Jiushao and Yang Hui
From a modern viewpoint, the thirteenth century was a period of rapid development in Chinese mathematics. Chinese scholars who specialized in mathematics made several advances, such as searching for the root of any algebraic equation (see, e.g., Qian Reference Baocong and Baocong1966). In The Nine Chapters, Master Sun, and other earlier texts, the procedures were limited to the extraction of square and cubic roots with positive coefficients. These procedures were expanded to solve quadratic and cubic equations with one unknown value in the seventh century. In the eleventh century, Jia Xian (賈憲) discovered the Chinese version of the coefficients of
$${\left( {a + b} \right)^n}$$
. Subsequently, the procedure for computing the root of an equation with any high power was created. Soon after this development, Chinese scholars developed methods of numerical solutions for algebraic equations of higher degrees. Several scholars in both northern and southern China expanded these methods to include negative coefficients. Although scholars specializing in mathematics in these two regions focused on different aspects of mathematics, both used numerals derived from counting rods, and wrote down counting diagrams in their treatises (figure 3).

Figure 3. Qin Jiushao’s and Yang Hui’s diagrams for computing the root of an equation.
During the thirteenth century, China was politically divided into two polities: the Song dynasty in the south and the Jin dynasty in the north. Both Qin Jiushao and Yang Hui were lower officials of the southern Song dynasty and lived near the capital, Lin’an City (臨安, present-day Hangzhou in Zhejiang province, China). Qin (1208–ca. 1268) completed his Mathematical Book in 1247.Footnote 44 Yang completed five mathematical treatises between 1261 and 1275.Footnote 45 The functions of the counting diagramsFootnote 46 by the two scholars are mostly different. Qin’s diagrams used lines to illustrate the steps of the procedures carried out with counting rods.Footnote 47 However, Qin never used counting diagrams to record the details of operations of addition, subtraction, multiplication, and division. Instead, he used different lines connecting numbers to represent these four operations.Footnote 48 Qin, in his preface of the Mathematical Book, explained why he used counting diagrams: “I set up procedures and recorded detailed solutions and sometimes elucidated them [that is, the detailed solutions] using [counting] diagrams.”Footnote 49 The functions of counting diagrams in Qin’s treatise vary, depending on different problems (see Zhu Reference Yiwen2020a, 349–354). Yang’s diagrams, however, sometimes show the steps of these four operations. Interestingly, both Qin and Yang recorded the counting diagrams for root extraction (figure 3 and its translation in figures 4 and 5). This fact confirms the special role of root extraction and provides a basis for comparing the two.

Figure 4. Translation of Qin Jiushao’s diagram (left-side of figure 3).There is no table in the original text. I add the table in order to make the layout of the diagram clear. As mentioned above, Qin’s method was developed from the square root extraction procedure, and relies on the equality
$${\left( {a + b} \right)^4} = {a^4} + 4{a^3}b + 6{a^2}{b^2} + 4a{b^3} + {b^4}$$
. The six sentences in the bottom of the table show how to move the numbers represented by counting rods. The yi (increased) corner (divisor) (yi yu益隅) is similar to the borrowed counting rods as analyzed above. The borrowed rod skips one place every time in Master Sun, when the equation has only second degree. Since the equation has fourth degrees here, this divisor should correspondingly skip three places every time. The two sentences in the right part of the table give the principle to deal with two opposite numbers. However, since they only appear in Zhao Qimei’s handwritten copy of Qin’s treatise, no other scholar has quoted them before Zheng Cheng and myself. 2 As I have mentioned, kai fang procedure (root extraction in modern terms) was used to solve algebraic equations with higher degrees. Hence, Qin used “fourth root extraction” to indicate the equation has the fourth degree. Qin’s mention of “positive and negative numbers” means he would use these two opposite numbers in the process of solving the equation. 3 In Zhao Qimei’s handwritten copy (figure 3), we see Qin use black and red colors to show two opposite numbers, i.e., red for positive numbers, and black for negative numbers. However, this feature only appears in Zhao Qimei’s copy. This is why I translate Qin’s numbers into negatives here. 4 The empty square (xu fang) divisor is the coefficient of x in the whole equation, -x4 + 763200x2 - 40642560000. Since the character xu虚 (empty) is written, the number is 0. 5 The added above rectangle (cong shang lian) divisor is the coefficient of x2 in the whole equation. Since the character cong從 (added) is written, the number is positive. 6 The empty lower rectangle (xu xia lian) divisor is the coefficient of x3 in the whole equation. Since the character xu虚 (empty) is written, the number is 0. 7 The increased corner (yi yu) divisor is the coefficient of x4 in the whole equation. Since the character yi益(increased) is written, the number is negative.

Figure 5. Translation of Yang Hui’s diagram (right-side of figure 3). 1As I have mentioned, kai fang procedure (root extraction in modern terms) was used to solve algebraic equations with higher degrees. Hence, Yang used “square root extraction” to indicate the equation has the second degree. 2The square divisor (fang fa) is equation to quotient in the first round of the procedure. The layout of Yang Hui’s procedure can be understood as an extension of The Nine Chapters, that is from the up to bottom: x, 864, x, 12, 1, which means the equation is x (x + 12) = 864. 3 The cong (added) rectangle divisor is the coefficient of x in the whole equation, x2 + 12x = 864. 4 In Yang Hui’s procedure, the corner rod is the same as the borrowed rod in The Nine Chapters. It was used to determine positions. 5 In this round, Yang obtains 20 as the first quotient. Hence, 20 x (20+12) = 640. 864 - 640 = 224. 6 For the same term lian fa廉法, Qin Jiushao and Yanghui have different mathematical meanings. Qin named all coefficients of the equation as lian fa, i.e., rectangle divisors. Yang followed Master Sun, calling the double square divisor lian fa (i.e., side divisor). In this problem, Yang called the coefficient of x cong fang從方 (i.e., added rectangle divisor), which indeed is equal to Qin’s lian fa. Chemla (Reference Chemla2018, 62) translates cong fang into “what joins the square.” However, Yang Hui (1275, 18b) mentions ping fang yi duan平方一段 (a piece of the flat square) and cong fang yi duan從方一段 (a piece of the added rectangle). Hence, it is clear that cong fang refers to the rectangle that is added to (i.e., cong) the square. 7 Since Yang also relies on the equality
${\left( {a + b} \right)^2} = {a^2} thinsp;+ thinsp;2ab + {b^2}$
, the 20 (i.e., a) should be doubled for the next computation. 8 In this round, Yang obtains 4 (i.e., b) as the second quotient. Hence, 42 + 2 x 20 x 4 + 4 x 12 (i.e., b2 + 2ab + b x 12) = 4 x (4 + 40 + 12) = 224. This exactly exhausts the remaining dividend. The three divisors are 4 (corner divisor), 40 (side divisor), and 12 (added rectangle divisor).
Yang’s diagram (figure 3) came from his Fast Methods on Various Categories of Multiplication and Division of Areas of Fields (田畝乘除比類捷法; Tianmu chengchu bilei jiefa, 1275). This diagram was presented in a mathematical problem: “the area of a rectangular field is 864 bu, while its width is 12 bu less than its length. What is its width?” Just before this, Yang wrote that he quoted this type of problem from Liu Yi’s (劉益; ca. eleventh century) Discussion on Ancients Roots and Sources (Yigu Genyuan [議古根源]), which he commented on in detail using diagrams and detailed solutions (xiang zhu tu cao [詳注圖草]).Footnote 50 Accordingly, the procedures in Yang’s text were likely drawn from Liu Yi’s work, whereas the geometrical and computational diagrams, including the surrounding texts, were all written by Yang Hui. However, it is still difficult to distinguish what was written by Liu and what was added by Yang.Footnote 51 Because the aim of this article is to analyze the nature of the diagrams, the conclusion should not be affected by questions of authorship.
To begin an analysis of the difference between Qin and Yang, table 1 shows the writing numeral system from Qin’s treatise, which was also used in Yang’s writings (the left diagram of figure 3). This system contains two parts: A and B. System A was used with places of units, hundreds, ten thousands, and so on, whereas system B was used with places of tens, thousands, hundred thousands, and so on. Obviously, this numeral system was derived from the use of counting rods. Because the symbols and
were used, the system exhibited some variations compared with counting rods.Footnote
52
One difference between Qin and Yang is the representation of positive and negative numbers. As Qin states, he used red and black colors to differentiate two opposite numbers in text and correspondingly used white and black rods in operations.Footnote
53
In contrast to Qin, Yang added an oblique rod to the numerals to represent negative numbers. For example,
means −5. Liu Hui mentioned two methods to represent positive and negative numbers in his commentary on The Nine Chapters in 263.Footnote
54
Qin’s and Yang’s methods exactly followed those of Liu Hui’s. My analysis of instrumental operations reveals that the different symbols for two opposite numbers cannot prove that Chinese scholars used different counting rods; however, this demonstrates that Qin and Yang could follow different parts of Liu Hui’s commentary.
Table 1. Written numeral system in Zhao Qimei’s handwritten copy of Qin’s treatise

Another difference between Qin and Yang is their use of lines. In Qin’s treatise, he used different types of lines to represent different operations. The linear system is characterized by a wavy line connecting two numbers, which usually indicates multiplication, a dotted line, which usually indicates division, a double full line, which usually indicates addition, and a full line, which usually indicates subtraction (table 2).Footnote 55 In contrast, Yang used lines to connect the various operands, as shown in table 3.Footnote 56 Specifically, different meanings of lines reflect Qin’s and Yang’s different epistemological focus in mathematics. Qin regarded operations and procedures consisting of operations as important, whereas Yang specifically valued the operands and details of computations.
Table 2. Main representations of multiplication, division, addition, and subtraction in Zhao Qimei’s handwritten copy of Qin’s treatise

Table 3. Yang Hui’s usage of written numerals and lines to write down a multiplication (Yang Hui Reference Yang1274, 14a)

The key difference between Qin and Yang lies in their positions regarding the relationship between the counting diagrams and their related texts. In modern terms, Qin Jiushao’s diagram, shown in figure 3 (translation in figure 4), is the first step toward solving the following equation:

Before this diagram, Qin presents a problem with an answer, a procedure, and a detailed solution.Footnote 57 The problem arises in the computation of the area of a field with four sides. The procedure is non-specific, only referencing an algebraic equation with a fourth degree.Footnote 58 The detailed solution shows how the computations may be based on this procedure. Qin’s diagram (figure 3) contains two parts: a counting diagram and the accompanying text. The counting diagram (figure 4) shows how these computations were carried out with counting rods. In figure 4, the two sentences in the lower right section explain how the rods were used according to the color in the text. The sentences in the lower left section explain how the lowest rod was moved. Hence, the text accompanying the counting diagram was used to explain the instrumental operation.
Yang Hui’s writing consists of three diagrams (see the right-hand side of figure 3 and its translation in figure 5). In modern terms, Yang describes the procedure used to solve the following equation:

Before the diagram, Yang offers a problem with an answer, a procedure, and two geometrical figures.Footnote 59 The problem is also related to the computation of the area of a rectangular field. Yang’s procedure is similar to the one in The Nine Chapters and is also used as an example to show how the operations are carried out with counting rods (like Qin Jiushao). According to Yang, the procedure was quoted from Liu Yi’s treatise. The two geometrical figures were used to explain that the procedure was correct.Footnote 60
Similar to Qin’s writing, Yang’s diagrams also contain two parts: a counting diagram (right-hand side of figure 3 and figure 5) and the accompanying text. Yang’s counting diagrams are also employed to explain how computations are performed using counting rods. Both scholars add titles to the diagrams on the right. Despite some common features, there is an important difference. Yang’s textual descriptions below the counting diagrams comprise the detailed solution for the computations (as shown in figure 5), differing from Qin’s text in the same place (Qin only mentions the positional movement of different numbers, as shown in figure 4). Hence, the counting diagrams in Qin’s writing provide more information about the material operations than the corresponding texts accompanying the diagrams; in Yang’s writing, the counting diagrams provide less information than their accompanying texts.
This difference can be further understood by analyzing and comparing the whole structure of their problem. In Qin’s text, this problem (figure 3) starts with a question, followed by an answer, a procedure (in Chinese), a detailed solution (with detailed numbers, also in Chinese), and counting diagrams (using written rod numerals, as shown in figure 3) to solve the equation. Therefore, the counting diagrams are independent of the detailed solution. Hence, Qin’s texts accompanying the diagrams are used to explain part of their respective material operations, as shown in the diagrams. This exactly follows Qin’s words “I set up procedures and recorded detailed solutions and sometimes elucidated them [that is, the detailed solutions] using [counting] diagrams” (立術具草,兼以圖發之). In Yang’s text, the problem is accompanied by a question, an answer, and a procedure (all of them in Chinese), followed by two geometrical diagrams to clarify the proper procedure. Following the two geometrical diagrams are the counting diagrams, with texts included below them (as shown in figure 3). Hence, Yang’s texts, found below his counting diagrams, present a detailed solution for the problem in question. The counting diagrams are used to explain their accompanying text. This coincides with Yang’s statement: “I detailedly commented on them using diagrams and detailed solutions” (詳注圖草). Specifically, as seen in figure 3, Qin presents an independent counting diagram with explanatory text, whereas Yang presents a detailed solution with illustrated counting diagrams.
Although both Qin and Yang included counting diagrams accompanied by text, their reasons for doing so differed. For Qin, the most important element of his explanation was the counting diagram (i.e., suan tu), whereas the text shown below it clarifies the diagram. In contrast, for Yang, the most important elements were the texts shown below the diagrams, as they offer a detailed solution to the problem in question. The diagrams are to be used to help the reader understand the text. In other words, Qin focused on the counting diagrams, whereas the explanatory text was supplementary. In contrast, Yang focused on the detailed solution explained in the text, with the counting diagram serving as supplementary information. This difference could reflect different epistemological focuses on the relationships between procedural texts and material operations. In general, Qin emphasized material operations over procedural texts, whereas Yang did the opposite.
This conclusion can also be related to Qin’s and Yang’s mathematical achievements. Qin’s treatise has eighty-one problems, and forty-five of them are supplemented with counting diagrams. These counting diagrams have different objectives in relation to the text. Most of Qin’s mathematical achievements are shown through counting diagrams (see Zhu Reference Yiwen2017, Reference Yiwen2020a). Specifically, Qin’s independent counting diagrams created new representations, leading him to new mathematical procedures. Following the traditional mathematical writing style, Yang’s key points were always presented in his detailed textual explanations (xiang jie 詳解). Yang’s counting diagrams were a part of his detailed solutions and used to explain his procedures. Comparing their other counting diagrams would shed further light on the differences between Qin and Yang.Footnote 61 Furthermore, the difference between Qin and Yang can be understood in the context of their writing. Qin’s research was at the intersection of mathematics, calendrical computations, and the Book of Changes (周易) (see Zhu Reference Yiwen2017, Reference Yiwen2019b), whereas Yang’s research was mainly based on traditional mathematics. In summary, based on Qin Jiushao’s and Yang Hui’s writings, the relationship between procedural text and material operation could vary depending on the individual, and the role played by counting diagrams in their respective research efforts is key to analyzing this difference. Specifically, while Yang’s counting diagrams illustrated some details of computations carried out with counting rods, Qin’s counting diagrams represented a new way to write down procedures carried out with counting rods. Consequently, the objectives of textual procedures, counting diagrams, and counting rods operations differed between the two scholars.
4. Conclusion
This article has shown that the relationship between procedural texts and material operations depends on their context. Generally, there are two ways to study this relationship. The first approach involves analyzing the differences between procedural texts in ancient mathematical writings. The analysis of The Nine Chapters and Master Sun reveals that different procedural texts do not always correspond to different operations carried out with counting rods, as the operations could be more similar than the text shows.Footnote 62 Moreover, the same terms could correspond to different instrumental operations because they are used in multiple domains. As the most direct evidence about how counting rods were used comes from ancient mathematical writings without diagrams, the social and historical context in which these texts were written is key to studying the material operations.
In thirteenth-century China, scholars specializing in mathematics from both the south and north included counting diagrams in their mathematical writings. These diagrams allow for the analysis of the relationship between procedural texts and material operations. The analysis of Qin Jiushao’s and Yang Hui’s treatises reveals that despite differences between the counting diagrams presented in both texts, concluding that Qin and Yang carried out different operations with counting rods is not always possible. However, the difference between the numerals, lines, and the relationships between counting diagrams and their accompanying text reflects that the two scholars had different epistemological focuses on mathematics. Qin viewed the counting diagrams and the operations carried out with counting rods as more important, whereas Yang’s focus remained on procedural texts. This point can be further confirmed by an analysis of the two scholars’ mathematical achievements and the different domains in which they were involved. In this respect, the relationship between texts and operations can vary depending on the individual.
This study underscores the challenges inherent in studying material operations. Counting rods comprised the primary instrument used in Chinese mathematics for more than 2,000 years, with both textual procedures in ancient mathematical writings and thirteenth-century counting diagrams serving as indirect evidence of their use. Given this, it is imperative to reassess the earlier hypothesis that suggests a fundamental correspondence between procedural texts and counting rods operations and to develop new methods for examining these sources as well as their associated material operations. Written texts (including problems, textual procedures, and counting diagrams), along with material operations (including counting rods and other geometrical instruments), constitute interconnected yet distinct layers of mathematical practices that form the structure of Chinese mathematics. In this manner, ancient mathematical writings should be studied carefully to avoid making inferences not directly evident from the writings. In other words, this article suggests first literally interpreting the text and then connecting it with other aspects. Furthermore, importantly, any interpretation regarding material operations is fundamentally fallible.Footnote 63 While our reconstruction of an operation may fully explain the corresponding text, it does not inherently guarantee the historical accuracy of the reconstruction. Discrepancies between written records and practical operations could differ among individuals, and there could be several ways for documenting the same operation or utilizing the same instrument.Footnote 64 Exploring the connections and interactions between these different practices presents new avenues for research. This article confirms a close relationship between historical sources and methodological issues in the study of the history of mathematics.
Finally, the research presented in this article holds philosophical significance. One philosopher argues that “instrumental practice can secure epistemic access to ideal objects of mathematics.”Footnote 65 In this respect, this article not only expands the content of instrumental practice, but also offers an example of how different instrumental practices (i.e., procedural texts, operations of counting rods, and counting diagrams with texts) interact. More specifically, different layers of mathematical practices could offer different epistemic accesses to mathematical objects, whereas the interplay and relationships between different layers form an epistemic structure, which is also based on historical and cultural factors.Footnote 66
Acknowledgments
The original research that yielded these results was funded by the Chinese National Planning Office of Philosophy and Social Science [the National Social Science Fund of China, 21VJXG022]. I would like to deeply thank the three reviewers for their valuable comments – in particular, I would like to thank Karine Chemla and the second reviewer for their careful sentence-level review, and the third reviewer for the suggestion to extend the historical background to make the article more accessible to a wider readership. These suggestions helped a great deal in revising the article.
Zhu Yiwen is a professor in the Department of Philosophy at Sun Yat-sen University. His primary research focuses on the history of mathematics in China, particularly two distinct mathematical traditions discovered in the mathematical and Confucian canons. He is also engaged in exploring historiographical, philosophical, and theoretical issues related to the history of mathematics and science.