Skip to content

Magic Square Gusuryak

Lee Yunjin edited this page Oct 20, 2026 · 12 revisions

Choi Seok-jeong’s Gusuryak contains a number of magic squares, which are introduced on this page. Non-square constructions such as the Jisu Guimundo(Hexagonal Tortoise Problem; HTP) are covered in Magic-Configuration-Gusuryak.

The Gusu-ryak (九數略, “Abbreviated Treatise on the Nine Numbers”) is a mathematical work written around 1700 by Choi Seok-jeong, a scholar and government official of the late Joseon period who served as Chief State Councillor. The book contains a variety of magic squares with combinatorial designs.

Table of Contents

Basic magic squares (orders 3–8)

The Gusu-ryak presents examples of magic squares of orders 3, 4, 5, 7, and 8, beginning with the order-3 Lo Shu. Characteristically, a Positive-Number Diagram (陽數圖) and a Negative-Number Diagram (陰數圖) may form a pair; the two may be combined into a superposition diagram of ordered pairs; or the multiplicative relationship between parent-number (母數) and child-number (子數) components may be made explicit.

Order-3 Lo Shu (洛書)

This is the classical 3×3 magic square, in which every row, column, and diagonal sums to 15.

4 9 2
3 5 7
8 1 6

Order-4 Sasado (四四圖)

This order-4 magic square arranges the integers from 1 to 16 so that every row, column, and diagonal sums to 34.

Positive-Number Diagram

2 16 13 3
11 5 8 10
7 9 12 6
14 4 1 15

Negative-Number Diagram

4 9 5 16
14 7 11 2
15 6 10 3
1 12 8 13

Superposition Diagram

This superposed array combines the corresponding cells of the Positive- and Negative-Number Diagrams as ordered pairs.

(2, 4) (16, 9) (13, 5) (3, 16)
(11, 14) (5, 7) (8, 11) (10, 2)
(7, 15) (9, 6) (12, 10) (6, 3)
(14, 1) (4, 12) (1, 8) (15, 13)

Order-5 Oodo (五五圖)

This 5×5 magic-square construction generates a Positive-Number Diagram and a Negative-Number Diagram according to a symmetric placement principle and then combines them.

Positive-Number Diagram

1 23 16 4 21
15 14 7 18 11
24 17 13 9 2
20 8 19 12 6
5 3 10 22 25

Negative-Number Diagram

12 27 33 23 10
28 18 13 26 20
11 25 21 17 31
22 16 29 24 14
32 19 9 15 30

Superposition Diagram

(1, 12) (23, 27) (16, 33) (4, 23) (21, 10)
(15, 28) (14, 18) (7, 13) (18, 26) (11, 20)
(24, 11) (17, 25) (13, 21) (9, 17) (2, 31)
(20, 22) (8, 16) (19, 29) (12, 24) (6, 14)
(5, 32) (3, 19) (10, 9) (22, 15) (25, 30)

Order-7 Haengsudo (行數圖)

The order-7 magic square is transmitted under the distinctive historical scholarly name Haengsudo.

Positive-Number Diagram

46 8 16 20 29 7 49
3 40 35 36 18 41 2
44 12 33 23 19 38 6
28 26 11 25 39 24 22
5 37 31 27 17 13 45
48 9 15 14 32 10 47
1 43 34 30 21 42 4

Negative-Number Diagram

4 43 40 49 16 21 2
44 8 33 9 36 15 30
38 19 26 11 27 22 32
3 13 5 25 45 37 47
18 28 23 39 24 31 12
20 35 14 41 17 42 6
48 29 34 1 10 7 46

Superposition Diagram

(46, 4) (8, 43) (16, 40) (20, 49) (29, 16) (7, 21) (49, 2)
(3, 44) (40, 8) (35, 33) (36, 9) (18, 36) (41, 15) (2, 30)
(44, 38) (12, 19) (33, 26) (23, 11) (19, 27) (38, 22) (6, 32)
(28, 3) (26, 13) (11, 5) (25, 25) (39, 45) (24, 37) (22, 47)
(5, 18) (37, 28) (31, 23) (27, 39) (17, 24) (13, 31) (45, 12)
(48, 20) (9, 35) (15, 14) (14, 41) (32, 17) (10, 42) (47, 6)
(1, 48) (43, 29) (34, 34) (30, 1) (21, 10) (42, 7) (4, 46)

