Sunzi Suanjing (Chinese: 孙子算经; pinyin: Sūnzĭ Suànjīng; Wade–Giles: Sun Tzu Suan Ching; literally: "The Mathematical Classic of Master Sun") was a mathematical treatise written during 3rd to 5th centuries AD which was listed as one of the Ten Computational Canons during the Tang dynasty. The specific identity of its author Sunzi (lit. "Master Sun") is still unknown but he lived much later than eponymous Sun Tzu, author of The Art of War. From the textual evidence in the book, some scholars concluded that the work was completed during the Southern and Northern Dynasties. Besides describing arithmetic methods and investigating Diophantine equations, the treatise touches upon astronomy and attempts to develop a calendar.
The book is divided into three chapters.
Chapter 1 discusses measurement units of length, weight and capacity, and the rules of counting rods. Although counting rods were in use in the Spring and Autumn period and many ancient books on mathematics such as Book on Numbers and Computation and The Nine Chapters on the Mathematical Art, but no detail account of the rules were given. For the first time, The Mathematical Classic of Sun Zi provided a detail description of the rules of counting rods: "one must know the position of the counting rods, the units are vertical, the tens horizontal, the hundreds stand the thousands prostrate". Followed by the detailed layout and rules for manipulation of the counting rods in addition, subtraction, multiplication, and division with ample examples.