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.

Suppose there is a hypotenuse with a length of 45 paces. It is only stated that the height (股) is 9 paces longer than the base (勾). The question asks: how much are the base and the height respectively?
Answer: The base is 27 paces; the height is 36 paces.
The method says: Set the hypotenuse 45 and multiply it by itself to find the square, which is 2,025 The original text uses the character 令 (ling) as a placeholder for zero. Separately, take the 9-pace difference by which the height exceeds the base as the base-height difference (勾股較) and multiply it by itself to get 81 paces. Subtract these two figures to get a remainder of 1,944 paces. To this, add the square of the hypotenuse 2,025 to get 3,969, which acts as the dividend (實): the number from which the root is extracted. Use the square root extraction method (開平方法) to divide it, which yields the sum of the base and height (勾股相和) of 63 paces. Add the difference of 9 paces to this sum to get 72 paces in total. Halve this result to find the height, which is 36 paces. From this height, subtract the difference of 9 paces to find the base, which is 27 paces. This matches the question.
Suppose there is a door whose height is 6 feet 8 inches greater than its width. The diagonal distance between the two corners is 10 feet. The question asks: what are the height and width?
Answer: The height is 9 feet 6 inches; the width is 2 feet 8 inches.
The method says: Set the diagonal distance between the corners of 10 feet to act as the hypotenuse. Multiply it by itself to get 100 feet. Separately, take the amount by which the height exceeds the width 6 feet 8 inches...