Order-8 Yeoksudo (易數圖)

The order-8 magic square is transmitted under the distinctive historical scholarly name Yeoksudo.

Positive-Number Diagram

61 4 3 62 2 63 64 1
52 13 14 51 15 50 49 16
45 20 19 46 18 47 48 17
36 29 30 35 31 34 33 32
5 60 59 6 58 7 8 57
12 53 54 11 55 10 9 56
21 44 43 22 42 23 24 41
28 37 38 27 39 26 25 40

Negative-Number Diagram

64 2 3 61 60 6 7 57
9 55 54 12 13 51 50 16
17 47 46 20 21 43 42 24
40 26 27 37 36 30 31 33
32 34 35 29 28 38 39 25
41 23 22 44 45 19 18 48
49 15 14 52 53 11 10 56
8 58 59 5 4 62 63 1

Superposition Diagram

(61, 64) (4, 2) (3, 3) (62, 61) (2, 60) (63, 6) (64, 7) (1, 57)
(52, 9) (13, 55) (14, 54) (51, 12) (15, 13) (50, 51) (49, 50) (16, 16)
(45, 17) (20, 47) (19, 46) (46, 20) (18, 21) (47, 43) (48, 42) (17, 24)
(36, 40) (29, 26) (30, 27) (35, 37) (31, 36) (34, 30) (33, 31) (32, 33)
(5, 32) (60, 34) (59, 35) (6, 29) (58, 28) (7, 38) (8, 39) (57, 25)
(12, 41) (53, 23) (54, 22) (11, 44) (55, 45) (10, 19) (9, 18) (56, 48)
(21, 49) (44, 15) (43, 14) (22, 52) (42, 53) (23, 11) (24, 10) (41, 56)
(28, 8) (37, 58) (38, 59) (27, 5) (39, 4) (26, 62) (25, 63) (40, 1)

Yukyukdo (六六圖)

This is a 6×6 magic square in which every row, column, and main diagonal sums to 111. The Gusu-ryak contains two forms of the Yukyukdo.

Both examples follow the same plan. Divide the 6×6 square into nine 2×2 blocks, and let L be the number of the Lo Shu L = (4 9 2 / 3 5 7 / 8 1 6) at the block's position. Every cell then holds

v = L + 9k, k ∈ {0, 1, 2, 3}
so each block contains the four numbers L, L+9, L+18, L+27 once each. The top-left block (L=4), for example, holds 4, 13, 22, 31, and the central block (L=5) holds 5, 14, 23, 32. Each block therefore sums to 4L+54, and the nine block sums 70 90 62 / 66 74 82 / 86 58 78 again follow the Lo Shu arrangement.

The 6×6 array of the k values has every row, column and main diagonal summing to 9. The Lo Shu part contributes 2×15=30 to each line and the k part 9×9=81, so each line sums to 30+81=111.

The two examples use the same four numbers in every block and differ only in how k is placed inside the blocks. Since 6 leaves remainder 2 on division by 4, no associative magic square (in which every two cells symmetric about the centre sum to 37) and no pandiagonal magic square (in which even the broken diagonals sum to 111) exists of this order. Neither example is therefore associative or pandiagonal.

Example 1

13 22 18 27 11 20
31 4 36 9 29 2
12 21 14 23 16 25
30 3 5 32 34 7
17 26 10 19 15 24
8 35 28 1 6 33

Example 2

4 13 36 27 29 2
22 31 18 9 11 20
3 21 23 32 25 7
30 12 5 14 16 34
17 26 19 28 6 15
35 8 10 1 24 33

Composite magic squares

Gusudo (九數圖)

The integers from 1 to 81 are arranged to form a magic square, while each small 3×3 block also forms a semimagic square. Every row, column, and main diagonal sums to 369. The internal 3×3 subgrids likewise exhibit magic-square properties or regular sum patterns.

Example 1

