<< Dependency Injection Annotations To Come To A JVM Near You. | Home | Mark Volkmann: Clojure---Functional Programming for the JVM (And a Friday Quiz) >>

Zhou Bi Mathematical Manual (周髀算经)

My last excursion into ancient Chinese mathematical books, the post about Sea Island Mathematical Manual 172 days ago, generated some interest from some of my non-traditional readers.

Today, I would like to follow-up with a brief passage from another book: the Zhou Bi Mathematical Manual (周髀算经). It is written in the Zhou Dynasty (1046 BC–256 BC) about geometry and astronomy (Here Bi (髀) is the eight chi vertical pole that astronomers used to examine the shadow cast by the Sun). The opening dialog is between the Duke of Zhou (周公, about 1000 BC) and the astronomer Shang Gao (商高):

1. In the old time the Duke of Zhou asked Shang Gao: "I heard that your greatness is proficient with numbers. May I ask you a question about the ancient Bao Xi (包犧) who established the positions of the heaven and the degrees of the calendar. One cannot climb stairs to reach heaven, and one cannot measure the earth with chi (foot) and cun (inch). May I ask from where comes the numbers."

2. Shang Gao said: "The ways of the number, comes from the circle and the square. The circle comes from the square, and the square comes from the ju (carpenter's square). Ju comes from nine nines eighty-one. Thus fold the ju, form a gou (base) of three, gu (altitude) of four, and jing (hypotenuse) of five. Having squared on the outside, half one of the jus. Turn around and form a plate, there you get the root of three, four, and five. The two jus combined is twenty-five long, called the accumulation of ju. Thus what Yu () used to rule the world, these numbers generated."

Original Chinese. 商高曰:“數之法,出於圓方。圓出於方,方出於矩。矩出於九九八十一。故折矩,以為句廣三,股脩四,徑隅五。既方之外,半其一矩。環而共盤,得成三、四、五。兩矩共長二十有五,是謂積矩。故禹之所以治天下者,此數之所生也。”

If the translation does not seem to make sense to you, it's because the original doesn't make much sense to me either, except that we know Shang Gao is talking about a right triangle with sides 3, 4, and 5; he's taking squares of the sides, and transforming the two smaller ones into the bigger one. He explained it with the use of ju, which is an instrument that is used to form right angles. How he did it was not clear at all.

Fortunately, a diagram and a rigorous proof of the Pythagorean Theorem was added to the book as a commentary by Zhao Shuang (赵爽) in 222 AD. Here is his diagram and a JavaFX applet that I wrote to make the transformations from c2 to a2 + b2 apparent.

Gou Gu Diagram

The source code for the applet can be found here. It is the simplest kind of JavaFX application there is. I threw six triangles and three squares on the screen, and animated their rotation angles, fill colors, and opacity. Take a look at syntax of the animation:

var t = Timeline {
    keyFrames: [ at(0.0s) { col=> Color.WHITE},
        at(1.0s) { a2 => 0.0; a3 => 0.0; a4 => 0.0},
        at(2.0s) { a2 => 90.0; a3 => 90.0; a4 => 90.0},
        at(3.0s) { a3 => 90.0; a4 => 90.0},
        at(4.0s) { a3 => 180.0; a4 => 180.0},
        at(5.0s) { a4 => 180.0},
        at(6.0s) { a4 => 270.0},
        at(7.0s) { col=> Color.WHITE},
        at(9.0s) { col=> Color.LIGHTGREEN},
        at(10.0s) { b=> 0.0},
        at(11.0s) { b=> 90.0},
        at(12.0s) { c=> 0.0},
        at(13.0s) { c=> -90.0},
        at(14.0s) { o=> 0.0;},
        KeyFrame { time: 14.0s
            action: function() {
                var q = stage.scene.content[0..1];
                delete stage.scene.content[0..1];
                insert q into stage.scene.content;
            }
        },
        at(15.0s) { o=> 0.7 },
        at(17.0s) { o=> 0.7 }]};

t.play();

Now that I've updated my workstation to Ubuntu 9.04 (for people who are puzzled by Ubuntu version numbers, like me six months ago, 9.04 is short for 2009-04; if the trend continues, the next version will be 9.10) which comes with the Sun JDK 1.6.0_13, including 64-bit new plugin and web start, I can play with JavaFX applets more easily. This post marks the official return of the applet (at least for me). The applet runs fine on in my browser. However, if you encounter any problem with the applet, please let me know so that I can try to fix the problems.



Re: Zhou Bi Mathematical Manual (周髀算经)

Weiqi, How far has the Chinese language evolved in the 1800 years since the time of Zhou Bi? Did you have any problem with the classic test?

Re: Zhou Bi Mathematical Manual (周髀算经)

Well, the language has evolved in three respects:

  • The form of the characters have changed dramatically from 1000 BC to around 100 AD. I wouldn't be able to recognize the character forms in the original writing. I'm reading from a version of the book that has been transcribed into modern character forms. So there is no difficulty there.
  • Written Chinese in antiquity is different from the spoken Chinese of today. We don't know if ancient Chinese talked like we talk today, or if they talked like what they wrote. The latter seems more plausible. As late as 90 years ago, a Chinese scholar would write in Classical Chinese. Nowadays, we learn to comprehend, but not compose in, Classical Chinese. So I have no problem reading the transcribed version of the text.
  • For this particular passage, the objects used in the conversation has also changed. For example, I have no idea what a ju looked like in ancient times, and I have no idea how Shang Gao would "turn around" a ju to form 3, 4, and 5. Also, the part about "the circle comes from the square, ..." is also not easily comprehensible.

Add a comment Send a TrackBack