Western Han (西汉) · HISTORICAL EVENT

Compilation of Zhoubi Suanjing (《周髀算经》成书)

《周髀算经》成书

The compilation of the Zhoubi Suanjing refers to the historical process during the Western Han Dynasty whereby astronomers and mathematicians synthesized astronomical observations and mathematical findings accumulated since the pre-Qin period to systematically compile Zhoubi, China's earliest surviving treatise on mathematical astronomy and geometric surveying. Originally titled Zhoubi, its foundational intellectual system evolved over centuries…

104 BCE–1 CEHaojing, Luoyi, Chang'an (modern Xi'an, Shaanxi; Luoyang, Henan)
《周髀算经》成书
Related historical visual of Zhoubi Suanjing
Image creditsWikimedia Commons contributor · Public domainImage source

OVERVIEW

The compilation of the Zhoubi Suanjing refers to the historical process during the Western Han Dynasty whereby astronomers and mathematicians synthesized astronomical observations and mathematical findings accumulated since the pre-Qin period to systematically compile Zhoubi, China's earliest surviving treatise on mathematical astronomy and geometric surveying. Originally titled Zhoubi, its foundational intellectual system evolved over centuries before being definitively compiled into a two-volume work during the mid-to-late Western Han Dynasty (circa 1st century BCE). The treatise unfolds in dialogue format. The upper volume records the dialogue between the Duke of Zhou and Shang Gao, alongside that between Chen Zi and Rong Fang, elucidating both the specific "base three, altitude four, hypotenuse five" case and the generalized principles of the Gougu Theorem (Pythagorean theorem), while pioneering the use of the eight-chi gnomon to calculate solar altitude and diameter. The lower volume details the Kai Tian "Seven Rings and Six Intervals" cosmological model and the solar transit across the twenty-four solar terms, constructing an integrated theoretical system combining geometric surveying, calendrical calculation, and celestial modeling. Commentated by Zhao Shuang of Eastern Wu with the appended Diagram of the Round and Square and the Gougu Theorem, and designated in the Tang Dynasty as the foremost of the Ten Computational Canons at the Imperial Academy, it represents an enduring milestone in the history of science.

EVENT TIMELINE

The Shang Gao Dialogue

The Duke of Zhou surveyed Luoyi; Grandee Shang Gao expounded geometric theory and the 3:4:5 right-triangle relationship, laying the foundation of pre-Qin surveying.

Chen Zi's Model

Warring States scholar Chen Zi taught Rong Fang gnomon surveying methods, using an eight-chi gnomon to calculate solar distance and diameter.

Synthesis into Corpus

Western Han scholars coordinated calendar reform and cosmological debates, gathering Western Zhou and Warring States treatises into the two-volume Zhoubi.

Definitive Textual Fixation

Han mathematical astronomers incorporated the Seven-Ring schema and solar term shadow tables, establishing the definitive Zhoubi corpus.

Zhao Shuang's Commentary

Eastern Wu astronomer Zhao Shuang composed comprehensive commentaries and the String Diagram, providing a rigorous geometric proof of the Gougu Theorem.

Canonization in the Ten Canons

Emperor Gaozong commanded Li Chunfeng to edit ancient mathematical works; the text was titled Zhoubi Suanjing and placed first among the Ten Computational Canons.

Relationship graph

FULL ACCOUNT

Background

Pre-Qin Gnomon Shadow Measurement and Needs of Astronomical Calendars

Ancient China was an agrarian society whose agricultural production depended heavily on precise mastery of celestial phenomena, four-season transitions, and solar orbital cycles. As early as the Western Zhou Dynasty or earlier, ancient observers established the tradition of "erecting an eight-chi gnomon to measure the solar shadow." When the Duke of Zhou laid out the eastern capital of Luoyi, he erected gnomons to measure shadows in search of the "Center of the Earth," laying the empirical and mathematical foundation for measuring shadow lengths to calculate the solstices, equinoxes, and day-night variations.

During the Spring and Autumn and Warring States periods, the expansion of agricultural reclamation and the Hundred Schools of Thought stimulated philosophical inquiries into cosmic structure and celestial mechanics. Astronomical observation advanced from qualitative recording toward quantitative mathematical calculations of solar and lunar orbits and shadow variations, creating an urgent demand for systematic mathematical theory.

Cosmological Contest Between the Kai Tian (Canopy Heavens) and Hun Tian (Celestial Sphere) Theories