31 76 13 36 81 18 29 74 11
22 40 58 27 45 63 20 38 56
67 4 49 72 9 54 65 2 47
30 75 12 32 77 14 34 79 16
21 39 57 23 41 59 25 43 61
66 3 48 68 5 50 70 7 52
35 80 17 28 73 10 33 78 15
26 44 62 19 37 55 24 42 60
71 8 53 64 1 46 69 6 51

Example 2

50 18 55 70 5 48 3 76 44
66 31 26 29 81 13 52 11 60
7 74 42 24 37 62 68 36 19
54 67 2 65 25 33 28 23 72
59 21 43 9 41 73 15 61 47
10 35 78 49 57 17 80 39 4
79 6 38 20 69 34 32 64 27
30 71 22 45 1 77 16 51 56
14 46 63 58 53 12 75 8 40

Orthogonal Latin squares

The Gugumosu Byeongung Positive Diagram forms an order-9 Latin square in both rows and columns. Choi Seok-jeong recorded an order-9 pair of orthogonal Latin squares—a pandiagonal-like square built from orthogonal components—and thereby made the earliest known discovery of such a construction around 1700. The Parent-Number Diagrams (母數圖) encode the coordinates of the base pair, while the Child-Number Diagrams (子數圖) arrange the products of the nine-by-nine multiplication table. Both are presented in positive (陽圖) and negative (陰圖) forms with different placement principles.

Gugumosu Byeongung Positive Diagram (九九母數變宮陽圖)

This orthogonal Latin-square construction is formed by combining the base pair (a, b) from two Latin squares.

(5,1) (6,3) (4,2) (8,7) (9,9) (7,8) (2,4) (3,6) (1,5)
(4,3) (5,2) (6,1) (7,9) (8,8) (9,7) (1,6) (2,5) (3,4)
(6,2) (4,1) (5,3) (9,8) (7,7) (8,9) (3,5) (1,4) (2,6)
(2,7) (3,9) (1,8) (5,4) (6,6) (4,5) (8,1) (9,3) (7,2)
(1,9) (2,8) (3,7) (4,6) (5,5) (6,4) (7,3) (8,2) (9,1)
(3,8) (1,7) (2,9) (6,5) (4,4) (5,6) (9,2) (7,1) (8,3)
(8,4) (9,6) (7,5) (2,1) (3,3) (1,2) (5,7) (6,9) (4,8)
(7,6) (8,5) (9,4) (1,3) (2,2) (3,1) (4,9) (5,8) (6,7)
(9,5) (7,4) (8,6) (3,2) (1,1) (2,3) (6,8) (4,7) (5,9)

Gugumosu Byeongung Negative Diagram (九九母數變宮陰圖)

In this negative Parent-Number Diagram, both components take each of 1–9 exactly once inside every 3×3 palace. All 81 ordered pairs are distinct, but each component repeats within rows and columns, so it is not a Latin square.

(5,6) (9,2) (1,7) (7,8) (5,1) (3,6) (1,3) (9,4) (5,8)
(3,8) (4,4) (8,3) (2,4) (9,9) (4,2) (6,7) (2,2) (7,6)
(7,1) (2,9) (6,5) (6,3) (1,5) (8,7) (8,5) (4,9) (3,1)
(1,2) (8,4) (9,6) (6,4) (1,9) (8,2) (9,8) (6,2) (4,1)
(5,7) (3,3) (7,5) (7,3) (5,5) (3,7) (3,5) (7,7) (5,3)
(6,9) (4,8) (2,1) (2,8) (9,1) (4,6) (1,4) (2,6) (8,9)
(7,9) (6,1) (2,5) (2,3) (9,5) (4,7) (4,5) (8,1) (3,9)
(3,4) (8,8) (4,3) (8,6) (1,1) (6,8) (2,7) (6,6) (7,2)
(5,2) (1,6) (9,7) (7,4) (5,9) (3,2) (9,3) (1,8) (5,4)

Gugujasu Byeongung Positive Diagram (九九子數變宮陽圖)

This magic square places each of the 81 products a×b of the multiplication table once. With the Lo Shu L, each cell equals L(position of the palace) × L(position within the palace); it is not the product of the pair in the same cell of the positive Parent-Number Diagram. Every row, column, and main diagonal sums to 225.

