Zhang Heng (; AD 78139), courtesy name Pingzi, formerly romanized Chang Heng, was a Chinese polymathic scientist and statesman who lived during the Eastern Han dynasty. Educated in the capital cities of Luoyang and Chang'an, he achieved success as an astronomer, mathematician, seismologist, hydraulic engineer, inventor, geographer, cartographer, ethnographer, artist, poet, philosopher, politician, and literary scholar.

Zhang Heng began his career as a minor civil servant in Nanyang. Eventually, he became Chief Astronomer, Prefect of the Majors for Official Carriages, and then Palace Attendant at the imperial court. His uncompromising stance on historical and calendrical issues led to his becoming a controversial figure, preventing him from rising to the status of Grand Historian. His political rivalry with the palace eunuchs during the reign of Emperor Shun (r. 125–144) led to his decision to retire from the central court to serve as an administrator of Hejian Kingdom in present-day Hebei. Zhang returned home to Nanyang for a short time, before being recalled to serve in the capital once more in 138. He died there a year later, in 139.

Zhang applied his extensive knowledge of mechanics and gears in several of his inventions. He invented the world's first water-powered armillary sphere to assist astronomical observation; improved the inflow water clock by adding another tank; and invented the world's first seismoscope, which discerned the cardinal direction of an earthquake away. He improved previous Chinese calculations for pi. In addition to documenting about 2,500 stars in his extensive star catalog, Zhang also posited theories about the Moon and its relationship to the Sun: specifically, he discussed the Moon's sphericity, its illumination by reflected sunlight on one side and the hidden nature of the other, and the nature of solar and lunar eclipses. His fu (rhapsody) and shi poetry were renowned in his time and studied and analyzed by later Chinese writers. Zhang received many posthumous honors for his scholarship and ingenuity; some modern scholars have compared his work in astronomy to that of the Greco-Roman scientist Ptolemy (AD 86–161).

Life

Early life Born in the town of Xi'e in Nanyang Commandery (north of the modern Nanyang City in Henan), Zhang Heng came from a distinguished but not affluent family. His grandfather Zhang Kan () had been governor of a commandery and one of the leaders who supported the restoration of the Han by Emperor Guangwu (r. 25–57), following the death of the usurping Wang Mang of the Xin (AD 9–23). When he was ten, Zhang's father died, leaving him in the care of his mother and grandmother.

An accomplished writer in his youth, Zhang left home in the year 95 to pursue his studies in the capitals of Chang'an and Luoyang. While traveling to Luoyang, Zhang passed by a hot spring near Mount Li and dedicated one of his earliest fu poems to it. This work, entitled "Fu on the Hot Springs" (Wēnquán fù ), describes the throngs of people attending the hot springs, which later became famous as the "Huaqing Hot Springs", a favorite retreat of imperial concubine Yang Guifei during the Tang dynasty. After studying for some years at Luoyang's Taixue, he was well-versed in the classics and friends with several notable persons, including the mathematician and calligrapher Cui Yuan (78–143), the official and philosophical commentator Ma Rong (79–166), and the philosopher Wang Fu (78–163). Government authorities offered Zhang appointments to several offices, including a position as one of the Imperial Secretaries, yet he acted modestly and declined.

At age 23, Zhang returned home with the title "Officer of Merit in Nanyang", serving as the master of documents under the administration of Governor Bao De (in office from 103 to 111). As he was charged with composing inscriptions and dirges for the governor, he gained experience in writing official documents. As Officer of Merit in the commandery, he was also responsible for local appointments to office and recommendations to the capital of nominees for higher office. He spent much of his time composing rhapsodies on the capital cities. When Bao De was recalled to the capital in 111 to serve as a minister of finance, Zhang continued his literary work at home in Xi'e. Zhang Heng began his studies in astronomy at the age of 30 and began publishing his works on astronomy and mathematics.

Official career

In 112, Zhang was summoned to the court of Emperor An (r. 106–125), who had heard of his expertise in mathematics. When he was nominated to serve at the capital, Zhang was escorted by carriage—a symbol of his official status—to Luoyang, where he became a court gentleman working for the Imperial Secretariat. He was promoted to Chief Astronomer for the court, serving his first term from 115 to 120 under Emperor An and his second under the succeeding emperor from 126 to 132. As Chief Astronomer, Zhang was a subordinate of the Minister of Ceremonies, one of Nine Ministers ranked just below the Three Excellencies. In addition to recording heavenly observations and portents, preparing the calendar, and reporting which days were auspicious and which ill-omened, Zhang was also in charge of an advanced literacy test for all candidates to the Imperial Secretariat and the Censorate, both of whose members were required to know at least 9,000 characters and all major writing styles. Under Emperor An, Zhang also served as Prefect of the Majors for Official Carriages under the Ministry of Guards, in charge of receiving memorials to the throne (formal essays on policy and administration) as well as nominees for official appointments.

