- Home/
- Chinese Metaphysics/
- The Hetu, Luoshu and Nine Palaces in Chinese Cosmology/
- The Luoshu Magic Square: Numbers, Structure and Cultural Meaning
The Luoshu Magic Square: Numbers, Structure and Cultural Meaning
洛书幻方:数字结构与文化含义
If the Hetu is the diagram of the cosmos at rest, the Luoshu is the cosmos in motion. It is the more famous of the two, and for good reason: it is a genuine mathematical object, the three-by-three magic square, the smallest and oldest non-trivial magic square known to humanity. The nine digits from one to nine are arranged in a grid so that every row, every column, and both diagonals add up to the same total—fifteen. This is not a matter of interpretation or belief; it is an arithmetical fact that anyone can verify, and it is what has fascinated mathematicians, mystics, and puzzle-lovers across many cultures.

What is on the diagram
The standard arrangement places the numbers as follows. The odd numbers occupy the four cardinal directions and the center: nine at the top (south), one at the bottom (north), three on the left (east), seven on the right (west), and five in the middle. The even numbers fill the four corners: four and two along the top, eight and six along the bottom. A useful mnemonic preserved in tradition runs, in effect: “nine above, one below, three left, seven right, two and four as shoulders, six and eight as feet, five in the belly.” The five at the center is the balance point, and fifteen—the constant sum—is three times that central five.
It is a third-order magic square
The magic of the constant sum is worth dwelling on, because it is the source of the diagram’s enduring appeal. There is, up to rotation and reflection, exactly one way to arrange the numbers one through nine in a three-by-three square so that all lines sum equally, and this makes the Luoshu feel less like an arbitrary convention and more like a discovered truth. To a tradition already convinced that number expresses the deep structure of reality, a figure in which order emerges so perfectly from the first nine integers seemed almost miraculous—fit to have been revealed on the back of a divine turtle.
It is worth stating the uniqueness result precisely, because it is stronger than most readers expect. There is exactly one third-order magic square using the numbers one to nine. Eight arrangements exist, but they are the same square rotated and reflected — turn the paper, or hold it to a mirror, and you have them all.
This is not true of larger squares. There are 880 distinct fourth-order magic squares and many millions of fifth-order ones. Three is the only size at which the answer is unique, which is a genuinely interesting fact and probably explains why this particular figure acquired such weight: there was nothing else it could have been, and every culture that looked for one found the same thing.
Why the centre must be five
This is the part worth doing properly, because it can be proved in a few lines and almost no popular treatment bothers.
The numbers one to nine sum to forty-five. They occupy three rows, and the rows must have equal sums, so each row sums to fifteen. The same holds for each column and each diagonal.
Now consider the four lines that pass through the centre cell: the middle row, the middle column and the two diagonals. Together they cover the centre four times and every other cell exactly once. Their combined total is therefore four times fifteen, which is sixty, and that equals the sum of all nine numbers plus three extra copies of the centre. So forty-five plus three times the centre equals sixty, which gives a centre of five.
The point is not the arithmetic itself but what it establishes. The centre is not five because five is the number of earth, or because the centre governs the middle phase. It is five because no other value is possible. The cosmological explanation was fitted afterwards to a fact that arithmetic had already fixed.
The odd and even distribution is not a design either
The same applies to the feature most often cited as evidence of profound intent: that the odd numbers occupy the four cardinal positions and the even numbers the four corners.
There are five odd numbers among one to nine and four even ones. The centre is five, an odd number, leaving four odds and four evens for the eight surrounding cells. Each corner lies on three lines summing to fifteen while each edge cell lies on three as well, but the parity constraints of the sums force the arrangement: with fifteen an odd total, each line must contain either three odd numbers or one odd and two even, and working through the possibilities leaves exactly one distribution.
So the pattern that yang occupies the cardinal directions and yin the corners — read for a thousand years as a statement about the structure of the cosmos — is a consequence of the arithmetic and could not have come out any other way. Nobody arranged it. It is what a third-order magic square looks like.
This does not make the traditional reading worthless as cultural history. It does mean that the reading describes the square rather than being discovered in it.
Its pairing with the Later Heaven trigrams
The Luoshu is conventionally overlaid with the Later Heaven arrangement of the eight trigrams: Li in the south with nine, Kan in the north with one, Zhen in the east with three, Dui in the west with seven, and the four remaining trigrams at the corners with the even numbers, leaving the centre without a trigram.
This pairing is what makes the diagram usable in the divinatory arts. It supplies each palace with a number, a direction, a trigram, a phase and — through the trigrams — a family member and a set of associations. Once a palace carries five kinds of label at once, a practitioner can move between vocabularies freely, which is exactly what Flying Star feng shui and Qimen Dunjia require.
It should be said that the pairing is a convention. The Later Heaven sequence and the magic square have independent origins, and joining them was a decision, made and standardised at a particular time. It works well and it is not a discovery.
Magic squares were found elsewhere too
The number-square also traveled far beyond China. Versions of the three-by-three magic square appear in Indian, Islamic, and later European sources, sometimes as protective talismans, sometimes as mathematical curiosities. Within the Chinese tradition the Luoshu was engraved on amulets, used in ritual, and—most consequentially—built into Feng Shui and calendrical systems as the framework for tracking the so-called “flying stars,” in which the nine numbers move through the palaces in a fixed order over time. This dynamic circulation of numbers through the grid is one of the most technically elaborate ideas in all of Chinese metaphysics.
The line between mathematics and cosmology
Everything on this page falls on one side or the other of a single line, and drawing it clearly is the most useful thing a reader can take away.
On the mathematical side: the square exists, the sums are equal, the centre must be five, the parity distribution is forced, there is exactly one solution up to rotation and reflection. All of this is provable, none of it depends on any belief, and anyone can check it in ten minutes.
On the cosmological side: that the centre's being five indicates the primacy of earth, that odd numbers in the cardinal positions express the nature of yang, that the palaces govern domains of life, that a star flying into a palace in a given year affects the occupants of a building. None of this follows from the mathematics, and no evidence supports any of it.
What gives the second set its persuasive force is proximity to the first. The rigour of the arithmetic is silently transferred to the interpretation attached to it, and because the square really is remarkable, the claims made about it inherit an authority they have not earned. This particular move — a solid core with an unsupported superstructure, both presented in the same voice — recurs throughout the arts described on this site, and the Luoshu is the clearest specimen of it.
Why it is worth learning
Nothing above is a reason to ignore the Luoshu. There are several good reasons to know it well.
It is a genuinely elegant mathematical object, and the smallest non-trivial magic square — a nice thing to be able to reconstruct from memory, and a pleasant introduction to combinatorial reasoning for anyone, including children.
It is the operating framework for a large part of Chinese practice. Flying Star, the Purple-White stars, the nine periods, the Qimen board, nine-palace stepping in the martial arts and the layout of ritual halls all run on it, and none of those subjects can be followed without it.
And it is an unusually clean case study in how to think about traditional material: a demonstrable core, a late diagram, an ancient name, an imported interpretation, and a scholarly tradition that sorted the whole thing out using its own resources. If a reader takes one example from this site as a model for approaching everything else on it, this is the one to take.
Key points
The Luoshu is the cosmos in motion, where the Hetu is the cosmos at rest.
It is a genuine mathematical object: the three-by-three magic square.
Odd numbers sit at the four cardinal points and the centre; even numbers at the corners.
Every row, column and diagonal sums to the same total.
That constant sum is the source of the diagram’s long appeal, and it is a verifiable fact.
The Luoshu is read as the cycle of movement and control rather than generation.
Versions of the same square appear in Indian, Islamic and European traditions.
The mathematics is real; the cosmological meanings attached to it are interpretation.