Xu Yue, whose literary name is Gonghe, was a native of Donglai (in present Ye District, Shandong Province). Very little is known of his background except that he was a follower of Liu Hong, an eminent mathematician and calendar expert of the second century. He studied mathematics and astronomy under Liu Hong and had frequent discussions with him and the Astronomer‐Royal of the Astronomical Bureau on matters pertaining to calendrical astronomy. He was said to have written a commentary on the Jiuzhang Suanshu (Nine Chapters on Mathematical Art) and a mathematical text known as Shu Shu Ji Yi (Memoir on Some Traditions of Mathematical Art) around AD 190. The commentary had long been lost while the Shu Shu Ji Yi was handed down with a commentary written by Zhen Luan (fl. AD 570). There are a number of Buddhist references in Zhen Luan's commentary.

The Shu Shu Ji Yi was written in a terse and obscure style, tinged with Daoism and divination. Xu Yue mentioned that the mathematics he learnt from Liu Hong was that transmitted directly by a Daoist adept called Tian‐Mu Xiansheng (Mr Eye‐of‐Heaven). The text mentions 14 old methods of calculation, many of them bearing the names taken from the Yijing (I Ching, Book of Changes). Of special interest is one called “ball‐arithmetic,” a trough‐and‐ball instrument similar to an abacus. Three other methods also involved the use of “balls”. The first involved the use of one ball per column moving up and down a board or a trough. The second used two balls of two different colors, one relating to a y‐axis on the left and the other to a y‐axis on the right. Both these methods seem to have utilized a map‐like grid of lines, similar to that of Cartesian coordinates. The third utilized balls of three different colors for use on three horizontal positions only. Joseph Needham has commented that this system of calculation “shows an interesting appreciation of coordinate relationships.”

Another interesting aspect of Shu Shu Ji Yi is its reference to large numbers and to their representation in three forms of arithmetical series. Xu Yue called them the “upper, middle, and lower” classes of numbers, all beginning with wan (10 4). The three classes of large numbers may be summarized in Table 1.

Table 1 The three classes of large numbers following Xu Yue

The Shu Shu Ji Yi also gives a description of the “calculations of the nine balls”, which according to the commentary provided by Zhen Luan was a simple magic square of order 3.

Though brief, obscure, and couched in religious nuances, Xu Yue's Shu Shu Ji Yi was selected as a prescribed mathematical text for imperial examinations during the Tang dynasty (AD 618–906). It was a difficult text, and candidates had to learn it by heart in order to pass the examinations.

See also: Liu Hong, Jiuzhang Suanshu , Magic Squares