The Eight Palaces
Last updated 5/21/2026
Here’s a small puzzle to start with.
Take these eight hexagrams:
| # | Name | Working name | Palace position |
|---|---|---|---|
| 1 | The Creative | Qian over Heaven | Palace head |
| 44 | Coming to Meet | Heaven over Wind | First generation |
| 33 | Retreat | Heaven over Mountain | Second generation |
| 12 | Standstill | Heaven over Earth | Third generation |
| 20 | Contemplation | Wind over Earth | Fourth generation |
| 23 | Splitting Apart | Mountain over Earth | Fifth generation |
| 35 | Progress | Fire over Earth | Soul-Wandering |
| 14 | Great Possession | Fire over Heaven | Soul-Returning |
They look unrelated. They sit at very different places in the familiar King Wen sequence. Visually, one is six yang lines, another is one yin under five yangs, another flips four lines, and the last is back to five yangs and one yin. There’s no obvious family resemblance.
And yet every classical Wen Wang Gua text we follow groups these eight as a single unit: the Qian palace. Pick up Case 1, the father’s-illness reading from Act I, and look at the cast header. In learner terms, it says: Qian palace: Qian over Heaven.
Why? What makes those eight hexagrams a family? And what does the grouping do for us that the King Wen 1–64 sequence doesn’t?
That’s this module.
Jing Fang’s organizing move
The eight palaces aren’t decorative. They’re Jing Fang’s central innovation — the move that turned the Book of Changes from a divinatory text into a calculable divinatory system.
Jing Fang (77–37 BCE), Western Han dynasty, was the first to systematically describe the stem-branch assignment method, usually called najia in source texts. It puts stems and branches on every line of every hexagram. To do that systematically, he needed a regrouping of the 64 — one that exposed structural relationships the King Wen sequence buries.
“The arrangement of the 64 hexagrams into eight ‘palaces’ is attributed to Jing Fang and is foundational to Liu Yao.” Source: the lineage source synthesis §A.
The grouping does three jobs at once. First, it gives every hexagram a home — a single trigram-double it belongs to. Second, it imports an element into the hexagram (next module — 2.2). Third, it imposes a cascade structure that turns out to be the skeleton for stem-branch assignment (2.3), relative types (2.4), and World/Response (2.5). Half of Act II depends on getting palaces right.
The King Wen sequence is the order you read the Book of Changes in — and it’s still how we identify hexagrams. But you can’t navigate WWG with it. We use both: King Wen numbers for identification (“hexagram 12 is Heaven over Earth”), palace structure for everything else.
The eight anchors
Each palace is anchored by one of the eight trigram-doubles — a hexagram with the same trigram on top and bottom. There are exactly eight of these, one per trigram, and they give the palaces their names:
| # | Anchor | Common English |
|---|---|---|
| 1 | Qian over Heaven | The Creative |
| 2 | Dui over Lake | The Joyous |
| 3 | Li over Fire | The Clinging |
| 4 | Zhen over Thunder | The Arousing |
| 5 | Xun over Wind | The Gentle |
| 6 | Kan over Water | The Abysmal |
| 7 | Gen over Mountain | Keeping Still |
| 8 | Kun over Earth | The Receptive |
The classical name for these eight is the eight pure hexagrams. Each one is its palace’s first hexagram, and the palace inherits the trigram’s name. So Qian palace is anchored by Qian over Heaven; Kan palace by Kan over Water; and so on.
(These eight, incidentally, are the six-clash hexagrams, but that’s a story for V.10. Park it.)
Eight positions per palace
Each palace contains exactly eight hexagrams, in a specific order. The working labels are simple:
- Palace head — the palace’s own hexagram. The pure trigram-double. Position 0, you could say.
- First generation
- Second generation
- Third generation
- Fourth generation
- Fifth generation
- Soul-Wandering
- Soul-Returning
Two things to notice. First, the first-through-fifth-generation family forms a clean cascade — one more line changed each step. Second, the Soul-Wandering and Soul-Returning names are evocative for a reason: the cascade walks all the way out from the palace’s home trigram, and the last two positions stage a partial return. We’ll see it.
Zengshan Buyi names the seventh and eighth positions explicitly:
Source note: in the Soul-Wandering / Soul-Returning chapter, Yehe identifies Soul-Wandering as the seventh hexagram of each palace and Soul-Returning as the eighth. His Qian palace examples are Fire over Earth for Soul-Wandering and Fire over Heaven for Soul-Returning.
That’s our anchor. Soul-Wandering is position 7 — and the example given is Fire over Earth in the Qian palace. Soul-Returning is position 8 — and the example is Fire over Heaven in the Qian palace. Those are exactly the two hexagrams that, in our opening puzzle, looked like they couldn’t possibly belong with Qian over Heaven. Now we’re going to generate them, line by line, and the family resemblance will become obvious.
Building the Qian palace, line by line
Here’s the cascade. We start with Qian over Heaven — all six lines yang — and at each step we change exactly the lines specified by the position. Watch carefully, because the rule is simple and we’ll be using it for the other seven palaces too.
For first through fifth generation, the rule is: flip the bottom N lines, where N is the position number. So first generation flips just line 1, second generation flips lines 1–2, and so on up to fifth generation, which flips lines 1–5. After that, the soul positions do something special, and we’ll get to those.
Position 1: Palace head — Qian over Heaven
The anchor. Nothing has changed yet. Six yang lines, top to bottom:
- 6
- 5
- 4
- 3
- 2
- 1
This is the palace’s home and the reference point for everything that follows.
Position 2: First generation — flip line 1 → Heaven over Wind
The bottom line flips from yang to yin. The upper trigram Qian (☰) stays. The lower trigram becomes Xun (☴, wind). The result is Heaven over Wind:
- 6
- 5
- 4
- 3
- 2
- 1
- 6
- 5
- 4
- 3
- 2
This is the first generation. The palace’s home trigram still sits on top, but the bottom has shifted by one line.
Position 3: Second generation — flip lines 1–2 → Heaven over Mountain
The bottom two lines are now yin. The upper trigram is still Qian. The lower trigram becomes Gen (☶, mountain). The result is Heaven over Mountain:
- 6
- 5
- 4
- 3
- 2
- 6
- 5
- 4
- 3
Two yin lines below, four yang above. Each step preserves all the previous flips and adds one new one.
Position 4: Third generation — flip lines 1–3 → Heaven over Earth
Now the bottom three lines are all yin. That’s the trigram Kun (☷, earth). The hexagram is Heaven over Earth:
- 6
- 5
- 4
- 3
- 6
- 5
- 4
Notice what just happened: the lower trigram is now the opposite trigram from Qian. The cascade has fully overturned the bottom half. From here, the changes cross into the upper trigram.
Position 5: Fourth generation — flip lines 1–4 → Wind over Earth
Now line 4 flips. The upper trigram is no longer pure Qian — it’s Xun (☴, wind). The result is Wind over Earth:
- 6
- 5
- 4
- 6
- 5
The cascade has reached the upper trigram. From the bottom-up view, we’ve now overturned more than half the hexagram.
Position 6: Fifth generation — flip lines 1–5 → Mountain over Earth
Line 5 flips too. The upper trigram becomes Gen (☶, mountain). The result is Mountain over Earth:
- 6
- 5
- 6
Just one line of the original Qian remains at the very top.
This is as far as the simple “flip the bottom N lines” rule goes. If we naively continued, we’d flip line 6 next and end up at Kun over Earth — pure earth, the opposite palace. The classical system doesn’t do that. It does something more interesting.
Position 7: Soul-Wandering — line 4 returns → Fire over Earth
The seventh position is the Soul-Wandering hexagram. The line-change rule: starting from fifth generation, flip line 4 back (yin back to yang). Line 6 stays yang. The upper trigram becomes Li (☲, fire). The result is Fire over Earth:
- 6
- 6
- 4
The fourth line has, as it were, wandered back home. Bushi Zhengzong puts the rule into a single mnemonic:
Source note: Bushi Zhengzong gives the same rule in mnemonic form: Soul-Wandering turns on line 4; Soul-Returning turns on the bottom three lines.
“The fourth line stands up” is the Soul-Wandering rule. The lines below are still in fifth-generation configuration; only line 4 has flipped back.
Position 8: Soul-Returning — bottom three return → Fire over Heaven
The eighth and last position is the Soul-Returning hexagram. From Soul-Wandering, flip the bottom three lines back to their original yang state. The upper trigram is still Li. The lower trigram returns to Qian — the palace’s home. The result is Fire over Heaven:
- 6
- 4
- 6
- 4
- 3
- 2
- 1
That’s Bushi Zhengzong’s “attend to the three lines” — the bottom trigram has gone back to the palace’s anchor trigram.
So the cascade walks out to position 6, then partially walks back: line 4 returns at Soul-Wandering, and the entire lower trigram returns at Soul-Returning. The eighth position is, in a sense, a hexagram whose lower half has come back to where it started.
The eight, side by side
Lining up the Qian palace from start to finish:
| Position | Working name | Hexagram | King Wen # | Line config (bottom→top) |
|---|---|---|---|---|
| 1 | Palace head | Qian over Heaven | 1 | yang yang yang yang yang yang |
| 2 | First generation | Heaven over Wind | 44 | yin yang yang yang yang yang |
| 3 | Second generation | Heaven over Mountain | 33 | yin yin yang yang yang yang |
| 4 | Third generation | Heaven over Earth | 12 | yin yin yin yang yang yang |
| 5 | Fourth generation | Wind over Earth | 20 | yin yin yin yin yang yang |
| 6 | Fifth generation | Mountain over Earth | 23 | yin yin yin yin yin yang |
| 7 | Soul-Wandering | Fire over Earth | 35 | yin yin yin yang yin yang |
| 8 | Soul-Returning | Fire over Heaven | 14 | yang yang yang yang yin yang |
(The boldface marks the lines that return relative to the previous position — line 4 at Soul-Wandering, lines 1–3 at Soul-Returning.)
Source for the sequence and line configurations: Zengshan Buyi, Eight Palaces chapter, Qian palace sequence.
That’s the answer to the opening puzzle. Those eight hexagrams aren’t an arbitrary collection — they’re one continuous transformation walk through line-space, anchored on Qian.
The other seven palaces work the same way
The cascade rule is universal. For any palace anchored by trigram-double X:
- Palace head: the trigram-double X itself.
- First through fifth generation: progressively flip the bottom 1, 2, 3, 4, 5 lines.
- Soul-Wandering: from fifth generation, line 4 returns.
- Soul-Returning: from Soul-Wandering, the bottom three lines return, so the lower trigram is X again.
Apply this to Kan (Water), and you get the Kan palace:
| Position | Hexagram |
|---|---|
| Palace head | Kan over Water |
| First generation | Water over Lake |
| Second generation | Water over Thunder |
| Third generation | Water over Fire |
| Fourth generation | Lake over Fire |
| Fifth generation | Thunder over Fire |
| Soul-Wandering | Earth over Fire |
| Soul-Returning | Earth over Water |
Apply it to Kun (Earth), and you get:
| Position | Hexagram |
|---|---|
| Palace head | Kun over Earth |
| First generation | Earth over Thunder |
| Second generation | Earth over Lake |
| Third generation | Earth over Heaven |
| Fourth generation | Thunder over Heaven |
| Fifth generation | Lake over Heaven |
| Soul-Wandering | Water over Heaven |
| Soul-Returning | Water over Earth |
The 8×8 = 64 — every hexagram lives in exactly one palace, and the assignment is determined entirely by the line pattern. There’s no ambiguity. Given a hexagram, you can identify its palace either by working the cascade backward (which trigram-double does this walk lead back to?) or — much faster, in practice — by recognizing the pattern, which one does with experience. We’ll put a complete eight-palace cheat sheet in Appendix B so you have a quick lookup while you’re learning.
Source for all eight palace sequences: Zengshan Buyi, Eight Palaces chapter.
Why this matters — a quick map of what’s coming
The palace number isn’t a curiosity. It’s load-bearing structure. In the rest of Act II:
- 2.2 — Palace Element. Each palace inherits an element from its anchor trigram: Qian is Metal, Kan is Water, and so on. This is the single reference point that everything else in the hexagram gets measured against.
- 2.3 — Najia. The stem-branch assignment for the six lines depends on which trigrams are upper and lower — and the najia tables we’ll meet there are organized by trigram, which is to say, by what role each line plays in the palace structure.
- 2.4 — The Relative Types. The Parent, Officer, Brother, Wealth, and Child labels we saw on Case 1 are derived — each line’s branch element gets typed against the palace’s element via the Five Phase relationships. Wrong palace → wrong palace element → wrong relative types → wrong everything.
- 2.5 — World and Response. Where the World and Response marks sit depends on the palace position. Palace head puts the World line at line 6; first generation puts it at line 1; second generation at line 2; and so on, with Soul-Wandering and Soul-Returning having their own positions. Case 1’s Qian over Heaven is the palace head of Qian — and sure enough the World line is at line 6.
And one downstream pointer that’s worth naming here without unpacking yet:
-
IV.6 — Hidden Lines. When the line your question needs isn’t visible in the cast, the classical retrieval rule says: look in the palace’s home hexagram for it. Zengshan Buyi calls the home hexagram the palace head source:
Source note: Yehe’s hidden-line rule says that when the needed line is absent, you search for it in the first hexagram of the same palace.
We mention it here just so you know the palace head has a second life as the retrieval source for hidden lines. The actual mechanic — which line, on which line, with what strength — is Module IV.6. Don’t worry about it yet.
The summary is: palace identification is the upstream commitment that makes the rest of Act II legible. Get it right and the next four modules unfold smoothly. Get it wrong and the whole stack of derivations breaks.
A trap to watch for
The most common confusion at this point is mistaking the King Wen sequence for the palace sequence. They’re two completely different organizational schemes.
The King Wen sequence (1–64) is the order of hexagrams in the philosophical Book of Changes. It pairs hexagrams (1 & 2, 3 & 4, and so on) by inversion or flipping, and its logic is editorial and narrative — how the Yi Jing reads as a text. We use it for identifying hexagrams (“hexagram 12 is Heaven over Earth”) and that’s about it.
The palace sequence is Jing Fang’s structural regrouping. Its logic is the cascade of line transformations starting from each pure trigram-double. We use it for everything mechanical.
The two cross-cut each other. Look at the Qian palace’s King Wen numbers: 1, 44, 33, 12, 20, 23, 35, 14. Random-looking. The Kan palace? 29, 60, 3, 63, 49, 55, 36, 7. Also random-looking. The palace sequence and the King Wen sequence are orthogonal organizational schemes, and trying to navigate one with the other is the fastest way to get every downstream derivation wrong.
A related smaller trap: don’t confuse palace number (1 through 8 — which palace) with palace position (palace head through Soul-Returning — where in the palace). They’re two coordinates, and every hexagram is identified by both. Qian over Heaven is Qian palace, palace-head position. Fire over Earth is Qian palace, Soul-Wandering position. Water over Heaven is Kun palace, Soul-Wandering position. Same position, different palace. Same palace, different position.
Back to Case 1
Let’s apply what we have to Case 1 one more time. The cast header reads:
Qian palace: Qian over Heaven (six-clash)
Two pieces of information, both now legible:
- Qian palace — the hexagram belongs to Qian palace, anchored by Qian over Heaven. That tells us we’ll be measuring everything against Qian’s element (next module: Metal).
- Qian over Heaven at palace-head position — the first position. The World line will be at line 6 (we’ll meet this rule in 2.5).
And the changed hexagram on the right of the cast — Xun palace: Wind over Heaven — tells us the transformed state belongs to a different palace entirely (Xun palace, first-generation position), with its own element. We’ll come back to what that means when we get to moving lines and transformation in 2.6. For now: notice the diagram is doing two palace identifications, one for each side.
Where this lands us
The palace is identified. We know the cascade structure and where every hexagram sits inside it. We’ve named — without unpacking — that the palace has an element, that it dictates the relative labels, that it positions World and Response, and that it serves as the retrieval source for hidden lines later.
The next thing to settle is the very first of those: what is the palace’s element, exactly, and where does it come from? That’s a quick module and it sets up the labeling work in 2.4.
→ 2.2 Palace Element.