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.

Squaring the base-height difference (勾股較) yields 49 square feet. Subtracting the two values likely referring to the difference between the square of the hypotenuse and the square of the difference between the other two sides leaves a remainder of 51 feet. Adding the square of the diagonal (斜) referring to the hypotenuse, which is 100, results in 151 as the dividend (實). Use the square root extraction method (開平方法) to solve it, which yields the sum of the base and height (勾股相和) of 1 zhang, 2 feet, and 2 fen Approximately 12.02 feet. In this system, 1 zhang = 10 feet, 1 foot = 10 inches (cun), and 1 inch = 10 fen. Adding the difference of 7 feet results in a total of 1 zhang, 9 feet, 2 inches, and 2 fen. Halve this to find the height: 9 feet, 6 inches, and 1 fen. Subtract the difference of 7 feet from this result to find the width the base, which is 2 feet, 6 inches, and 1 fen. This matches the question. These two items concern the difference between the base and height.
To find the base from the height and the hypotenuse-base difference:
Square the height, and subtract the square of the difference.
Halve the remainder to set the dividend (實) for the base;
Let the difference be the divisor (法) to keep the calculation fair.
Divide the dividend to find the base's measure;
Finding the height from the base and hypotenuse difference follows this same procedure.
Suppose there is a bamboo 1 zhang 10 feet tall. It is broken by the wind and its top touches the ground, with the tip resting 3 feet away from the root. The question asks: at what height is the break (折處)?
Answer: The height is 4 feet, 5 inches, and 5 fen. This is a classic right-triangle problem where the height of the break is the 'height' (Gu), the distance from the root is the 'base' (Gou), and the broken portion leaning over is the 'hypotenuse' (Xian). The total length of the bamboo is the sum of the height and the hypotenuse.