When the government official Dan Song proposed the Chinese calendar should be reformed in 123 to adopt certain apocryphal teachings, Zhang opposed the idea. He considered the teachings to be of questionable stature and believed they could introduce errors. Others shared Zhang's opinion and the calendar was not altered, yet Zhang's proposal that apocryphal writings should be banned was rejected. The officials Liu Zhen and Liu Taotu, members of a committee to compile the dynastic history (), sought permission from the court to consult Zhang Heng. However, Zhang was barred from assisting the committee due to his controversial views on apocrypha and his objection to the relegation of the Gengshi Emperor's (r. 23–25) role in the restoration of the Han dynasty as lesser than Emperor Guangwu's. Liu Zhen and Liu Taotu were Zhang's only historian allies at court, and after their deaths Zhang had no further opportunities for promotion to the prestigious post of court historian.

Despite this setback in his official career, Zhang was reappointed as Chief Astronomer in 126 after Emperor Shun of Han (r. 125–144) ascended to the throne. His intensive astronomical work was rewarded only with the rank and salary of 600 bushels, or shi, of grain (mostly commuted to coin cash or bolts of silk). To place this number in context, in a hierarchy of twenty official ranks, the lowest-paid official earned the rank and salary of 100 bushels and the highest-paid official earned 10,000 bushels during the Han. The 600-bushel rank was the lowest the emperor could directly appoint to a central government position; any official of lower status was overseen by central or provincial officials of high rank.

In 132, Zhang introduced an intricate seismoscope to the court, which he claimed could detect the precise cardinal direction of a distant earthquake. On one occasion his device indicated that an earthquake had occurred in the northwest. As there was no perceivable tremor felt in the capital his political enemies were briefly able to relish the failure of his device, until a messenger arrived shortly afterwards to report that an earthquake had occurred about 400 km (248 mi) to 500 km (310 mi) northwest of Luoyang in Gansu province.

A year after Zhang presented his seismoscope to the court, officials and candidates were asked to provide comments about a series of recent earthquakes which could be interpreted as signs of displeasure from Heaven. The ancient Chinese viewed natural calamities as cosmological punishments for misdeeds that were perpetrated by the Chinese ruler or his subordinates on earth. In Zhang's memorial discussing the reasons behind these natural disasters, he criticized the new recruitment system of Zuo Xiong which fixed the age of eligible candidates for the title "Filial and Incorrupt" at age forty. The new system also transferred the power of the candidates' assessment to the Three Excellencies rather than the Generals of the Household, who by tradition oversaw the affairs of court gentlemen. Although Zhang's memorial was rejected, his status was significantly elevated soon after to Palace Attendant, a position he used to influence the decisions of Emperor Shun. With this prestigious new position, Zhang earned a salary of 2,000 bushels and had the right to escort the emperor.

As Palace Attendant to Emperor Shun, Zhang Heng attempted to convince him that the court eunuchs represented a threat to the imperial court. Zhang pointed to specific examples of past court intrigues involving eunuchs, and convinced Shun that he should assume greater authority and limit their influence. The eunuchs attempted to slander Zhang, who responded with a fu rhapsody called "Fu on Pondering the Mystery", which vents his frustration. Rafe de Crespigny states that Zhang's rhapsody used imagery similar to Qu Yuan's (340–278 BC) poem "Li Sao" and focused on whether or not good men should flee the corrupted world or remain virtuous within it.

Literature and poetry

While working for the central court, Zhang Heng had access to a variety of written materials located in the Archives of the Eastern Pavilion. Zhang read many of the great works of history in his day and claimed he had found ten instances where the Records of the Grand Historian by Sima Qian (145–90 BC) and the Book of Han by Ban Gu (AD 32–92) differed from other ancient texts that were available to him. His account was preserved and recorded in the 5th-century text of the Book of Later Han by Fan Ye (398–445). His rhapsodies and other literary works displayed a deep knowledge of classic texts, Chinese philosophy, and histories. He also compiled a commentary on the Taixuan (, "Great Mystery") by the Daoist author Yang Xiong (53 BC–AD 18).

Xiao Tong (501–531), a crown prince of the Liang dynasty (502–557), immortalized several of Zhang's works in his literary anthology Selections of Refined Literature. Zhang's fu rhapsodies include "Western Metropolis Rhapsody" (Xī jīng fù ), "Eastern Metropolis Rhapsody" (Dōng jīng fù ), "Southern Capital Rhapsody" (Nán dū fù ), "Rhapsody on Contemplating the Mystery" (Sī xuán fù ), and Return to the Field. The latter fuses Daoist ideas with Confucianism and was a precursor to later Chinese metaphysical nature poetry, according to Liu Wu-chi. A set of four short lyric poems entitled Lyric Poems on Four Sorrows (Sì chóu shī ), is also included with Zhang's preface. This set constitutes some of the earliest heptasyllabic shi Chinese poetry written. While still in Luoyang, Zhang became inspired to write his "Western Metropolis Rhapsody" and "Eastern Metropolis Rhapsody", which were based on the "Rhapsody on the Two Capitals" by the historian Ban Gu. Zhang's work was similar to Ban's, although the latter fully praised the contemporaneous Eastern Han regime while Zhang provided a warning that it could suffer the same fate as the Western Han if it too declined into a state of decadence and moral depravity. These two works satirized and criticized what he saw as the excessive luxury of the upper classes. Zhang's "Southern Capital Rhapsody" commemorated his home city of Nanyang, home of the restorer of the Han dynasty, Guangwu.