The King Wen sequence, explained

The numbers 1 to 64 that every I Ching edition, and every page on this site, gives the hexagrams follow one received order, the King Wen sequence. Read it two at a time and a single rule appears: each odd-numbered hexagram and the one after it are a pair, and in 28 of the 32 pairs the second figure is simply the first turned upside down. All 32 pairs are drawn below.

Turned upside down: read the first figure from the top down Every line flipped: solid becomes broken, broken becomes solid

  1. Pair 1 Every line flipped

  2. Pair 2 Turned upside down

  3. Pair 3 Turned upside down

  4. Pair 4 Turned upside down

  5. Pair 5 Turned upside down

  6. Pair 6 Turned upside down

    Here turning it over also flips every line.

  7. Pair 7 Turned upside down

  8. Pair 8 Turned upside down

  9. Pair 9 Turned upside down

    Here turning it over also flips every line.

  10. Pair 10 Turned upside down

  11. Pair 11 Turned upside down

  12. Pair 12 Turned upside down

  13. Pair 13 Turned upside down

  14. Pair 14 Every line flipped

  15. Pair 15 Every line flipped

  16. Pair 16 Turned upside down

  17. Pair 17 Turned upside down

  18. Pair 18 Turned upside down

  19. Pair 19 Turned upside down

  20. Pair 20 Turned upside down

  21. Pair 21 Turned upside down

  22. Pair 22 Turned upside down

  23. Pair 23 Turned upside down

  24. Pair 24 Turned upside down

  25. Pair 25 Turned upside down

  26. Pair 26 Turned upside down

  27. Pair 27 Turned upside down

    Here turning it over also flips every line.

  28. Pair 28 Turned upside down

  29. Pair 29 Turned upside down

  30. Pair 30 Turned upside down

  31. Pair 31 Every line flipped

  32. Pair 32 Turned upside down

    Here turning it over also flips every line.

The one rule

Number a hexagram’s lines 1 to 6 from the bottom, as each hexagram page does. Turning the figure upside down puts line 6 at the bottom and line 1 at the top. Take hexagram 3, Zhūn: from the bottom it reads solid, broken, broken, broken, solid, broken. Read from the top down instead and you get broken, solid, broken, broken, broken, solid, which is hexagram 4, Méng. Every odd-numbered hexagram works this way, except where turning it over changes nothing.

Eight of the 64 figures look the same upside down: 1, 2, 27, 28, 29, 30, 61 and 62. For those the sequence uses the other obvious partner, the figure with every line flipped. Hexagram 1 is six solid lines and hexagram 2 is six broken ones; 27, Yí (Nourishment) is solid at top and bottom with four broken lines between, and 28, Dà Guò (Great Exceeding) is the exact reverse. The eight symmetric figures fall as four whole pairs, so the rule never has to split one.

In four other pairs, 11/12, 17/18, 53/54 and 63/64, the two operations happen to agree: turning the figure over gives the same result as flipping every line. 63, Jì Jì alternates solid and broken from the bottom up; upside down, it alternates broken and solid, which is also every line swapped, and that is 64, Wèi Jì. Those four are labelled ‘turned upside down’ above, because that is the rule that applies to every figure that is not symmetric; the card notes the coincidence.

What the figures show, counted

28 pairs are one figure turned upside down; 4 (1/2, 27/28, 29/30, 61/62) are one figure with every line flipped. In 4 of the upside-down pairs (11/12, 17/18, 53/54, 63/64) the two operations happen to give the same figure.

How many of the six lines differ, counted from the figures above
Between123456All
The two halves of a pair0120120832
One pair and the next281370131

The first row is forced by the rule. Turning a figure over swaps line 1 with 6, 2 with 5 and 3 with 4, so lines always differ two at a time, and the two halves of a pair differ in 2, 4 or 6 lines, never an odd number. The second row is not forced by anything: the rule says which hexagram follows an odd-numbered one, but nothing in the lines says which pair should come next. That ordering of the 32 pairs is the part people have tried to explain for more than two thousand years, and no explanation is generally accepted.

