BaZi · Glossary
Nine Palaces & the Luoshu Square — Origin and Layout
Deep Oracle Editorial Team · 2026-07-27 · 1 min read
The Nine Palaces (jiu gong) is the three-by-three grid formed from the Luoshu number square: nine cells, each holding one of the numbers one through nine and corresponding to a direction, forming the basic spatial frame of traditional cosmological calculation.
The Luoshu
The Luoshu is the classical number diagram in which the nine numbers are arranged so that every row, column and diagonal sums to fifteen. The traditional mnemonic runs: "wear nine, tread one; three left, seven right; two and four the shoulders; six and eight the feet; five in the center."
Use in the Flying Stars
The Nine Palaces grid is the board the Xuankong Flying Stars move on: the nine stars traverse the palaces along the Luoshu track, producing the star charts the school reads.
Sources
The earliest canonical reference is the Zhou Yi, Xi Ci I: "The He gave forth the Map, the Luo gave forth the Writing, and the sages took them as pattern."
Related terms
Xuankong Flying Stars · Three Cycles Nine Periods · Yin-Yang · Five Elements
In the classical texts
Passages in the classical texts held on this site where the term occurs, transcribed from the named edition. The texts do not necessarily use the term the way it is used today.
临六害集命斯人也必主七伤之事七伤者伤害父母妻子兄弟自身是也天罗地网乃阳气入墓絶灭之地遇者故多防也然巳上皆神煞之为防或三元九宫五行生旺为福之臻尚可以成吉庆耳盖五行为神煞之先或以值防煞者兼三元九宫五行四柱又在衰败之地所谓祸并危疑者欤是谓煞扶兮速速成灾福抑乃迟迟为庆李仝曰一吉二宜三生四杀五鬼六害七伤八难九
或逢四煞五鬼六害七伤地网天罗三元九宫福臻成庆祸并危疑扶兮速速抑乃迟迟
或逢四煞五鬼,六害七伤,地网天罗,三元九宫,福臻成庆,祸并危疑,扶兮速速,抑乃迟迟。
九宫旺相,难逃邀我桑中。
一而两之道,法乎自然,八卦九宫,乘阴阳以数。
阴阳顺逆之说,《洛书》流行之用,其理信有之也,其法不可执一。
Cast a BaZi chart
Enter a birth date and time to compute the full chart: four pillars, ten gods, stars, luck cycles and annual pillars.
Start now