The oldest layer of the I Ching does not read like philosophy. It reads like a field manual for people who needed to know whether to march, marry, cross a river or stay home. A dragon lies hidden in the water, and the advice is not to act. A fox gets its tail wet. After each image comes a verdict: auspicious, ominous, no blame.

That terse handbook is called the Zhouyi, the Changes of Zhou. The book the world knows as the I Ching, or Yijing, is the Zhouyi plus several centuries of commentary that taught readers to find a cosmos in it. How one became the other can be traced in some detail, and manuscript finds since the 1970s have made it clearer still.

Cracks and stalks

Divination was state business in early China long before the Zhouyi. Britannica's entry on oracle bones describes the system used by the Shang kings: questions about harvests, weather, sacrifices and war were carved into turtle plastrons and ox shoulder blades, heat was applied, and the resulting cracks were read as answers. Those inscriptions are the earliest known Chinese writing.

The Zhou, who overthrew the Shang in the eleventh century BC, are associated with a second method that worked with numbers. A diviner sorted a bundle of fifty yarrow stalks through a series of counting operations to produce a line, either solid or broken, and repeated the process until six lines stood stacked from the bottom up. Six lines with two possible states give 64 figures, the hexagrams. The Zhouyi gives each a name, a short statement, and a statement for every line.

It would be tidy to say that the stalks grew out of the bones, and the claim is often made. The evidence is thin. One modern proposal held that the word yi in the title originally meant easy, as in an easier method than bone cracking, but that etymology has little support. What can be said is that both techniques put practical questions to an unseen authority and expected a verdict.

When it was written

Tradition gives the book a splendid pedigree. The culture hero Fu Xi observed the patterns of heaven and earth and drew the eight three-line trigrams. King Wen of Zhou and his son the Duke of Zhou wrote the hexagram and line statements in the eleventh century BC. Confucius supplied the commentaries. By the second century AD this four-author account, associated with the scholar Ma Rong, had become the consensus.

Almost none of it survives scrutiny. The Fu Xi story does not appear in the Zhouyi at all. It comes from one of the later commentaries. Modern estimates for the core text range widely, from the tenth to the fourth century BC. The sinologist Edward Shaughnessy, comparing its language with dated bronze inscriptions, placed its compilation in the late ninth century BC, in the early reign of King Xuan of Zhou, roughly two centuries after King Wen. No author is known. The statements are cryptic prognostications, mixed with fragments of poetry and references to historical events.

It was certainly in use at court not long afterward. Early Chinese histories describe more than twenty divinations performed for ruling families between 671 and 487 BC.

Ten Wings

What turned an oracle into a classic was a set of seven commentaries, divided into ten sections and known as the Ten Wings. The Stanford Encyclopedia of Philosophy dates them from the fifth to the second century BC and describes their method: they drew philosophical insight out of the hexagram figures and the old statements.

The most important is the Xici, or Great Commentary, usually placed around 300 BC. It treats the hexagrams as a model of the universe itself, a system in which change is orderly and a careful reader can align conduct with the movement of heaven and earth. Lines that had been simple omens became lessons in timing, restraint and moral character.

The attribution of the Wings to Confucius is traditional and almost certainly wrong. It may rest on a misreading of the historian Sima Qian, and the real origins of the commentaries are unknown. The attribution mattered all the same. Around 136 BC, under Emperor Wu of Han, the Zhouyi and its Wings were established together as first among the Five Classics, the curriculum of the imperial state. More than a thousand years later the philosopher Zhu Xi, who lived from 1130 to 1200, was still arguing that the original text had been a work of divination.

What came out of the ground

For most of its history the I Ching was known only through copies descended from the Han edition. That changed in December 1973, when archaeologists opened a Han tomb at Mawangdui, in Changsha, and found a silk manuscript copied around 175 BC. Shaughnessy, writing in the journal Early China, notes that it went unpublished for two decades.

The Mawangdui text is recognizably the same book, but its hexagrams run in a different order, grouped into eight sets by their upper trigram. It also came with commentaries, the Xici among them and several that had been lost entirely. One of them shows Confucius valuing the book as a source of wisdom first and as an imperfect divination text second, so the philosophical reading was attached to his name early.

The second witness is older. In 1994 the Shanghai Museum purchased a group of bamboo strips that included 58 from a Zhouyi, about a third of the text. Orthography and radiocarbon testing put the copying at around 300 BC in the southern state of Chu. Shaughnessy's assessment is that despite many variant characters the text was stable by this date. The strips also carry pairs of red and black symbols that no one has convincingly explained.

Leibniz counts to sixty-three

Europe met the hexagrams through the Jesuits. Gottfried Wilhelm Leibniz had worked out binary arithmetic by 1679, when he drafted a description of a calculating machine using it. In February 1701 he explained the system in a letter to Joachim Bouvet, a French Jesuit in Beijing. Bouvet answered on November 4 with a woodcut of the 64 hexagrams in the sequence credited to Fu Xi, an arrangement actually due to the Song dynasty scholar Shao Yong. The letter reached Leibniz on April 1, 1703.

Read a broken line as 0 and a solid line as 1, and the diagram counts from 0 to 63. Leibniz wrote it up in an essay printed by the Paris Academy in 1705. The popular version, that the I Ching inspired binary or that its authors knew it, has the order backward. Leibniz had the arithmetic first, and Shao Yong did not intend his arrangement as mathematics.

The Wilhelm version

The I Ching most Western readers know is Richard Wilhelm's. A German theologian who spent more than two decades in China, he translated it with the scholar Lao Naixuan and published it in 1923 or 1924, depending on which source one follows. Cary Baynes, a student of Carl Jung, put it into English in 1950, and Jung's introduction presented the book through his ideas of archetypes and synchronicity. From 1950 the composer John Cage used it to generate random numbers for his music.

Wilhelm translated the book whole, Wings and all, as the Confucian tradition had handed it down. The sheet Bouvet mailed from Beijing still sits in the Leibniz archive in Hanover, with small Arabic numerals in Leibniz's hand beside the hexagrams.