This library is built in the open.
If you spot an error, have a suggestion, or just want to say hello — we’d love to hear from you.

While the signature says "Volume 12," this content corresponds to the famous "Gougu" chapter of the Nine Chapters on the Mathematical Art, a foundational text of Chinese mathematics.
Suppose the base [勾, gou] is 27 paces, the height [股, gu] is 36 paces, and the hypotenuse [弦, xian] is 45 paces.
The methods for finding the base, height, hypotenuse, inscribed square, and inscribed circle are detailed in the subsequent diagrams.
○ The horizontal side is called the base.
○ The vertical side is called the height.
○ The diagonal side is called the hypotenuse.
○ The base is 27.
○ The height is 36. Subtracting one from the other gives a difference of 9, called the difference [較, jiao].
○ Combining the base and height gives 63, called the sum [和, he].
○ The height (36) subtracted from the hypotenuse (45) leaves a difference of 9; this is called the height-hypotenuse difference.
○ The base (27) subtracted from the hypotenuse (45) leaves a difference of 18; this is called the base-hypotenuse difference.
○ Combining the base and height (63) and then subtracting the hypotenuse (45) leaves a difference of 18; this is called the hypotenuse-sum difference.
This value is significant in ancient Chinese geometry as it equals the diameter of the circle inscribed within the triangle.
○ The hypotenuse (45) minus the difference between the base and height (9) leaves 36; this is called the hypotenuse-difference difference.
○ Adding the height and hypotenuse results in 81; this is called the height-hypotenuse sum.
○ Adding the base and hypotenuse results in 72; this is called the base-hypotenuse sum.
○ The difference between the base and height (9) added to the hypotenuse (45) totals 54; this is called the hypotenuse-difference sum.
○ Combining the base and height (63) and then adding the hypotenuse (45) results in a total of 108; this is called the hypotenuse-sum sum.
This "hypotenuse-sum sum" is the perimeter of the triangle.
Double the square of the hypotenuse which is the hypotenuse multiplied by itself, which equals 4,050.
45 squared is 2,025; doubled, it is 4,050.
Subtract from this the square of the sum of the base and height (63 multiplied by itself), which is 3,969.
The remainder is 81. This is the square dividend [實平方].
The square root of 81 is 9, which is the difference between the height (36) and the base (27). This demonstrates the algebraic identity: 2c² - (a+b)² = (a-b)².