During the pre-Qin and Han periods, ancient Chinese cosmology was dominated by three major competing schools: the Kai Tian (Canopy Heavens), the Hun Tian (Celestial Sphere), and the Xuan Ye (Infinite Empty Space) theories. The Kai Tian school initially posited that "the heavens are circular like an open umbrella, and the earth is square like a chessboard," which was later refined into a model of parallel double curved planes.

To ensure their model remained geometrically self-consistent and aligned with empirical observation, Kai Tian scholars sought to use the shadow differences measured by eight-chi gnomons to calculate the height of the celestial vault, the diameter of the sun, and the orbital radius of the sun revolving around the North Celestial Pole. This endeavor to mathematize and geometrize cosmic architecture directly drove the compilation of the Zhoubi corpus, serving as the core intellectual bulwark of the Kai Tian school against the Hun Tian school.

Early Accumulation of Pre-Qin Geometric and Gougu Knowledge

In constructing cities, directing hydraulic engineering, and surveying arable lands, ancient Chinese forebears accumulated rich empirical knowledge regarding the side-length relationships of right triangles. The Records of the Grand Historian records that when Da Yu tamed the floods, he held "a plumbline in his left hand and a compass and square in his right," reflecting the ancient lineage of measuring tools.

Shang Gao articulated the specific 3:4:5 right-triangle relationship in the early Western Zhou, while Warring States scholar Chen Zi further advanced methods for surveying celestial heights and solar distances using differences in right-triangle proportions, establishing a computational tradition celebrated for "concise expression yet vast application." These mathematical practices provided rich analytical foundations for the Zhoubi.

Course of the Event

The Shang Gao Dialogue and the Genesis of Western Zhou Mathematical Theory

In the early Western Zhou Dynasty, while establishing rites and music in Luoyi, the Duke of Zhou (Ji Dan) questioned Grandee Shang Gao, a master of astronomical reckoning, regarding the profound methods of measuring heaven and earth: "I have heard that the grandee excels in numbers. In antiquity, Fuxi established the degrees of the heavenly calendar; yet heaven cannot be mounted by steps, nor can earth be measured with foot-rules. Whence do numbers emerge?" Shang Gao systematically explained that mathematical and geometric principles reflect the objective structures of the natural universe, expounding the profound generative theory: "The method of numbers emerges from the circle and the square; the circle emerges from the square, the square from the carpenter's L-square, and the L-square from the multiplication table of nine times nine." He elucidated that planar geometric calculation originates from the right-angled square, whose operational principles rest upon multi-digit multiplication.

In explaining geometric calculation, Shang Gao first articulated the specific configuration of the Gougu Theorem: "Fold the L-square to make the base (gou) three, the altitude (gu) four, and the hypotenuse (xian) five." Using a folding carpenter's square, Shang Gao explained that when the two legs of a right triangle are three and four units respectively, the connecting diagonal hypotenuse is invariably five units. To demonstrate the general validity of this principle, Shang Gao elaborated the geometric dissection and recombination method: "Square them, halve the outer rectangle, encircle and combine them to complete three, four, and five; the two rectangles together equal twenty-five in area, which is termed the accumulation of squares."

By constructing squares upon the base and altitude legs and cutting and rotating outer right triangles to form a large composite square of side five, the sum of the base square (nine) and the altitude square (sixteen) exactly equals the area of the hypotenuse square (twenty-five). Shang Gao demonstrated that when Da Yu governed the empire's flooding rivers, he utilized these geometric tools and accumulated area algorithms to survey elevations and channel waterways. The dialogue between Shang Gao and the Duke of Zhou forms the core opening chapter of the upper volume of Zhoubi, representing the conceptual synthesis of right-triangle properties achieved during the Western Zhou period.

Chen Zi's Surveying Methods and Mathematical Model Construction

During the middle and late Warring States period, profound socio-economic transformations and sophisticated engineering practices elevated mathematics into an independent empirical discipline. In responding to his disciple Rong Fang, mathematician Chen Zi elevated the study of arithmetic to a rigorous methodological philosophy. When Rong Fang lamented his inability to grasp the profound principles of calculation, Chen Zi admonished: "Your contemplation has failed to categorize systematically. The art of mathematics is concise in expression yet vast in application; only through rigorous categorization can one master the dimensions of heaven and earth." Chen Zi emphasized that mathematics must not rely on rote memorization, but must master the principle of "comprehending categories" to deduce complex phenomena from fundamental theorems—a doctrine that became the guiding principle of traditional Chinese mathematics.