Every label and number on this page is computed from the six lines of each hexagram, read from the trigrams its own page shows, by a script in this site’s repository; none is typed by hand.

Who arranged the order?

Nobody knows. The name is a tradition, not a record. Wikipedia’s summary of the scholarship puts it plainly: the sequence’s “true age and authorship are unknown”, while “traditionally, it is said that King Wen of Zhou arranged the hexagrams in this sequence while imprisoned by Di Xin in the 12th century BC” [1]. The same tradition credits him with much of the text itself; the I Ching’s core text was “traditionally ascribed to the Zhou cultural heroes King Wen of Zhou and the Duke of Zhou” [2].

James Legge, whose 1882 translation this site quotes, kept the story but marked it as his own picture rather than history: “I like to think of the lord of Kâu, when incarcerated in Yû-lî, with the 64 figures arranged before him” [3].

What the manuscripts show:

The ancient explanation: the ‘Sequence of the Hexagrams’

One of the Ten Wings, the commentaries bound to the text, exists only to justify this order. The Xugua (序卦傳), which Legge prints as his sixth appendix, walks through all 64 and gives each step a reason. It opens:

有天地,然後萬物生焉。盈天地之間者,唯萬物,故受之以屯。

‘There are heaven and earth [hexagrams 1 and 2], and after that the myriad things are born. What fills the space between heaven and earth is nothing but the myriad things; so it is followed by Zhūn [3].’

Xugua, opening lines [5]; English rendering this site’s

and it ends at 64 with 物不可窮也,故受之以未濟;終焉: ‘things cannot come to an end, so it is followed by Wèi Jì (Before Completion), and there it ends.’ Its links are links of meaning, built on the hexagrams’ names, not of line patterns; it never mentions the upside-down rule at all.

Where the traditions differ is over who wrote it and how much it explains. The Ten Wings “were traditionally attributed to Confucius, possibly based on a misreading of the Records of the Grand Historian” [2]. Legge, who translated it, wrote that “there is nothing in the treatise to suggest anything about its authorship”, and judged that its essays “resemble ‘a heap of orient pearls at random strung’” [6].

A second, entirely different order is often printed alongside this one: the ‘binary’ or Fu Xi sequence, which “originated in the Song dynasty” and is believed to be the work of the scholar Shao Yong (1011–1077). Both names follow a habit the same article describes: “it was customary to attribute authorship to these legendary figures”, and “the King Wen sequence is, however, of much greater antiquity than the Fu Xi sequence” [1]. The figures in that Fu Xi order, read as the binary numbers 0 to 63, are drawn on the binary sequence, with the diagram Joachim Bouvet sent to Gottfried Leibniz. The King Wen numbers are the ones every hexagram on this site uses, and the order Legge’s translation follows.

Cast a hexagram and look up its partner in the pairs above.

Sources

[1] ‘King Wen sequence’, English Wikipedia, revision of 26 February 2026, read 2 October 2026.

[2] ‘I Ching’, English Wikipedia, revision of 23 September 2026, read 2 October 2026; the sentences quoted there cite Shaughnessy (2014), Rutt (1996), Shaughnessy (1999) and Peterson (1982).

[3] James Legge, The Sacred Books of the East, vol. XVI, The Yî King (Oxford, 1882), Introduction, chapter II: Wikisource transcription.

[4] ‘Mawangdui Silk Texts’, English Wikipedia, read 2 October 2026.

[5] Xugua zhuan (序卦傳), full text: Chinese Wikisource, read 2 October 2026.

[6] Legge (1882), Introduction, chapter III, §9, ‘The sixth Appendix’: Wikisource transcription.

Related on this site: the eight trigrams each hexagram is built from, and how to read changing lines.