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
Nine Palaces & the Luoshu Square — Origin and Layout