Culture & Knowledge
Qi Men Dun Jia Basics: Nine Palaces, Eight Gates, Nine Stars
Author: PTalk Editorial TeamPublished Updated
Key answer
Qi Men Dun Jia is a traditional Chinese system of divination and cosmology. It is one of the Three Styles, alongside Da Liu Ren and Tai Yi Shen Shu, and it builds on the Luoshu, the nine palaces, and the Five Phases. Beginners meet five groups of parts: stems and branches, nine palaces, eight gates, nine stars, and eight deities. Study the Five Phases first, then stems and branches, then the nine palaces, and only then how everything is placed on the chart. This article treats it as cultural knowledge, with no predictions.
What Qi Men Dun Jia is: its place in history and the Three Styles
Open almost any introduction to Qi Men Dun Jia and you meet a wall of terms at once: heavenly stems, earthly branches, nine palaces, eight gates, nine stars, eight deities, the three wonders and six ceremonies. Each term leans on the others, so you can read for an hour and still not know where to start. That is not a failure on your part. The system really is built from many parts stacked together. It is easier to learn what it is and what the parts are first, then take them one at a time.
According to Wikipedia, Qi Men Dun Jia is an ancient Chinese divination and cosmological calculation system. It is one of the Three Styles (三式, sanshi) of Chinese divinatory arts, alongside Da Liu Ren and Tai Yi Shen Shu. It draws on the Yijing, yin-yang cosmology, the Five Phases, and the heavenly stems and earthly branches. Keep in mind that this is a traditional system and part of cultural history, not a scientifically validated method.
The name itself is a clue. Qi (奇, "wonderful") refers to three of the ten heavenly stems: yi, bing, and ding. Men (門) means "gates," the eight gates. Dun (遁) means "hidden," and Jia (甲) is the first stem, which is described as concealed beneath the six ceremonies, hence "hidden Jia."
What the historical record says
Tradition credits the Yellow Emperor, or a figure called Jiutian Xuannu, with the origins of the system, but these accounts cannot be verified as history. The better-documented points are these. The Sui Shu bibliography lists more than fifty titles containing the word Dunjia. The Taibai Yinjing, generally thought to date from the Tang dynasty, discusses it. During the Northern Song dynasty, the Three Styles were an examination subject for students at the Imperial Astronomical Bureau. The Nihon Shoki records that in the year 602 a Baekje monk named Kanroku brought texts on astronomy, dunjia, and the calendar to Japan.
The basic parts at a glance
A Qi Men chart is made of several groups of components. The table below only says what each group is. Names follow the Wikipedia entries, and schools differ in how they write and arrange them. This article does not cover how to cast a chart.
| Component | Contents | In one line |
|---|---|---|
| Stems and branches | Ten stems: jia, yi, bing, ding, wu, ji, geng, xin, ren, gui. Twelve branches: zi, chou, yin, mao, chen, si, wu, wei, shen, you, xu, hai | Ancient symbols for recording time, and the base language of the system |
| Three wonders and six ceremonies | Three wonders: yi, bing, ding. Six ceremonies: wu, ji, geng, xin, ren, gui | Both are made of stems; jia hides under the six ceremonies, which gives "Dun Jia" its name |
| Nine palaces | A 3 by 3 grid; the eight outer cells match the eight trigrams, with one central palace | The base map of the chart, tied to the Luoshu number square |
| Eight gates | Rest, Life, Harm, Block (Du), Scenery, Death, Shock, Open | Eight "gates" placed on the chart, each with a traditional meaning |
| Nine stars | Tianpeng, Tianren, Tianchong, Tianfu, Tianying, Tianrui, Tianzhu, Tianxin, Tianqin | Nine stars on the heaven plate, placed on the chart together with the gates and deities |
| Eight deities | Zhifu, Tengshe, Taiyin, Liuhe, Baihu (or Gouchen), Xuanwu (or Zhuque), Jiudi, Jiutian | Eight spirit names on the spirit plate; some names vary between sources |
Traditionally, the eight gates are grouped in three classes: Open, Rest, and Life are called auspicious gates; Death, Shock, and Harm are called inauspicious gates; and Block and Scenery are neutral. This is a traditional classification and has not been scientifically validated. For a beginner it is best read as "how people in the tradition sorted things."
The Five Phases: the base for understanding how parts relate
The Five Phases (wuxing) are wood, fire, earth, metal, and water. The Shangshu chapter Hongfan is among the earliest sources to list them explicitly, in the order water, fire, wood, metal, earth, and it describes each with a short phrase, such as water "soaking and flowing downward" and fire "blazing upward." In Qi Men Dun Jia, stems, gates, stars, and other parts are traditionally matched to the Five Phases, so getting the generating and controlling relations straight first keeps the later terms from blurring together.
| Relation | Order | In plain words |
|---|---|---|
| Generating | Wood generates fire, fire generates earth, earth generates metal, metal generates water, water generates wood | Each one nourishes the next, forming a loop |
| Controlling | Metal controls wood, wood controls earth, earth controls water, water controls fire, fire controls metal | Each one restrains the next, forming a second loop |
These rules are a traditional way of sorting relationships between things. They describe conceptual correspondence, not causation in the natural-science sense.
The nine palaces and the Luoshu
The nine palaces divide a square into three rows and three columns, nine cells in all. They are closely tied to the Luoshu, a square of the numbers one through nine. According to a legend recorded in the Han-dynasty commentary on the Hongfan attributed to Kong Anguo, a divine turtle emerged from the Luo River with markings on its back, and Yu the Great used them to arrange nine categories. How the diagram itself should be drawn and interpreted has been debated across dynasties.
The square has a neat property: every row, every column, and both diagonals add up to 15. That is our own calculation from the table above, so you can check it with a pencil. A Qi Men chart uses these nine cells as its base: the eight outer cells match the eight trigrams, the middle is the central palace, and gates, stars, and deities are placed on top.
A study order for beginners
The parts depend on one another, and the biggest trap is trying to read a full chart on day one. A way that is easier to stick with is to build from the bottom up, and confirm each step before moving on:
- Five Phases: memorize the generating and controlling loops until you can write them without looking.
- Stems and branches: learn the order of the ten stems and twelve branches, then the three wonders (yi, bing, ding) and six ceremonies (wu through gui).
- Nine palaces and the Luoshu: remember the position of the nine numbers, and that the eight outer cells match the eight trigrams.
- Eight gates: learn the eight names, then the traditional auspicious, inauspicious, and neutral classes.
- Nine stars and eight deities: just learn the names for now, without worrying about how they move.
- Casting a chart comes last. It is a separate skill that is best learned with a teacher or a reliable book alongside.
If you want to build the early steps in spare minutes, Qimen Yinpu is a beginner study app for Qi Men Dun Jia. You read one concept card a day, answer a few practice questions, and collect the matching Qimen seal; there are 69 in all, and the app is free to download. Its interface is currently Traditional Chinese only. It is not a chart-casting or fortune-telling tool. It only helps you remember the basic terms.
Learning it as cultural knowledge: limits and reminders
Qi Men Dun Jia is worth reading about because it preserves a whole set of ancient ideas about time, space, and how things relate, with ties to the Chinese calendar, the Yijing, military thought, and Japan's own calendrical traditions. Studying it as part of cultural history and symbol systems tends to pay off more than rushing to use it.
- This article gives no accuracy figures, and we do not claim it can predict anything.
- We do not recommend using it for major decisions about life, relationships, health, or money. For those, rely on qualified professionals and real information.
- Books and websites do not always agree. When you meet differing accounts, compare several sources before deciding which to trust.
- This article covers concepts and terms only, not casting or interpreting charts.
Our sources here are mainly encyclopedia entries, which can themselves be disputed or incomplete. To go deeper, look for the original classical texts and academic studies and cross-check.
FAQ
What is Qi Men Dun Jia?
Qi Men Dun Jia is a traditional Chinese system of divination and cosmology. It is one of the Three Styles, alongside Da Liu Ren and Tai Yi Shen Shu, and builds on the Luoshu, the nine palaces, and the Five Phases. It is part of cultural tradition, not a scientifically validated method.
What are the eight gates of Qi Men Dun Jia?
The eight gates are Rest, Life, Harm, Block, Scenery, Death, Shock, and Open. Traditionally Open, Rest, and Life are called auspicious, Death, Shock, and Harm inauspicious, and Block and Scenery neutral. That is a traditional classification, not a scientific conclusion.
What should a beginner learn first in Qi Men Dun Jia?
Start with the Five Phases and their generating and controlling relations, since stems, gates, and stars are all tied to them. Then learn the stems and branches, then the nine palaces and the Luoshu, and finally the gates, stars, and deities. Leave chart casting for last.
References
- 奇門遁甲維基百科(Wikimedia Foundation) ・ Accessed 2026-11-21
- Qimen DunjiaWikipedia(Wikimedia Foundation) ・ Accessed 2026-11-21
- 奇門遁甲Wikipedia 日本語版(Wikimedia Foundation) ・ Accessed 2026-11-21
- 洛書維基百科(Wikimedia Foundation) ・ Accessed 2026-11-21
- 五行維基百科(Wikimedia Foundation) ・ Accessed 2026-11-21