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
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 nowCurious how these ideas play out in your own chart? Compute your Four Pillars free with the deterministic engine.
Get your free chart