Chinese Magic Squares and Ancient Numerology

Very early in Chinese history philosophers studied the properties of numbers. The yin-yang system, five elements, Taiji and Yi Jing are all connected by the curious properties of numbers. the tradition linking them together are the Luo Shu and He Tu figures. These are attributed to the legendary Yu the Great from about 4,000 years ago. Inscriptions from Yangshao culture push back the history to at least 5,000 years ago.

The book/inscriptions of the River Luo (or Lu or Lo) Luò shū describe the design on the back of a tortoise or turtle. The Luo is a major tributary of the Yellow River that joins it downstream of Chang'an (Xi'an) where it makes a dramatic turn to the east. The turtle was seen to have the pattern of the 3x3 magic square inscribed on its shell. The map has nine sections or 'rooms' jiǔ gōng. Each room also corresponds to a planet. Other legends have the eight trigrams and first written characters appearing in the same manner.

The Yellow River map ( Hé tú) is another mystical map which sprang out of the Yellow River after a flood either as revealed land or on the back of a turtle. Another legend has the legendary Emperor Fuxi emerging from the Yellow River with the figure on the back of the dragon-horse lóng mǎ he was riding. The Yellow River area was the cradle of early Chinese civilization. The story is mentioned in the Great Commentary to the Yi Jing. The various traditions are hard to disentangle after two thousand years. Turtles / tortoises have played in an important part in ancient myths and symbolism. They are very long lived and their bodies represent the flat Earth and the shell the vaulted Heavens above.

Magic Square (Luo Shu or Lo Shu)

The Luo Shu figure is considered a representation of the 3x3 magic square:


The arrangement of the numbers 1-9 is such that all the rows, columns and diagonals add up to the same number 15 making it a ‘magic square’. Fifteen is a significant number, multiplying 15 by 24 - the number of mountain directions gives 360 a number with ancient cultural significance as the (rough) number of days in the year. The year is thus split into 15 day periods (half a month).

The magic square became very important when taken up by Arabs a thousand years later and contributed significantly to the study of numbers. Here is its original representation as counts of circles, open dots are yang (odd) and closed ones yin (even).

luo shu,magic square
The Luo Shu Magic Square.
This diagram is from 朱熹 Zhū Xī's (1130 - 1200) zhōu yì běn yì Commentary on the Yi Jing.

The Chinese were very fond of counting in tens, long before decimalization came along, there were even ten days in a week, ten hours in a day for a long period. So the numbers 1-9 are fundamental to counting. For many purposes numbers greater than 10 can be associated with a number 1-9 using a simple procedure, add up the digits of the number and repeat until it is a single digit. For example 1476 is 1+4+7+6=18 then 18 is 1+8=9; this makes 9 the 'fundamental' number for 1476.

Five is associated with Earth (soil) and is the appropriate central number; five is after all the average of the numbers 1-9. Of all the numbers it has the most associations. The magic square also has even/odd alternation of numbers around the edge. Even numbers are yin and odd numbers yang so the square represents continuous yin-yang transformation and harmony. In this figure all four opposite pairs add up to 10 (4+6=10, 2+8=10, 9+1=10, 3+7=10).

If you look through how the numbers 1-9 are arranged it gives a zig-zag path around the square. This ordering gives the rationale for the Flying Star Feng Shui system. In this system the magic square is used to analyze a space into eight directions; the ordering of the Lo Shu numbers shifts every twenty years according along the original zig-zag path (1 takes the place of 2, 2 in place of 3 etc.) and so date and time can be introduced into Feng Shui analysis. The Flying Star school takes its name from the stars of the Big Dipper (Ursa Major) constellation where nine stars are identified. The calculated arrangement is used to assess the good and bad luck of the layout of buildings and general harmonious orientation.

The numbers have other associations: (1, 6) ancestors zōng; (2, 7) the way dào, (3 , 8) friends péng; (4, 9) understanding yǒu and (5, 10) guardianship shǒu. If the layout of numbers is related to the body then the following anatomical associations can be seen: 9: head (highest number), 1 feet (lowest number), 3 left, 7 right, (2, 4): shoulders, (6, 8) : legs and 5 : torso, center.

A traditional Luó pǎn (or lopan) compass used in Feng Shui often has one ring representing the eight surrounding numbers (so omitting 5) with opposite numbers (usually represented as joined up dots like constellations instead of a numeric character) adding up to 10 (5+5).

Yellow River Map (He Tu)

A related but more complex figure is the Hé tú figure. Instead of a square the numbers 1-9 are arranged in a cross-shape.


At first glance there seems little resemblance to the Luo Shu figure except that five is in the middle. However if you look at the pairs of numbers around the center they are all also adjacent in the magic square : (7, 2); (3, 8); (4, 9) and (1, 6). Moreover all these pairs contain both odd and even (yin-yang) numbers. The arrangement also reveals that each of the numbers in the outer square is five more than its neighbor in the inner square (2+5=7; 4+5=9, 3+5=8 and 1+5=6). Here is its original representation as counts of circles, open dots are yang (odd) and closed ones yin (even). 5 is repeated above and below the center to give 10.

he tu,yellow river map
The Yellow River Map (He Tu) figure.
From 朱熹 Zhū Xī's (1130 - 1200) zhōu yì běn yì Commentary on the Yi Jing.