16 36 8 36 81 18 8 18 4
12 20 28 27 45 63 6 10 14
32 4 24 72 9 54 16 2 12
12 27 6 20 45 10 28 63 14
9 15 21 15 25 35 21 35 49
24 3 18 40 5 30 56 7 42
32 72 16 4 9 2 24 54 12
24 40 56 3 5 7 18 30 42
64 8 48 8 1 6 48 6 36

Gugujasu Byeongung Negative Diagram (九九子數變宮陰圖)

This square arranges the 81 products of the multiplication table with symmetry about the secondary diagonal (upper right to lower left), giving every row and column a sum of 225. The main diagonal sums to 165 and the secondary diagonal to 285.

9 8 7 6 5 54 63 72 1
18 21 14 8 10 12 6 64 72
27 24 24 12 35 18 16 6 63
36 32 28 16 20 9 18 12 54
45 30 15 40 25 20 35 10 5
4 48 42 49 40 16 12 8 6
3 56 36 42 15 28 24 14 7
2 4 56 48 30 32 24 21 8
81 2 3 4 45 36 27 18 9

Order-10 Baekja (百子, “Hundred Numbers”) family

These are 10×10 squares of the Baekjado family recorded in manuscript copies of the Gusu-ryak. For the Baekjado, the original is shown with two rearrangements whose rows and columns sum to 505; for the Baekja Eumyang Jamo Chakjongdo, a corrected version fixes copying errors so that every row and column sums to 505. The Sunsudo and Gyosudo are ordered-pair squares and receive no numerical correction.

Baekjado (百子圖)

This is a 10×10 square in which every row and column sums to 505. The two main diagonals sum to 470 and 540 in the original and to 490 and 520 in the alternative rearrangement.

Original

1 20 21 40 41 60 61 80 81 100
99 82 79 62 59 42 39 22 19 2
3 18 23 38 43 58 63 78 83 98
97 84 77 64 57 44 37 24 17 4
5 16 25 36 45 56 65 76 85 96
95 86 75 66 55 46 35 26 15 6
14 7 34 27 54 47 74 67 94 87
88 93 68 73 48 53 28 33 8 13
12 9 32 29 52 49 72 69 92 89
91 90 71 70 51 50 31 30 11 10

Alternative rearrangement

1 20 21 40 41 60 61 80 81 100
99 82 79 62 59 42 39 22 19 2
3 18 23 38 43 58 63 78 83 98
97 84 77 64 57 44 37 24 17 4
96 86 75 66 55 46 35 26 15 5
6 16 25 36 45 56 65 76 85 95
87 7 34 27 54 47 74 67 94 14
13 93 68 73 48 53 28 33 8 88
12 9 32 29 52 49 72 69 92 89
91 90 71 70 51 50 31 30 11 10

Differences from the original

Coordinate (row, column) Original value Rearranged value Numerical change
(row 5, column 1) 5 96 +91
(row 5, column 2) 16 86 +70
(row 5, column 3) 25 75 +50
(row 5, column 4) 36 66 +30
(row 5, column 5) 45 55 +10
(row 5, column 6) 56 46 -10
(row 5, column 7) 65 35 -30
(row 5, column 8) 76 26 -50
(row 5, column 9) 85 15 -70
(row 5, column 10) 96 5 -91
(row 6, column 1) 95 6 -89
(row 6, column 2) 86 16 -70
(row 6, column 3) 75 25 -50
(row 6, column 4) 66 36 -30
(row 6, column 5) 55 45 -10
(row 6, column 6) 46 56 +10
(row 6, column 7) 35 65 +30
(row 6, column 8) 26 76 +50
(row 6, column 9) 15 85 +70
(row 6, column 10) 6 95 +89
(row 7, column 1) 14 87 +73
(row 7, column 10) 87 14 -73
(row 8, column 1) 88 13 -75
(row 8, column 10) 13 88 +75

Rearrangement (Hong Jeong-ha)

