Contrary to astronomy, the early modern Chinese State did not systematically sponsor mathematics. However, early in his reign, the Kangxi Emperor studied this subject with the Jesuit missionaries in charge of the calendar. His first teacher, Ferdinand Verbiest (1623-1688) relied on textbooks based on Christoph Clavius' (1538-1612). Those who succeeded Verbiest as imperial tutors in the 1690s produced lecture notes in Manchu and Chinese. Newly discovered manuscripts show Antoine Thomas (1644-1709) wrote substantial treatises on arithmetic and algebra while teaching those subjects. In 1713, the emperor commissioned a group of scholars and officials to compile a standard survey of mathematics (Shuli jingyun, "Essential principles of mathematics"). This work opened with the claim that mathematics had its roots in Chinese Antiquity. However, it can be shown that the Jesuits' lecture notes were the main source of the Shuli jingyun. The reconstruction of mathematics under Kangxi's patronage is thus best characterised as the imperial appropriation of Western learning.