The 64 hexagrams of the I Ching are simply every combination of six yin/yang lines: three lines make a trigram, two trigrams make a hexagram. This page gives three interlocking views — an 8x8 matrix of upper against lower trigram, the eight-palace tree that shows how one palace is grown by flipping lines one at a time, and a comparison of the two numbering systems. Each hexagram has its own page, and every number on it is recomputed by the same engine: na jia stem-branches, six relations, shi/ying lines and the cuo, zong and hu relations — none of it copied.
The Book of Changes has two layers: text (the judgement, the line statements, the commentaries) and notation (polarity, na jia stem-branches, the palace, the six relations, cuo/zong/hu). What this site publishes is the notation layer — every value computed and re-derivable, which is why the 64 pages are genuinely different from one another. The classical text is not reproduced here: borrowed text cannot be re-derived, and this site does not speak for it. To read the text itself, use the public-domain edition below, which gives every hexagram's judgement, line statements and commentaries:
The columns are the upper (outer) trigram and the rows the lower (inner) one; where they meet is the King Wen number. Click any cell to open that hexagram.
Pick an upper and a lower trigram to go straight to the hexagram they form — the most direct use of the fact that the 64 hexagrams are just the complete combinations of the eight trigrams.
Pick both trigrams.
The eight palaces are the first way the 64 hexagrams get organised: each palace grows from one pure hexagram by flipping lines one after another, which splits all 64 into eight groups of eight. Because the grouping is computed, statements like "which palace, which generation, which line the shi sits on" can each be checked.
The King Wen sequence (1..64) and the binary (Fu Xi) sequence are two different numberings, and neither is wrong. The binary sequence treats the six lines as a six-bit number, so Kun (all yin) is 1 and Qian (all yang) is 64 — while King Wen puts Qian first and Kun second. So the two numberings are mirror images at head and tail, which you can verify right here.
| King Wen no. 1 and no. 64 | ䷀ 乾 Qian · ䷿ 未济 Wei Ji |
|---|---|
| Binary no. 1 and no. 64 | ䷁ 坤 Kun · ䷀ 乾 Qian |
| Line polarity total | 192 yang and 192 yin lines out of 384 (64 x 6) |
| Na jia branch distribution | 子 32 · 丑 32 · 寅 32 · 卯 32 · 辰 32 · 巳 32 · 午 32 · 未 32 · 申 32 · 酉 32 · 戌 32 · 亥 32 — every branch appears exactly 32 times, since 384 divides by 12 |
| Six-relation distribution | Parent 82 · Sibling 92 · Offspring 58 · Wealth 74 · Officer 78 |
| Pure hexagrams (upper = lower) | ䷀ 乾 Qian · ䷁ 坤 Kun · ䷜ 坎 Kan · ䷝ 离 Li · ䷲ 震 Zhen · ䷳ 艮 Gen · ䷸ 巽 Xun · ䷹ 兑 Dui |
| Self-reversing hexagrams | ䷀ 乾 Qian · ䷚ 颐 Yi · ䷜ 坎 Kan · ䷼ 中孚 Zhong Fu |
Every enumerable component of ba zi has its own page here. Each page is computed by the same engine and can be checked item by item — none of it is a personality table.