A native of Haining, Zhejiang, he was fascinated by mathematics since childhood, beginning with the Nine Chapters on Mathematical Art. He eked out a living by being a private tutor for some years before fleeing to Shanghai in 1852 to evade the Taiping Rebellion. There he collaborated with Alexander Wylie, Joseph Edkins, and others to translate many Western mathematical works into Chinese, including Elements of Analytical Geometry and the Differential and Integral Calculus by Elias Loomis, Augustus De Morgan's Elements of Algebra, and the last nine volumes of Euclid's Elements (from Henry Billingsley's edition), the first six volumes of which having been rendered into Chinese by Matteo Ricci and Xu Guangqi in 1607. With Wylie, he also translated Outlines of Astronomy by John Herschel and coined the Chinese names for many of the low-numbered asteroids.[1]
Li coined a great number of mathematical terms that are still used in Chinese today and that were later borrowed into the Japanese language as well. He discovered the Li Shanlan identity (Li Shanlan's summation formulae) in 1867.[2] Later he worked in the think tank of Zeng Guofan. In 1868, he began to teach in Tongwen Guan where he collaborated closely with linguist John Fryer.[3]: 6–79