99 82 79 62 59 42 39 22 19 2
1 20 21 40 41 60 61 80 81 100
3 18 23 38 43 58 63 78 83 98
97 84 77 64 57 44 37 24 17 4
5 16 25 36 45 56 65 76 85 96
95 86 75 66 55 46 35 26 15 6
14 7 34 27 54 47 74 67 94 87
88 93 68 73 48 53 28 33 8 13
91 90 71 70 51 50 31 30 11 10
12 9 32 29 52 49 72 69 92 89

In this rearrangement, each row splits into adjacent pairs summing to one of 21, 61, 101, 141, or 181; and each column has adjacent pairs summing to one of 99, 100, 102, or 103.

Differences from the original

Operation performed
Rows 1 and 2 swapped
Rows 9 and 10 swapped

Baekja Eumyang Chakjongdo (百子陰陽錯綜圖)

The work presents two order-10 Latin squares as its bases: separate child-number and parent-number Latin-square grids.

Child-number Latin square (百子子數陰陽錯綜圖)

10 9 8 7 6 5 4 3 2 1
1 10 9 8 7 6 5 4 3 2
2 1 10 9 8 7 6 5 4 3
3 2 1 10 9 8 7 6 5 4
4 3 2 1 10 9 8 7 6 5
5 4 3 2 1 10 9 8 7 6
6 5 4 3 2 1 10 9 8 7
7 6 5 4 3 2 1 10 9 8
8 7 6 5 4 3 2 1 10 9
9 8 7 6 5 4 3 2 1 10

Parent-number Latin square (百子母數陰陽錯綜圖)

0 1 2 3 4 5 6 7 8 9
9 0 1 2 3 4 5 6 7 8
8 9 0 1 2 3 4 5 6 7
7 8 9 0 1 2 3 4 5 6
6 7 8 9 0 1 2 3 4 5
5 6 7 8 9 0 1 2 3 4
4 5 6 7 8 9 0 1 2 3
3 4 5 6 7 8 9 0 1 2
2 3 4 5 6 7 8 9 0 1
1 2 3 4 5 6 7 8 9 0

Composed array

  • Note: The original Gusu-ryak records only two separate Latin squares: the Baekja Child-Number Yin–Yang Interwoven Diagram (1–10) and the Baekja Parent-Number Yin–Yang Interwoven Diagram (0–9); no composed array appears in the book. The array below places the parent number in the tens digit and the child number in the units digit. Because child = 10 − parent (child 10 when parent is 0), the two Latin squares are not orthogonal, and the composition is a cyclic array in which the ten values 10, 19, …, 91 each appear once per row and column. Rows and columns sum to 505, but it is not a 1–100 magic square; the main diagonals sum to 100 and 550.
10 19 28 37 46 55 64 73 82 91
91 10 19 28 37 46 55 64 73 82
82 91 10 19 28 37 46 55 64 73
73 82 91 10 19 28 37 46 55 64
64 73 82 91 10 19 28 37 46 55
55 64 73 82 91 10 19 28 37 46
46 55 64 73 82 91 10 19 28 37
37 46 55 64 73 82 91 10 19 28
28 37 46 55 64 73 82 91 10 19
19 28 37 46 55 64 73 82 91 10

Baekja Saengseong Sunsudo (百子生成純數圖)

Sunsudo is an order-ten 50-orthogonal Latin-square pair, recorded as ordered pairs (a,b). A two-digit entry is split into its digits; 10 is (0,10) and a one-digit entry such as 7 is (0,7); a two-digit entry ending in 0 has second component 10, so 90=(9,10). Each component is a Latin square, and the superposition contains 50 ordered pairs, each twice. It is not a magic square of decimal cell values. Its distinctive additional property is 180-degree rotational symmetry: every pair recurs at its antipodal position.