Taiji figure


The taiji has eight symbols (also known as the yīn yáng yú tú yin-yang fish diagram) arranged in a circle around the symbol for yin-yang swirling around each other. The figure can be transformed into a square with each of the eight trigrams taking up one space. The arrangement is considered to be the invention of King Wen of Zhou who also devised the order of hexagrams in the Yi Jing.










Using this arrangement the magic square numbers can be associated with the eight bagua trigrams. The choice of which trigram around the taiji is not random but tied to the Luo Shu figure and the properties of numbers.

kǎnkūnzhènxùn qiánduìgèn

Earlier and Later Heaven Bagua figures


Just to complicate matters there are two arrangements of the trigrams to consider not just one. The origin of the Earlier (or Former) Heaven arrangement ( xiān tiān) is somewhat confused (it is over 5,000 years old after all) it is usually attributed to Emperor Fuxi. The trigrams are arranged so that their inverse faces them across the center with yin changed to yang and yang to yin. So Earth kūn is opposite to Heaven qián and gèn is opposite to duì (the tops of the trigrams are further out from the center - many representations have the trigrams upside down). Also if you change all yin to yang and yang to yin then the ordering is maintained it is just rotated through 180°. Heaven related trigrams are at the top, earth related trigrams at the bottom.

If you look at the arrangement around the circle each position is either just a shift of a yin-yang line or a change of one line from yin to yang or yang to yin. Some people see a relationship to the He Tu figure but this is hard to make out. With its symmetry it is considered the ideal state of things – 'perfection', in contrast to the more complex Later Heaven arrangement as the 'real' state of things. The trigrams have different numerical associations, here is the Earlier Bagua numbers

gènkǎnxùn kūnduìzhènqián

Using this alternative number association most of the pairs of numbers on the He Tu figure appear adjacent (4,9); (1,6) and (3,8) but not (2,7).

The normal arrangement of the bagua follows the Later Heaven sequence hòu tiān, here the arrangement at first look does not look as symmetric or meaningful but that is before taking into account the Luo shu magic square. There is a symmetry around the horizontal though; if a mirror is placed across the middle then their inverses appears in their place : for ; for and for . Note that historical studies have shown that the ‘later’ heaven arrangement was actually invented earlier than the ‘earlier’ heaven arrangement – just to muddy the waters further.

In the Lo Pan compass for Feng Shui you will see either or both the earlier or later Bagua figures in the rings close to the center. The Earlier Heaven sequence is generally used for location of graves and tombs while the Later Heaven is used for houses and gardens.

The Five Elements and the Magic square

Now comes another transformation that starts to tie everything together and make some coherent sense. Each element is associated with a pair of numbers 1-10 according to the following sequential arrangement:


In this way each element was an even and odd number (yin-yang) association. However the really surprising outcome is that these pairs are the arms of He Tu figure (1, 6); (2, 7); (3, 8) and (4, 9). They also form adjacent pairs around the Luo Shu magic square. Earth (5) is at the center of everything, it is at rest, it is the average of all the pairs of numbers around it. All other elements are a balance of yin and yang (odd and even).

The order of elements is important, it is described in the ancient classic Shū jīng and is called the ‘cosmogenic order’ as it is considered the order that they came into being. This can be briefly explained by the facts that water is cold and descending; fire is hot and ascending; wood can be carved into shapes; metal can be molded into shapes and finally earth brings forth vegetation as food.

The final very neat step considers the cycles of the five elements. The most important and best known are the creation and destruction cycles.

The creation cycle is: earth gives metal (ore); metal gives water comes from (collects dew); water nourishes wood (vegetative growth); wood gives fire and fire generates earth (ash). So the creation cycle is earth - metal - water - wood - fire - earth. Bearing in mind the numerical assignments for elements, look at how this maps on to the He Tu figure. The creation cycle starts at the center (earth) and moves around clockwise. Moreover the compass direction associations are interesting too: fire - south; water - north; metal - west; wood - east and earth - center. These tie in perfectly with the He Tu figure when you remember that south was always at the top of old Chinese maps.

Putting the elemental association into the He Tu diagram gives:

7 fire
2 fire
8 wood3 wood 5 earth4 metal9 metal
1 water
6 water

The destruction cycle is different, it is not simply the reverse: earth destroys water (dams); water destroys fire; fire destroys metal; metal destroys wood (axes) and wood destroys earth (breaks it open). So the destruction cycle is earth - water - fire - metal - wood - earth. On the He Tu figure this gives a weaving motion. However on the Luo Shu figure the destruction cycle gives a very pleasing counter-clockwise path around the square:

The elements appear in the luo shu square as:


The elements are also associated with seasons and directions in the following way:


So the Luo Shu gives the seasons in clockwise order - another pleasing association.

Chinese philosophers found more and more associations for elements and numbers. As the basis of the Luo Shu and He Tu are mathematical in nature the theory is hard to argue against as it is grounded in the immutable properties of numbers. It took a long time to convince Chinese scholars to ditch their belief in a system that seemed to unify everything in the heavens and on earth. It’s interesting that one of the most popular number puzzles ‘Sudoku ’ is also all about arranging the numbers 1-9 into squares!

See also