In practical cosmic measurement, Chen Zi formulated an integrated geometric surveying methodology based on gnomon shadow differences, tailored to the Kai Tian model of a curved canopy heaven. Relying on ancient astronomical conventions, Chen Zi adopted the working postulate that "shadow lengths vary by one inch per one thousand li along the meridian." Utilizing an eight-chi gnomon, he observed a noon shadow of one chi six cun at the summer solstice. Using the linear ratio between shadow length and terrestrial distance, he calculated that the subsolar point at the summer solstice lay sixty thousand li south of the observation site.

Building upon this baseline, Chen Zi constructed similar right triangles using the Gougu Theorem: setting sixty thousand li as the base leg and solar vertical height as the altitude leg, he derived through proportional scaling that the vertical height of the sun above the earth was eighty thousand li. Furthermore, by affixing an observation tube with an internal diameter of one inch to the tip of an eight-chi gnomon and sighting the solar disk, he applied optical perspective geometry to determine that the actual diameter of the sun was one thousand two hundred and fifty li. Although based on idealized terrestrial assumptions, Chen Zi's deductive system brilliantly showcased the application of the Pythagorean theorem, root-extraction, and ratio scaling to celestial measurement.

Seven-Ring Geometric Schema and Solar Calendar Deductions

With the establishment of the twenty-four solar terms from the late Warring States to the Qin-Han transition, Kai Tian astronomers sought to expand single-point solstice measurements into a continuous annual model of solar movement. Compilers of Zhoubi abstracted the annual trajectory of the sun into a concentric circular geometric schema known as the "Seven Rings and Six Intervals" (Qi Heng Liu Jian). Taking the North Celestial Pole as the shared center, seven concentric circular tracks were delineated: the Innermost Ring, Second Ring, Third Ring, Fourth Ring (Middle Ring), Fifth Ring, Sixth Ring, and Outermost Ring, separated by six equidistant annular zones.

According to Zhoubi, the Innermost Ring represents the summer solstice trajectory, where the sun is closest to the polar axis, its circular path shortest, and daytime longest; the Outermost Ring represents the winter solstice path, where the sun is farthest from the pole, its circular path largest, and nighttime longest; the Middle Ring represents the equinoctial path, where day and night are equal. Applying arithmetic progressions to shadow increments, scholars calculated the circumference, diameter, sunrise/sunset azimuths, and noon shadow lengths for every solar term across the seven concentric rings.

Furthermore, Zhoubi integrated this geometric model with the Han "Quarter-Day Calendar" (Sifen Li), which posited a tropical year of 365.25 days and an intercalation cycle of seven leap months every nineteen years. Utilizing fractional arithmetic and square-root algorithms, Zhoubi calculated the astronomical cycles of the 19-year zhang cycle, 76-year bu cycle, 1,520-year ji cycle, and 4,560-year yuan cosmic cycle, elevating Kai Tian cosmology from a qualitative worldview into a quantitative mathematical astronomy system.

Western Han Redaction and the Definitive Two-Volume Text

In 104 BCE (the first year of the Taichu era), Emperor Wu of Han summoned astronomers nationwide to reform the calendar, leading Sima Qian, Luoxia Hong, and Tang Du to formulate the Taichu Calendar, which ignited fierce debates between the Hun Tian and Kai Tian cosmological models. From the reigns of Emperor Xuan to Emperor Cheng, the contest escalated between Sima Qian's armillary-based Hun Tian sphere and the gnomon-based Kai Tian canopy. To provide their school with an authoritative canonical foundation, Kai Tian mathematical scholars undertook a comprehensive compilation of ancestral astronomical texts.

These scholars gathered ancestral records of the Shang Gao and Chen Zi dialogues, appending extensive operational mathematical procedures (shu yue) and concrete observational problems. Placing Shang Gao's right-triangle principles at the foundation, Chen Zi's surveying methods at the operational core, and the Seven-Ring schema and Quarter-Day calendrical calculations as the overarching structural framework, they forged a cohesive two-volume masterwork.

Because the treatise took as its purpose the calculation of the heavenly calendar using the imperial shadow gnomon (zhoubi), scholars definitively titled the work Zhoubi. Although Liu Xin's Seven Summaries and Ban Gu's Treatise on Literature in the Book of Han did not catalog the title directly, its mathematical problems and diagrams were extensively cited across contemporary astronomical apocrypha, confirming that Zhoubi had attained definitive textual completion by the late Western Han.

Zhao Shuang's Commentary and Geometric Proof via the String Diagram

Between the late Han and the Three Kingdoms Period, following Zhang Heng's invention of the water-driven armillary sphere and his treatise Ling Xian, the Hun Tian theory secured dominant official orthodoxy, and the Kai Tian cosmology declined. Nevertheless, the sophisticated right-triangle algorithms, double-difference surveying methods, and root-extraction procedures within Zhoubi remained revered as supreme mathematical classics. During the Huangwu era of Eastern Wu, mathematician Zhao Shuang resolved to compose a comprehensive commentary to elucidate its archaic text and correct copying errors.

