Lo Shu Magic Square

Lo Shu: Definition, Nature and History

Lo Shu Square (simplified Chinese: 洛书; traditional Chinese: 洛書 ; literally: Luo (River) Book/Scroll) or the Nine Halls Diagram (simplified Chinese: 九宫图; traditional Chinese: 九宮圖), often in connection with the Ho Tu (河圖) figure and 8 trigrams, is the unique normal magic square of order three. Lo Shu is part of the legacy of the most ancient Chinese mathematical and divinatory (Yi Jing 易經) traditions, and is an important emblem in Feng Shui (風水, translate as "wind-water"), the art of geomancy concerned with the placement of objects in relation to the flow of qi (氣), 'natural energy'.

Actually, the first Chinese magic square is believed to have been created by Fuh-Hi, the mythical founder of Chinese civilization, who lived from 2858 to 2738 B.C. The scroll is a 3x3 magic square, where odd numbers are expressed as white dots, or yang symbols, and even numbers are expressed as black dots, or Yin symbols. The odd numbers are supposed to be symbols of heaven, while even numbers are symbols of the earth.

Chinese Lo Shu
with true Chinese numbers

Chinese Lo Shu square
Image by Jenny Olive

Modern Lo Shu square

In the Chinese Lo Shu square above, we have added colour here to make the distinction between the odd and even numbers stand out more clearly. In fact the yellow blobs should be white, being Yang symbols or emblems of heaven, and the red blobs should be black, being Yin symbols or emblems of earth.

Feng Shui is a form of qi divination. The retention or dissipation of qi is believed to affect the health, wealth, energy level, luck and many other aspects of the occupants of the space. Color, shape and the physical location of each item in a space affects the flow of qi by slowing it down, redirecting it or accelerating it, which directly affects the energy level of the occupants.

The qi (Chinese 氣, Japanese 気, Korean 氣, prāna in indian (sanskrit प्राण)) is an active principle forming part of any living thing; literal translation is "air", "breath" or "spirit". Qi is a didactic concept in many Chinese, Korean and Japanese martial arts.

Location of 7 chakras

