Liu Xin (Chinese: ; Wade-Giles: Liu Hsin; c. 50 BCE – 23 CE),courtesy name Zijun (Chinese: ), was a Chinese astronomer, mathematician, historian, librarian and politician during the Western Han Dynasty (206 BCE - 9 CE) and Xin Dynasty (9 – 23 CE). He later changed his name to Liu Xiu (Chinese: ) due to the naming taboo of Emperor Ai of Han. He was the son of Confucian scholar Liu Xiang (77 – 6 BCE) and an associate of other prominent thinkers such as the philosopher Huan Tan (c. 43 BCE - 28 CE). Liu founded the Old Text school of Confucianism.
Liu Xin was the son of Confucian scholar Liu Xiang (77 – 6 BCE). Liu was a distant relative of Liu Bang, the founder of the Han dynasty, and was thus a member of the ruling dynastic clan (the Liu family). Liu Xin's paternal grandfather ranked as a marquess.
As a curator of the imperial library he was the first to establish a library classification system and the first book notation system. At this time the library catalog was written on scrolls of fine silk and stored in silk bags.
As the imperial librarian, Liu Xin both catalogued and annotated or edited ancient texts. These projects of his produced what became definitive texts of a number of orthodox canons of Chinese philosophy and history. However, since the 19th and early 20th centuries, antiquarians and historians have accused Liu of excessive editing, to the point of falsifying historical texts. These criticisms were systematically analysed by the Doubting Antiquity School of historians. According to the general theory of this school of history, Liu edited ancient texts for political purposes. He edited accounts of ancient historical events, and inserted into the legendary lineage of ancient rulers figures or relationships that were either invented, or borrowed from separate legends. In this way, he created a narrative of ancient rulers and successive dynasties which satisfied the "succession of five elements" theory. According to this theory, each ruler and/or dynasty represented one of the five traditional Chinese elements, and the mandate of Heaven rotated between the elements. The account edited by Liu would satisfactorily explain the rule of the Han Dynasty (and/or the brief Xin Dynasty that overthrew it) in terms of the elements they were said to represent. Further, according to this theory, the account edited by Liu also conveniently showed a series of successions between various claimed ancestors of the Han and Xin houses. As the imperial librarian, Liu was able to set the definitive text of these ancient texts, and expunge earlier versions. The Doubting Antiquity School drew evidence from discrepancies between the texts edited by Liu and earlier or contemporaneous texts. For example, figures or events appearing in Liu's edited versions did not appear in earlier or contemporaneous texts. In some cases, Liu's text referred to a supposed earlier source that was not mentioned in any other texts. Although Liu has been vindicated in respect of some of these issues by later archaeological discoveries of older manuscript that corroborated Liu's version, some other criticisms have become largely accepted by historians.
For centuries before the reign of Wang Mang (r. 9–23) the Chinese had used the value of 3 for their calculation of pi, the ratio of a circle's circumference to its diameter (now known to be approximately equal to 3.14159). Between the years 1 and 5, while working for the de facto head of state Wang Mang, Liu Xin was the first to give a geometrical figure which implies the improved approximation ? ? 3.1547, although the exact method he used to reach this figure is unknown. However, the ancient record of Liu Xin's 'Jia Liang Hu' standard is still preserved in Beijing, which Joseph Needham quotes below with modern references for archaic units (Wade-Giles spelling):
The standardised chia liang hu (has) a square with each side 1 chhih (foot) long, and outside it a circle. The distance from each corner of the square to the circle (thiao phang) is 9 li 5 hao. The area of the circle (mu) is 162 (square) tshun (inches), the depth 1 chhih (foot), and the volume (of the whole) 1620 (cubic) tshun (inches).
Although Liu Xin was originally a loyal partisan of Wang Mang, after Wang's troops suffered defeat on July 7, 23 at the Battle of Kunyang, Liu Xin plotted with others to overthrow Wang Mang. The plot was discovered, and all the conspirators committed suicide or were executed.