Ceyuan haijing (simplified Chinese: 测圆海镜; traditional Chinese: 測圓海鏡; pinyin: cè yuán hǎi jìng; literally: "sea mirror of circle measurements") is a treatise on solving geometry problems with the algebra of Tian yuan shu written by the mathematician Li Zhi in 1248 in the time of the Mongol Empire. It is a collection of 692 formula and 170 problems, all derived from the same master diagram of a round town inscribed in a right triangle and a square. They often involve two people who walk on straight lines until they can see each other, meet or reach a tree or pagoda in a certain spot. It is an algebraic geometry book, the purpose of book is to study intricated geometrical relations by algebra.
Majority of the geometry problems are solved by polynomial equations, which are represented using a method called tian yuan shu, "coefficient array method" or literally "method of the celestial unknown". Li Zhi is the earliest extant source of this method, though it was known before him in some form. It is a positional system of rod numerals to represent polynomial equations.
Ceyuan haijing was first introduced to the west by the British Protestant Christian missionary to China, Alexander Wylie in his book Notes on Chinese Literature, 1902. He wrote:
The first page has a diagram of a circle contained in a triangle, which is dissected into 15 figures; the definition and ratios of the several parts are then given, and there are followed by 170 problems, in which the principle of the new science are seen to advantage. There is an exposition and scholia throughout by the author.
This treatise consists of 12 volumes.
The monography begins with a master diagram called the Diagram of Round Town(圆城图式). It shows a circle inscribed in a right angle triangle and four horizontal lines, four vertical lines.
C: Center of circle:
The North, South, East and West direction in Li Zhi's diagram are opposite to our present convention.