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.

original: "Xié Guī" — literally a "slanted jade tablet," referring here to a right-angled triangle.
The base does not form a full square original: "gōu bù tōng fāng" — a geometric observation that a right triangle is half of a rectangle. Width: 16 steps Length: 30 steps Right-angled triangleAnswer: 240 square steps; for tax purposes, this is calculated as 1 mu mu: a standard Chinese unit of land area, which at this time equaled 240 square steps.
Method: Set down the length of 30 steps and multiply it by the width of 16 steps to get 480 steps. Halve this result to obtain the area of 240 square steps. This matches the query.
Trapezoid (tīxíng): literally "ladder shape," used for fields where the top and bottom widths differ.
Upper width: 20 steps Middle length: 45 steps Lower width: 30 stepsSuppose there is a trapezoidal field with an upper width of 20 steps, a lower width of 30 steps, and a middle length the height of 45 steps. Ask: what is the area?
Answer: 1,125 square steps.
Method: Set down the upper and lower widths and add them together to get 50 steps. Halve this to get 25 steps. Multiply this by the middle length of 45 steps to find the area. This matches the query.
Alternative Method: Add the two widths, multiply the sum by the length, and then halve the resulting product; this also yields the correct area.
Suppose there is a slanted field with a southern width of 30 steps, a northern width of 42 steps, and a vertical length of 60 steps. What is its area?