(9,10) (8,9) (7,8) (6,7) (5,6) (4,5) (3,4) (2,3) (1,2) (0,1)
(8,6) (7,10) (6,9) (5,8) (9,7) (0,4) (4,3) (3,2) (2,1) (1,5)
(7,7) (6,6) (5,10) (9,9) (8,8) (1,3) (0,2) (4,1) (3,5) (2,4)
(6,8) (5,7) (9,6) (8,10) (7,9) (2,2) (1,1) (0,5) (4,4) (3,3)
(5,9) (9,8) (8,7) (7,6) (6,10) (3,1) (2,5) (1,4) (0,3) (4,2)
(4,2) (0,3) (1,4) (2,5) (3,1) (6,10) (7,6) (8,7) (9,8) (5,9)
(3,3) (4,4) (0,5) (1,1) (2,2) (7,9) (8,10) (9,6) (5,7) (6,8)
(2,4) (3,5) (4,1) (0,2) (1,3) (8,8) (9,9) (5,10) (6,6) (7,7)
(1,5) (2,1) (3,2) (4,3) (0,4) (9,7) (5,8) (6,9) (7,10) (8,6)
(0,1) (1,2) (2,3) (3,4) (4,5) (5,6) (6,7) (7,8) (8,9) (9,10)

Baekja Saengseong Gyosudo (百子生成交數圖)

This is an order-ten 50-orthogonal Latin-square pair, whose cells are ordered pairs (a,b). Its superposition contains 50 ordered pairs, each occurring twice; it is not a magic square. The pairs must not be collapsed into decimal integers or numerically corrected to force line sums of 505.

Correct transcription

(0,10) (1,9) (2,8) (3,7) (4,6) (5,5) (6,4) (7,3) (8,2) (9,1)
(1,6) (2,0) (3,9) (4,8) (0,7) (9,4) (5,3) (6,2) (7,1) (8,5)
(2,7) (3,6) (4,0) (0,9) (1,8) (8,3) (9,2) (5,1) (6,5) (7,4)
(3,8) (4,7) (0,6) (1,10) (2,9) (7,2) (8,1) (9,5) (5,4) (6,3)
(5,9) (0,8) (1,7) (2,6) (3,0) (6,1) (7,5) (8,4) (9,3) (4,2)
(4,2) (9,3) (8,4) (7,5) (6,1) (3,0) (2,6) (1,7) (0,8) (5,9)
(6,3) (5,4) (9,5) (8,1) (7,2) (2,9) (1,10) (0,6) (4,7) (3,8)
(7,4) (6,5) (5,1) (9,2) (8,3) (1,8) (0,9) (4,0) (3,6) (2,7)
(8,5) (7,1) (6,2) (5,3) (9,4) (0,7) (4,8) (3,9) (2,0) (1,6)
(9,1) (8,2) (7,3) (6,4) (5,5) (4,6) (3,7) (2,8) (1,9) (0,10)

Baekja Eumyang Jamo Chakjongdo (百子陰陽子母錯綜圖)

The original uses each of 1–100 once, but rows 5–6 and columns 3 and 8 do not sum to 505. The corrected version fixes five cells so that every row and column sums to 505; it is semi-magic, with main-diagonal sums of 590 and 420.

Original

100 89 78 67 56 45 34 23 12 1
29 28 47 36 10 91 65 54 73 72
48 17 26 40 39 62 61 75 84 53
27 46 50 9 88 13 92 51 55 74
76 80 59 98 87 14 3 32 21 25
15 31 42 43 4 97 58 69 70 86
24 35 41 2 83 18 99 60 66 77
93 94 85 71 52 49 30 16 7 8
82 63 64 95 81 20 6 37 38 19
11 22 33 44 5 96 57 68 79 90

Corrected version

100 89 78 67 56 45 34 23 12 1
29 28 54 36 10 91 65 47 73 72
48 17 26 40 39 62 61 75 84 53
27 46 50 9 88 13 92 51 55 74
76 80 42 98 87 14 3 59 21 25
15 31 32 43 4 97 58 69 70 86
24 35 41 2 83 18 99 60 66 77
93 94 85 71 52 49 30 16 7 8
82 63 64 95 81 20 6 37 38 19
11 22 33 44 5 96 57 68 79 90

Corrections

Coordinate (row, column) Original value Corrected value Numerical change
(row 2, column 3) 47 54 +7
(row 2, column 8) 54 47 −7
(row 5, column 3) 59 42 −17
(row 5, column 8) 32 59 +27
(row 6, column 3) 42 32 −10

Notes

In-depth study

Computed properties of every square and a comparison with magic-square families (associative, pandiagonal, compact, compound, Latin decomposition and others) are collected in In-depth Study of Gusuryak Squares.

Clone this wiki locally