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.

The method says: Set the base 勾 (Gou): the shorter leg of a right triangle at 27 27 steps. Multiply it by itself to obtain 729 729 steps. Separately, take the amount by which the hypotenuse exceeds the height—which is 9 9 steps—as the height-difference 股較 (Gu Jiao). Square this to obtain 81 81. Subtract these two values 81 from 729 to get a remainder of 648 648 steps, which serves as the dividend 實 (Shi). Double the difference of nine steps to get 18 18, which serves as the divisor 法 (Fa). Divide the dividend by this to find a height 股 (Gu): the longer leg of a right triangle of 36 36 steps. Add the difference of 9 9 steps to this to find a hypotenuse 弦 (Xian) length of 45 45 steps. This matches the requirements of the problem.
Another method is called "using the hypotenuse-difference to find the hypotenuse." Set the base 27 and multiply it by itself to obtain 729 729 steps as the dividend. Using the hypotenuse-difference of 9 9 steps as the divisor, divide the dividend to obtain the "sum of the height and hypotenuse," which is 81 81 steps. Add the hypotenuse-difference of 9 9 steps to this to get 90 90 steps. Halve the result to find the hypotenuse length of 45 45 steps. Subtract the difference of 9 9 steps from this to find a height of 36 36 steps. This also works.
Suppose there are two stalks of reeds growing in the center of a pond. Their roots and tips are aligned, and they emerge 3 feet above the water’s surface. If one stalk is pulled diagonally toward the bank—a distance of 9 feet—its tip reaches the bank and becomes exactly level with the water's surface. How deep is the water? This is a classic problem from the "Nine Chapters on the Mathematical Art," using the hypotenuse and height relationship to calculate depth.
The answer says: The water depth is 1 zhang and 2 chi 12 feet; in traditional Chinese measurement, 1 zhang equals 10 chi or "feet".