**Mei Wending**was born into a family of considerable mathematical talents. He had three younger brothers, two of whom, Mei Wennai and Mei Wenmi, were both skilled mathematicians and astronomers. Mei Wenmi, Mei Wending's youngest brother, produced an excellent star catalogue. Continuing for a moment to give further family details, we note that Mei Wending's son Mei Yiyan, who died young, also became a skilled mathematician assisting his father. Also Mei Wending's grandson, Mei Juecheng, became a particularly well-known as a mathematician. To avoid confusion, from now on let us adopt the system of referring to Mei Wending as Mei, while referring to all other members of the Mei family by their full names.

The German Jesuit missionary Johann Adam Schall von Bell went to China as a missionary in 1618. He went to Peking in 1630 to undertake a reform of the Chinese calendar. Because the Board of Mathematics, a group of around 200 Chinese mathematicians, had made an error in calculating the calendar in 1611, the government had enlisted the help of missionaries in the task. Schall, rather than just assisting, was put in charge of the production of a new calendar which was adopted in 1645. However this was controversial; many Chinese did not like a Westerner in charge of the calendar, other missionaries were upset that the new calendar still contained references to "lucky" and "unlucky" days. These issues regarding the Chinese calendar were important ones during the years that Mei and his brothers were growing up, and they studied the mathematical and astronomical topics necessary for calendar design under the Daoist teacher Ni Guanghu.

China was in a transitional state during the years that Mei was growing up. The Ming dynasty had come to an end in 1644 when the Manchus, having invaded from the north, took control of Peking. They set up the new Qing regime and the native Chinese were not allowed to hold the highest offices in the administration, these being all taken by Manchus. Mei's family remained loyal to the old Chinese Ming dynasty keeping themselves independent of the Manchu led administration. However, the Qing rulers tried to promote Chinese culture and the Emperor Kangxi, who came to power in 1661 when only seven years of age, worked hard to promote learning. He was keen on both Chinese learning and the new European learning brought to China by the missionaries. Mei also tried to steer a course between the best of the old Chinese learning and the new European learning. Keizo Hashimoto writes [1]:-

Mei's first work was on astronomy and its relation to making calendars. This treatiseMei tried to situate the new European knowledge properly within the historical framework of Chinese astronomy and mathematics. In his view, Chinese astronomical knowledge had advanced following the adoption of the new, more accurate Jesuit calendar following the reform initiated by Xu Guangqi in1629. In his historical studies, Mei stressed that Chinese astronomy had improved from generation to generation, progressing from coarseness to accuracy. He gave precisely the same description for the development of Western astronomy. In other words, he believed that progress was a universal historical pattern. This was Mei's historical rationale for synthesizing Western and Chinese knowledge.

*Lixue pianzhi*was written in 1662. In fact arguments about the calendar were reaching a head in China around this time for only two years after this work appeared the Jesuits were accused by Yang Guangxian of using calendar reform as a means of covering up their work on converting the Chinese to Christianity and of subverting the Empire. What did Mei argue in his 1662 work? Pingyi Chu writes [4]:-

But Mei also entered into the religious argument which was associated with calendar reform, and in particular faced up to the arguments being put forward by Yang Guangxian:-Errors in the astronomical texts, he argued, jeopardized the development of the discipline; he then developed an evidential method to analyse traditional Chinese mathematics and astronomy. His methods involved correcting and reconstructing texts while preserving questions that he had been unable to solve. Mei argued that all sorts of errors in the ancient mathematical and astronomical texts had seriously impaired their transmission regardless of whether they were the corruption of printing boards, or mistakes in coping with a text, or commentating on a text without a proper understanding. In reviving the Chinese mathematical and astronomical traditions, collecting and collating ancient texts was a crucial first step.

Yang Guangxian's arguments against the astronomers who were Jesuits, either Europeans or Chinese converts, was so successful that at one stage all were condemned to death. They were saved due to an earthquake hitting not long before the time set for their execution, but later Mei's arguments against Yang Guangxian succeeded since his lack of ability to make complicated calendrical computations became clear. In fact this dispute led to the Emperor Kangxi becoming an enthusiast for mathematics, something which helped Mei in the later part of his career. Kangxi said [5]:-Mei Wending argued, moreover, that calendrical studies were at the core of the Confucian pursuit of 'gewu qiungli'(investigating things so as to fathom the principle thoroughly).The eternity of 'li' guaranteed the status of the ancient sages, a status profoundly important to the cultural identity of Confucian scholars. The innate capacity of the heart/mind was such that the ultimate 'li' could be attained through mathematical investigations of each ancient calendar. From this angle, Mei Wending suggested the possibility of integrating calendrical study into the newly emerging evidential scholarship and contended that the investigation of ancient calendars and ancient remains were of equal importance for understanding 'li'. In addition, he claimed that the new Western calendar was only a variant of the Chinese calendar, anticipated by the wisdom of the ancient sages. This emphasis on the great importance of astronomy led Mei to reject the claims of Confucian scholars such as Yang Guangxian who were satisfied with understanding the 'li' of astronomy without bothering with detailed calendrical calculations. According to Mei, without engaging in complicated calendrical computation, 'li' simply could not be attained.