In his commentary, Zhao Shuang provided critical philological glosses on obscure astronomical terms and authored the immortal mathematical treatise Diagram of the Round and Square and the Gougu Theorem. Addressing the concise pre-Qin formulations, Zhao Shuang created the celebrated "String Diagram" (Xian Tu), presenting the world's earliest rigorous geometric dissection and area-complement proof (the "in-and-out complementary principle") of the Gougu Theorem ($a^2 + b^2 = c^2$).

Zhao Shuang demonstrated: "Multiply the base and altitude each by itself, combine them to form the hypotenuse area, and extract the square root to obtain the hypotenuse." He arranged four congruent right triangles (each with area $\frac{1}{2}ab$, together totaling $2ab$) around a central square of side $(b - a)$ (with area $(b - a)^2$) to form a large square of side $c$ (with area $c^2$). Through elegant algebraic transformations, he demonstrated that $c^2 = 2ab + (b - a)^2 = a^2 + b^2$, deriving over twenty related equations for finding unknown legs and differences. Zhao Shuang's commentary transformed Zhoubi into an enduring mathematical masterpiece of deductive rigor.

Zhen Luan's Expositions and Li Chunfeng's Official Selection as Foremost Canon

During the Northern and Southern Dynasties, under the Northern Zhou Dynasty, calendrical scholar Zhen Luan composed detailed computational steps for every problem in the treatise under the title Detailed Exposition of the Zhoubi Suanjing, significantly lowering the pedagogical barrier for subsequent generations of scholars.

In the early Tang Dynasty, the implementation of the Equal-Field and Tax systems created an urgent demand for skilled mathematicians in public works, land surveying, and astronomy. In 656 CE (the first year of the Xianqing era), Emperor Gaozong decreed the establishment of the Mathematics Department at the Imperial Academy, commanding Astrologer Royal Li Chunfeng, Professor Liang Fa, and Wang Zhenru to redact and annotate ten mathematical classics into official textbooks. The editorial committee formally appended the characters "Suanjing" (Computational Canon) to the title, establishing Zhoubi Suanjing.

Li Chunfeng demonstrated profound scientific integrity in his commentary. Rejecting the Han axiom that "shadow lengths vary by one inch per one thousand li," he cited field measurements conducted by Buddhist monk Yi Xing and Nangong Shuo across four terrestrial stations in Henan to demonstrate that this assumption contradicted empirical reality. Consequently, Li Chunfeng introduced the "Slanted Double-Difference Method" (Xiemian Chongcha Shu) into his annotations, solving for distances and heights using shadow differences across two gnomons. Positioned at the very head of the official Ten Computational Canons, Zhoubi Suanjing became mandatory curricular reading for civil service examinations, securing its immortal status in world science.

Key Figures

Foundational and Early Creators

  • Shang Gao: Early Western Zhou mathematician and astronomer. Dialogued with the Duke of Zhou, expounding that circularity emerges from the square and squares from the carpenter's L-square, articulating the 3:4:5 Pythagorean triple.
  • Chen Zi: Eminent Warring States mathematician and astronomer. Instructed Rong Fang in mathematical methodology, advocated categorization, and pioneered gnomon shadow surveying using similar right triangles.

Han Dynasty Compilers and Scholars

  • Western Han Mathematical Astronomers: Anonymous scholars from the Taichu calendar reform through the late Western Han who compiled ancestral dialogues, appended operational mathematical procedures, and synthesized the Seven-Ring cosmological model into two volumes.

Classical Commentators

  • Zhao Shuang: Courtesy name Yingqi; Eastern Wu mathematician and astronomer during the Three Kingdoms Period. Composed the definitive commentary on Zhoubi and authored Diagram of the Round and Square and the Gougu Theorem, utilizing the String Diagram and dissection techniques to geometrically prove the Pythagorean theorem.
  • Li Chunfeng: Eminent Tang Dynasty astronomer and mathematician. Commissioned to redact the Ten Computational Canons, he identified empirical discrepancies in Han shadow ratios, introduced double-difference surveying methods, and canonized the work as the foundational imperial textbook.

Results and Impact

Genesis of the Mathematical Astronomy System in Ancient China

