HomeI Ching & Five Elements › Luoshu Square (洛书)

Luoshu Square (洛书)

Describes a palace of the Luoshu magic square (洛书, Lo Shu): its colour name (一白 … 九紫), later-heaven trigram, direction, element, season and family member, together with the full grid, the magic constant 15, the Hetu (河图) partner number and the opposite palace.

When to use

You need the meaning of a Luoshu / Flying Star number 1–9, the palace grid, or which trigram and direction a number stands for.

Do not use when: You need a personal Kua number (use ming-gua) or the annual/monthly flying stars of a period (use nine-star-feng-shui).

Formula

grid = [4 9 2; 3 5 7; 8 1 6], magic constant = 3·(1+…+9)/9 = 15; opposite = 10 − number (5 → 5); Hetu partner = number ± 5

Later-heaven mapping 坎1 N, 坤2 SW, 震3 E, 巽4 SE, 5 centre, 乾6 NW, 兑7 W, 艮8 NE, 离9 S; colours from the 紫白 (purple-white) flying-star tradition. Traditional cultural reference calculation; not a prediction and not medical, legal or financial advice.

Inputs

ParameterTypeUnitRequiredDescription
numberintegerdefault 5Luoshu number 1–9 (5 = centre). Range: ≥ 1, ≤ 9

Outputs

OutputTypeUnitDescription
numberintegerThe palace number.
color_namestringNine-star colour name: 一白 二黑 三碧 四绿 五黄 六白 七赤 八白 九紫.
trigramstringLater-heaven trigram of the palace (none for the centre).
directionstringCompass direction of the palace.
elementstringFive-element attribution (1 Water, 2/5/8 Earth, 3/4 Wood, 6/7 Metal, 9 Fire).
seasonstringSeason of the palace's trigram.
family_memberstringFamily role of the palace's trigram.
gridstring_listThe square as three rows in the traditional orientation with south (9) at the top: 4 9 2 / 3 5 7 / 8 1 6.
magic_constantintegerSum of every row, column and diagonal.
hetu_pairintegerPartner number in the River Map pairs 1–6 水, 2–7 火, 3–8 木, 4–9 金, 5–10 土.
hetu_elementstringElement of the Hetu pair.
opposite_palaceintegerPalace across the centre; the two numbers sum to 10 (the centre is its own opposite).
all_palaceslistOne row per number: colour name, trigram, direction, element.

Example

Palace 1: {"number":1}{"color_name":"1 一白 (Yi Bai, White)","trigram":"坎 Kan ☵ (Water)","direction":"North (N, 北)","element":"Water (水)","magic_constant":15,"hetu_pair":6,"opposite_palace":9}

Palace 5 (centre): {"number":5}{"color_name":"5 五黄 (Wu Huang, Yellow)","direction":"Centre (中)","element":"Earth (土)","hetu_pair":10,"opposite_palace":5,"grid":["4 9 2","3 5 7","8 1 6"]}

GET https://tttkmbb.com/api/v1/calculate/luoshu-square?number=1

Machine access

Sources

FAQ

Why is 9 at the top of the grid?

Chinese diagrams put south at the top; 9 (离, south) is therefore the top-centre cell and 1 (坎, north) the bottom-centre cell. Rotating the grid does not change the sums.

What is the Hetu partner?

The River Map (河图) pairs 1–6, 2–7, 3–8, 4–9 and 5–10 as the generating and completing numbers of Water, Fire, Wood, Metal and Earth; 10 is not a Luoshu palace.

Related calculators