Mei's first mathematical work was theYou only know that I am versed in mathematics. But you do not know why I study mathematics. When I was young, the Chinese officials and the Westerners at the Board of Mathematics were on unfriendly terms with each other. They accused each other. It almost came to capital punishment. Yang Guangxian and Adam Schall von Bell measured the length of the sun's shadow in front of the Wu Men gate. Unfortunately among those leading ministers there was no one who understood the method. I realised that if I did not know it myself, I could not judge true from false. So I was eagerly determined to study mathematics.

*Fangcheng lun*(On simultaneous linear equations) which he wrote in 1672. Joseph Dauben and Christoph Scriba write [2]:-

He continued throughout his career to argue strongly for the acceptance of the new mathematical ideas coming from Europe and also for preserving the Chinese approach to mathematics [2]:-'Fangcheng' is one of the 'jiushu'(Nine Subjects Concerning Number)emphasised in Confucian education in the pre-Qin period(before211B.C.). When he finished writing this book, Mei Wending wrote to one of his friends saying that "I am disgusted by those Western missionaries who exclude traditional Chinese mathematics, and therefore I wrote this book about which even Matteo Ricci could not possibly say a bad word". Indeed, Western missionaries who went to China in the1617^{th}and^{th}centuries did not mention simultaneous linear equations because the subject was then only in its infancy in the West. Mei Wending clearly wished to demonstrate the superiority of early Chinese mathematics over the methods Western scholars had brought to China, and at least in this case, the example of simultaneous linear equations was an excellent one to stress.

In 1693 Mei again made clear his approach to Western mathematics writing (see for example [3]):-In his various works, Mei Wending compiled ancient mathematical material and studied a number of almost forgotten topics. For example, the gougu theorem(referred to in the West as the Pythagorean Theorem)was a well-known and important focus of ancient Chinese geometry, but since the time of Liu Hui and Zhao Shang, two brilliant mathematicians of the3(^{rd}century, no proof of the gougu theorem had been given in any mathematical books. Mei Wending, however, proposed two proofs, along with other applications of the theorem in his 'Gougu juyu'Illustration of the Right-Angled Triangles)(written before1692).

Mei used traditional Chinese methods inNumber and principle are united.[In this respect]China and the West do not differ. Therefore rites can be retrieved from Barbarians, administration can be enquired about from Tanzi. Refusing this learning just because it is Western would be a short-sighted attitude, and not the way to what is excellent. Furthermore, if we look for it in the past, we will probably find something similar.

*Jihe bubian*(Complements of Geometry) Mei to calculate the volumes and relative dimensions of regular and semi-regular polyhedrons. The

*Jihe tongjie*(Complete Explanation of Geometry) contains Mei's approach to Euclidean geometry. In 1700, in the

*Qiandu celiang*(The Measurement of a Prism with Two Right Triangular Bases), he gave a trigonometric interpretation of the celestial coordinate transformation introduced by Guo Shoujing in 1280. Around 1701 he wrote

*Lixue yiwen*(Inquiry on Mathematical Astronomy) which greatly interested the Emperor Kangxi who then summoned Mei to an audience in 1703. By this time Mei was seventy years old and went to Baoding to meet Emperor Kangxi taking his grandson Mei Juecheng with him. Although this was the first meeting between Mei and the Emperor, earlier Mei had taught mathematics to the son of Li Guangdi, the Emperor's mathematical advisor, along with his own grandson Mei Juecheng at Baoding. Mei was too old by this time to serve the Emperor but the discussions between Mei and the Emperor led eventually to the establishing of the Mengyangzhai (the Academy of Mathematics) in 1713. Its main aim was to supervise the compilation of mathematical and astronomical works, and many of the mathematicians trained by Mei, including his grandson Mei Juecheng, were chosen to work at the Academy.

The ancient Chinese calendar makers had used a method of interpolation in their work and Mei explained their methods in his 1704 work *Pinggliding sancha xiangshuo* . In 1710 he produced a text *Fangyuan miji* in which he gave his methods for finding the formula for the volume of a sphere. His collected works, *Lisuan quanshu*, was published in 1723.

Mei Juecheng compiled and edited his grandfather's works and published them in *Mei shi congshu jiyao* in 1761. For more details see Mei Juecheng's biography.

**Article by:** *J J O'Connor* and *E F Robertson*