Lo Shu is also connected to the Chakras and stimulate them. Chakra (derived from the Sanskrit cakraṃ चक्रं, wheel or disc. There are seven major chakras or energy centers, located within the subtle body, from the base of the spine to the top of the head, at major branchings of the human nervous system, beginning at the base of the spinal column and moving upward to the top of the skull and expressed life force energy (biophysical energy or prana of the human body). The seven major chakras are: Sahasrara, सहस्रार, Ajna, आज्ञा, Vishudda, विशुद्ध, Anahata, अनाहत, Manipura, मणिपूर, Svadhishthana, स्वाधिष्ठान and Muladhara, मूलाधार. Moreover placebo effect, there is a relationship between the positions and functions of the chakras and of the various organs of the endocrine system.

The odd and even numbers alternate in the periphery of the Lo Shu pattern, the 4 even numbers are at the four corners, and the 5 odd numbers form a cross in the center of the square. The sums in each of the 3 rows, in each of the 3 columns, and in both diagonals, are all 15 [fifteen is the number of days in each of the 24 cycles of the Chinese solar year; Xia Li (夏曆) or "Yin Calendar" - Gregorian calendar is the "Yang Calendar"]. This pattern, in a certain way, was used by the people in controlling the river. Since 5 is in the center cell, the sum of any two other cells that are directly through the 5 from each other is 10 (the number of the Ho Tu). The even numbers are Yin, the feminine principle. The odd numbers are Yang, the male principle. The symbolism of the square Lo Shu interprets 5 elements: earth, fire, metal, water, and wood. Like the Ho Tu, the Lo Shu square is used as a mandalic representation important in Feng Shui. For Chinese, the magic square symbolizes the harmony of the universe.

Bagua with name and nature
(King Wen "Later Heaven" order)

Mathematics of Lo Shu Magic Square

From any magic square of order 3, by pivoting the square, you can get three other magic squares by rotation and four other magic squares by symmetry. These eight magic squares are considered as equivalent, but the center cell in a 3×3 normal magic square must be 5.


Rotate 90º

Rotate 180º

Rotate 270º

Vertical reflections of squares immediately above

In these transformations of normal magic square of order 3, and in all cases:

  1. The number 5 is always at the center of the square, at the intersection of the 2 diagonals.
  2. The 5 odd numbers are always placed cross in the central 2 lines (vertical and horizontal) of the square.
  3. The 4 even numbers are always in the 4 outside corners of the square.
  4. The sums in each of the 3 rows, in each of the 3 columns, and in both diagonals, are all 15 (15 = magic constant).

Applet by Yasusi Kanada

The applet searches for a magic square. If you used this applet in its initial state, you can track the process by your eye in some extent. "Swapping rule" exchanges two integers in columns and "rotation rule" rotates three integers in three columns. If you change the option value, which is "medium speed (20 rps)" in its initial state, to "full speed", the computation will be done as quick as possible. The BEST is to use "slow speed" (3 rps) with "Swapping rule". [20 rps means that the rule is applied 20 times per second (rps = reductions per second). However, the real rps is less than 20]. You can start the computation again using the "restart" button. You probably find a different solution each time because random numbers are used, and the computation time is also different each time.

Moreover, the magic constant of a normal magic square depends only on n and has the value M = (n3 + n)/2. Here is the proof. Given an  normal magic square, suppose M is the number that each row, column and diagonal must add up to. Then since there are n rows the sum of all the numbers in the magic square must be . But the numbers being added are 1, 2, 3, ... n2, and so 1 + 2 + 3 + ... + n2. In summation notation, . Using the formula for this sum, we have , and then solving for M gives . Thus, a Lo Shu's normal magic square must have its rows, columns and diagonals adding to , a Albrecht Dürer's to M = 34, a Benjamin Franklin's  to M = 260, and so on.

Legend of turtle and worldwide diffusion

According to the Chinese book Yih King: Emperor Yü walked along the river Lo. Then he saw the magic square on the carapace of a turtle sacred. This square is called the diagram of the river Lo or Lo Shu.

Here is another version of the story of 'Lo Shu'. In the ancient time of China, there was a huge flood. The people tried to offer some sacrifice to the 'river god' of one of the flooding rivers, the 'Lo' river, to calm his anger. However, every time a turtle came from the river and walked around the sacrifice. The river god didn't accept the sacrifice until one time, a child noticed the curious figure on the turtle shell. Hence they realized the correct amount of sacrifice to make (15). Lo is name of a river and the word 'Shu' means "book".
According to Philip I.S. Lei - Hong Kong.

After several centuries, the 3x3 magic square made its way out of China and entered the Indian subcontinent. From India, it traveled on to Arabia and into medieval Europe. Since, magic squares have fascinated humanity throughout the ages, and have been around for over 4,120 years. They are found in a number of cultures, including Egypt and India, engraved on stone or metal and worn as talismans, the belief being that magic squares had astrological and divinatory qualities, their usage ensuring longevity and prevention of diseases. In the ninth century, Arabian astrologers used magic squares to interpret horoscopes.

The 3x3 magic square was used as part of rituals in India from vedic times, and continues to be used till date. The Kubera-Kolam is a floor painting used in India which is in the form of a magic square of order three. It is essentially the same as the Lo Shu Square, but with 19 added to each number, giving a magic constant of 72.


In Egypt, magic squares were used to represent the difference between order and chaos. Squares made up of two or four cells were said to represent chaos because they were incapable of forming magic squares. Magic squares 3x3 or larger were dedicated to the sun, moon, and planets in the form of talismans. The talismans were made by taking a magic square and placing it in a polygon with the number of sides of the polygon equal to the root of the square (i.e. a 3x3 magic square was placed in a triangle, a 5x5 was placed in a pentagon, etc...). These polygons were then placed in a circle, and in between the sides of the polygon and the circle were inscribed signs of the zodiac. Then, the "good" or "evil" name of the corresponding planet was written on the talisman. It is rumored that Pythagoreas, who traveled through Egypt at that time (500 B.C.), was greatly influenced by the Egyptian philosophy on magic squares and numbers.

Lo Shu and Cardinal Points

Lo Shu is often drawn in the form of a 9-squares chart with each square representing a direction in the compass (see diagram below) namely North, South, East, West, Northeast, Northwest, Southeast, Southwest and the center (total 9 locations). The south is always represented by the number 9, and the north by the number 1.

Lo Shu is also connected to the Bagua and the eight trigrams. The Bagua (Chinese: 八卦; pinyin: bā guà; Wade-Giles: pa kua; literally "eight symbols") are eight diagrams used in Taoist cosmology to represent a range of interrelated concepts. Each consists of three lines, each either "broken" or "unbroken," representing a yin line or a yang line, respectively. Due to their tripartite structure, they are often referred to as "trigrams" in English. The eight trigrams are: Qian 天, "Heaven", Xun 風, "Wind", Kan 水, "Water", Gen 山, "Mountain", Kun 地, "Earth", Zhen 雷, "Thunder", Li火, "Fire" and Dui 泽, "Lake".

Xun 風
Li 火
Kun 地
Zhen 雷
Dui 泽







It is important here to remind where does the Chinese Yin Yang symbols come from. The Chinese calendar divides the year cycle into 24 solar segments, including the Vernal Equinox, Autumnal Equinox, Summer Solstice and Winter Solstice, using the sunrise and Dipper positions; that is according to the sun positions on the tropical zodiac (Similar to western astrology). So, the proper origin of Yin Yang is the pattern of 24 solar segments.

Yin Yang - 24 solar segments
by Allen Tsai

Yin Yang
Yin Yang

taijitu taiji
taijitu taiji
taijitu taiji
Taijitu, rough English translation "diagram of ultimate power" (Taiji tu of Zhou Dunyi, 1017-1073), is best known in western cultures as Yin and Yang (literally meaning "dark and light")

Lo Shu Numbers and Their Meanings

The numbers in each square of the Lo Shu embrace a variety of meanings. Just to name a few:

Lo Shu

Pure Green
Light Green
Dull Yellow
From D L Wang / hiakz.com

The sum of each line (whether vertical, horizontal or diagonal) always equals fifteen. In other words, if you ignore the 5 in the center, you will notice that the number opposite each other all sums up to 10. (The River Map uses the difference while the Lo Shu Square uses the sum).

Similar to the River Map, the odd numbers (white dots) represents Yang and the even numbers (black dots) represents Yin. Apart from the 5 in the center, the Lo Shu numbers are arranged such that after every Yang number, a Yin number follows, and, after every Yin number comes a Yang number. In the I Ching, yin (陰) and yang (陽) are represented by broken and solid lines: yang is solid () and yin is broken (– –). These are then combined into trigrams, which are more yang or more yin depending on the number of broken and solid lines (e.g. ☰ is heavily yang, while ☷ is heavily yin)

Some examples of Yin and Yang:

The Yin and Yang must be balanced. Yin and Yang are complementary and inseparable. It seems impossible to imagine one without the other. So if at any moment Yin is too strong Yang will be in the future and seek balance. For example, in summer, Yang peaked, immediately after, Yin began to grow while Yang declines gradually. So in winter, the Yin peaked and Yang its lowest point. The fact of reaching the highest point, whether the Yin or Yang, marks the beginning of their decline. The Yin and Yang can be found everywhere, even in the human body. For example the upper body is Yang while the bottom is Yin, a muscle contraction is Yang while a muscle at rest is Yin, even spirit can be Yin and Yang. Indeed, the mind in sleep state is Yang and spirit in a state of sleep is Yin.

2, 4, 6, 8
1, 3, 5, 7, 9
SeasonAutumn, WinterSpring, Summer
DirectionNorth, WestSouth, East
Yin and Yang

LoShu, Sudokus and Bimagic Squares

This section is based on findings of Christian Boyer on his website multimagie.com.

From the 8 LoShu Squares, you can get two Sudokus (each 3x3 subsquare contains the nine integers from 1 to 9, and each row and each column contains the nine integers from 1 to 9):


Sudoku A


Sudoku B

These Sudokus have nice supplemental properties, i.e. if we move one or more columns from one side to the opposite side, they remain Sudokus: the new 3x3 sub-squares contains again all the integers from 1 to 9. Same result if we move rows from one side to the opposite side.

Now, construct a 9x9 square in which each cell use the two cells of Sudokus A and B with the formula:

9(A - 1) + B

Then you get a bimagic square constructed with the Tarry-Cazalas method. ALL the 9x9 bimagic squares constructed with the Tarry-Cazalas method are a combination of 2 Sudokus. By definition, a bimagic square is a magic square that remains magic if all the numbers it contains amounted to squares.


Bimagic square constructed
from Sudoku A and Sudoku B

This square is bimagic:

  1. consecutive integers from 1 to 81;
  2. same sum S1 = 369 for each of the 9 rows, 9 columns and 2 diagonals;
  3. after you have squared each number, the square remains magic, same sum S2 = 20 049 for the 9 rows, 9 columns and 2 diagonals.

And it has supplemental bimagic properties:

  1. again the same sum S1 = 369 for each of the nine 3x3 sub-squares (sum of the nine numbers in each sub-square);
  2. after you have squared each number, again the same sum S2 = 20 049 for each of the nine 3x3 sub-squares (sum of the nine squared numbers in each sub-square).

You can get another bimagic square using the other formula: 9(B - 1) + A

Of course, all couples of Sudokus do not give a bimagic square, and all bimagic squares (those not constructed by the Tarry-Cazalas method) are not coming from a couple of Sudokus.

Luo River: tributary of the Yellow River

The Luo River (Chinese: 洛河;) is a tributary of the Yellow River in China. It rises in the southeast flank of Huashan in Shaanxi province and flows east into Henan province, where it eventually joins the Yellow River at the city of Gongyi. The river's total length is 420 km. Although not a major river by most standards, it flows through an area of great archaeological significance in the early history of China. The Luo's main tributary is the Yi River, which joins it at Yanshi. During the era of the Three Kingdoms, Cao Zhi wrote a famous poem to the goddess of the Luo River as an indirect expression of love for a deceased lover.

The Yellow River or Huang He / Hwang Ho (Chinese: 黃 河) is the second-longest river in China (after the Yangtze River) and the sixth-longest in the world at 5,464 kilometers (3,398 mi). The Yellow River is called "the cradle of Chinese civilization", as its basin is the birthplace of the northern Chinese civilizations and was the most prosperous region in early Chinese history. Early Chinese literature refers to the Yellow River simply as He, or "River". The yellow color comes from loess suspended in the water.