The compilation of Zhoubi Suanjing marked the transition of ancient Chinese astronomy from qualitative descriptive astrology to quantitative mathematical astronomy governed by geometric models. The "Seven Rings and Six Intervals" schema created a concentric dynamic orbital system anchored by the summer solstice, equinoctial, and winter solstice tracks, successfully explaining seasonal day-night variations, solar term cycles, and solar parallax, serving as the theoretical precursor for subsequent Chinese calendrical systems.

Foundation of the Gougu Theorem and Double-Difference Surveying

The dialogues of Shang Gao and Chen Zi in Zhoubi Suanjing not only explicitly articulated the universal formula "multiply the base and altitude each by itself, combine them, and extract the square root," but also received rigorous geometric proof through Zhao Shuang's String Diagram in the third century CE. The solar height model directly inspired Liu Hui's Sea Island Mathematical Canon and Tang-Song cartographic surveying, establishing a distinctive Chinese geometric tradition.

Foremost of the Ten Computational Canons and Dissemination Across East Asia

Designated by Li Chunfeng as the premier text among the Ten Computational Canons at the Tang Imperial Academy, Zhoubi Suanjing required three full years of study before examination. Transmitted via diplomatic embassies to Silla and Japan, it became the fundamental textbook for mathematical civil service recruitment in Korea and instructional training under the Taihō Code in Japan, exerting a profound and enduring impact across East Asian scientific civilization.

Historical Assessment

Assessments from Wei, Jin, Southern and Northern Dynasties to Sui and Tang

  • Zhao Shuang (Eastern Wu): "The utility of mathematics is vast indeed. Those who study calculation need not cling rigidly to obsolete rules; if they comprehend the transformations, all numbers under heaven reside within their grasp. Through the arts of Shang Gao and Chen Zi, the phenomena of heaven and earth have nowhere to hide."
  • Zhen Luan (Northern Zhou): "Among the mathematical works of the Han era, Zhoubi ranks foremost. For surveying heaven and measuring earth, one cannot dispense with the carpenter's square; and the art of using the square truly commenced with Shang Gao."
  • Li Chunfeng (Tang Dynasty): "Zhoubi represents the ultimate discourse of the Canopy Heavens and the vanguard of mathematical art. Deducing solar shadow movements and penetrating subtle patterns to discern the future, its mathematical methods remain immortal across the ages."

Assessments from Song, Yuan, Ming, and Qing Dynasties

  • Chen Zhensun (Song Dynasty): "Zhoubi Suanjing in two volumes, commentated by Zhao Shuang of Han, expounded by Zhen Luan of Northern Zhou, and annotated by Li Chunfeng of Tang. It describes the celestial vault like a covering canopy, representing the Kai Tian theory and the ancestor of mathematical astronomy."
  • Imperial Siku Quanshu Zongmu Tiyao (Qing Dynasty): "Among mathematical books preserved in the world, this is the most ancient. It records the dialogues of Shang Gao and the Duke of Zhou, as well as Chen Zi and Rong Fang, all addressing methods of right-triangle surveying. Though its Canopy Heavens theory is less refined than the Celestial Sphere model, its precision in laying out mathematical models makes it the true fountainhead of survey mathematics."
  • Dai Zhen (Qing Dynasty): "The ancients erected gnomons to measure shadows to investigate heavenly degrees; the records within Zhoubi constitute the primeval ancestor of astronomical calculation for myriad generations. Its diagrams and explanations of right triangles are subtle and profound, unveiling principles left unaddressed by earlier sages."

Related Entries

  • Ten Computational Canons
  • Gougu Theorem
  • Zhao Shuang's String Diagram
  • Kai Tian (Canopy Heavens) Theory
  • Hun Tian (Celestial Sphere) Theory
  • Li Chunfeng
  • Nine Chapters on the Mathematical Art
  • Taichu Calendar

Bibliography

  • Zhoubi Suanjing (Commentary by Zhao Shuang of Eastern Wu, annotations by Li Chunfeng of Tang, Song Dynasty printed edition)
  • Book of Han (Han Shu), Volume 30: "Treatise on Literature" (Ban Gu)
  • Book of Jin (Jin Shu), Volume 11: "Treatise on Astronomy I" (Fang Xuanling et al.)
  • Book of Sui (Sui Shu), Volume 34: "Treatise on Classics and Books III: Astronomy and Mathematics" (Wei Zheng et al.)
  • Old Book of Tang (Jiu Tang Shu), Volume 79: "Biography of Li Chunfeng" (Liu Xu et al.)
  • Annotated Catalog of the Complete Imperial Library (Siku Quanshu Zongmu Tiyao), Volume 106: "Astronomy and Algorithmic Mathematics" (Ji Yun et al.)