Tian yuan shu (simplified Chinese: 天元术; traditional Chinese: 天元術; pinyin: tiān yuán shù) is a Chinese system of algebra for polynomial equations created in the 13th century. It is first known from the writing of Li Zhi (Li Ye), though it was created earlier.
The mathematical culture in which it was created was lost due to war and general suspiciousness during the Ming dynasty of knowledge from the (Mongolian) Yuan dynasty. The writings of Li Zhi (Ceyuan haijing), Zhu Shijie (Jade Mirror of the Four Unknowns) and others could no longer be fully understood, until the arrival of western mathematics in China.
Meanwhile, tian yuan shu arrived in Japan, where it is called tengen-jutsu. Zhu's text Suanxue qimeng was deciphered and was important in the development of Japanese mathematics (wasan) in the 17th and 18th centuries.
Tian yuan shu means "method of the heavenly element" or "technique of the celestial unknown". The "heavenly element" is the unknown variable, usually written x in modern notation.
It is a positional system of rod numerals to represent polynomial equations. For example, 2x2 + 18x − 316 = 0 is represented as