4.3 Magic Squares, Latin Grids, Sudoku Variants & Relational Matrix Tables

Key Takeaways

  • In any n×nn \times n Latin Square or Sudoku variant, every symbol appears once per row and column; Sudoku adds a specified sub-block condition, with each complete line of numbers {1,…,n}\{1, \dots, n\} summing to Sn=n(n+1)2S_n = \frac{n(n+1)}{2} (S4=10S_4 = 10, S5=15S_5 = 15, S6=21S_6 = 21)

  • Never fill an entire Latin or Sudoku grid on the TR-YÖS; use Intersection Elimination (Row-Column-Box Cross-Out) and Hidden Singles to isolate only the target cells (X,YX, Y) requested by the prompt

  • In any 3×33 \times 3 arithmetic Magic Square ('Sihirli Kare'), the magic constant MM equals three times the center cell (M=3cM = 3c), the sum of all 9 cells equals 9c9c, and every opposite pair across the center sums to 2c2c

  • The Corner-Edge Mean Law states that any corner cell of a 3×33 \times 3 magic square equals the arithmetic mean of the two non-adjacent edge midpoints (Corner=Edge1+Edge22\text{Corner} = \frac{\text{Edge}_1 + \text{Edge}_2}{2}), solving sparse magic squares even when MM and cc are unknown

  • In N×NN \times N Skyscraper ('Apartmanlar') grids, a marginal clue of 11 forces the tallest building NN into the immediately adjacent border cell, while a clue of NN forces the ascending sequence (1,2,…,N)(1, 2, \dots, N) along that line

Last updated: October 2026

Magic Squares, Latin Grids, Sudoku Variants & Relational Matrix Tables

Quick Strategy: For these independent grid exercises, begin with the requested target cells; solve additional cells if the target requires them. For Latin Squares and Sudoku variants, cross out symbols along the row and column intersecting the target cell XX. For 3×33 \times 3 Magic Squares (Sihirli Kareler), memorize two algebraic identities that bypass trial-and-error completely: the magic sum is always three times the center cell (M=3cM = 3c), and every corner cell is the average of the two non-adjacent edge cells (Corner=Edge1+Edge22\text{Corner} = \frac{\text{Edge}_1 + \text{Edge}_2}{2}).


Latin Squares & Shape/Number Sudoku (4×44 \times 4, 5×55 \times 5, 6×66 \times 6)

An n×nn \times n Latin Square is a grid filled with nn distinct symbols—typically digits {1,2,…,n}\{1, 2, \dots, n\}, letters {A,B,… }\{A, B, \dots\}, or geometric shapes {△,□,◯,◊,⋆}\{\triangle, \square, \bigcirc, \lozenge, \star\}—such that every symbol appears exactly once in each row and once in each column.

In Sudoku Variants, the grid imposes one additional regional constraint:

  • 4×44 \times 4 Mini-Sudoku: Partitioned into four bold 2×22 \times 2 sub-boxes, each containing {1,2,3,4}\{1, 2, 3, 4\}.
  • 6×66 \times 6 Semi-Sudoku: Partitioned into six bold 2×32 \times 3 rectangular blocks, each containing {1,2,3,4,5,6}\{1, 2, 3, 4, 5, 6\}.
  • Diagonal Latin Square (Köşegen Sudoku): Both main diagonals must also contain all nn symbols without repetition.

Target-Focused Deduction Techniques

Because the exam only asks for the value of one or two labeled cells (XX or X+YX + Y), filling every empty square wastes valuable time. Instead, use two rapid elimination methods:

  1. Intersection Elimination (Naked Single / Kesişim Elemesi): To find the symbol in cell (r,c)(r, c), take the union of all symbols already visible in Row rr, Column cc, and (if applicable) its bold sub-block. Whenever n−1n - 1 distinct symbols appear in that combined peer group, the single missing symbol is forced into (r,c)(r, c).
  2. Hidden Single (Gizli Tekli) via Column/Row Blocking: Suppose you need cell (r,c)(r, c), and Row rr still has three empty cells: (r,c1),(r,c2),(r,c3)(r, c_1), (r, c_2), (r, c_3). If symbol SS already appears in Column c1c_1 and in Column c2c_2, then SS is blocked from both (r,c1)(r, c_1) and (r,c2)(r, c_2) and must go into (r,c3)(r, c_3)—even if you have no idea what the other two cells in Row rr contain!
  3. The Line-Sum Invariant: In any numerical n×nn \times n Latin square using {1,2,…,n}\{1, 2, \dots, n\}, the sum of every complete row, column, or sub-block is fixed:
Sn=n(n+1)2  ⟹  S4=10,S5=15,S6=21S_n = \frac{n(n+1)}{2} \implies S_4 = 10,\quad S_5 = 15,\quad S_6 = 21

3×33 \times 3 Arithmetic Magic Squares (Sihirli Kareler)

A 3×33 \times 3 Magic Square is a numerical grid in which all 3 rows, all 3 columns, and both 3-cell main diagonals sum to the exact same Magic Constant MM (Sihirli Toplam):

[a1,1a1,2a1,3a2,1ca2,3a3,1a3,2a3,3]\begin{bmatrix} a_{1,1} & a_{1,2} & a_{1,3} \\ a_{2,1} & c & a_{2,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{bmatrix}

Instead of setting up nine messy linear equations, use two golden theorems that simplify a specified 3-by-3 magic-square problem.

Golden Formula 1: The Center Cell & Opposite-Pair Law (M=3cM = 3c)

Add the four lines that pass directly through the center cell c=a2,2c = a_{2,2} (Row 2, Column 2, Main Diagonal, and Anti-Diagonal):

Row2+Col2+Diag1+Diag2=4M\text{Row}_2 + \text{Col}_2 + \text{Diag}_1 + \text{Diag}_2 = 4M

Every outer cell is included exactly once in this sum, while the center cell cc is included four times (three extra times beyond the sum of all 9 cells, which equals 3M3M):

3M+3c=4M  ⟹  M=3candc=M33M + 3c = 4M \implies M = 3c \quad \text{and} \quad c = \frac{M}{3}
  • Total Grid Sum: The sum of all 9 numbers in the magic square is always 3M=9c3M = 9c.
  • Symmetric Opposite Pairs: Since every line through the center sums to M=3cM = 3c, any two cells symmetrically opposite across the center sum to 2c2c (so cc is the exact arithmetic mean of every opposite pair):
a1,1+a3,3=a1,3+a3,1=a1,2+a3,2=a2,1+a2,3=2ca_{1,1} + a_{3,3} = a_{1,3} + a_{3,1} = a_{1,2} + a_{3,2} = a_{2,1} + a_{2,3} = 2c

Golden Formula 2: The Corner-Edge Mean Law (Köşe-Kenar Ortalaması)

What if a TR-YÖS problem gives you a sparse magic square where neither MM nor the center cell cc is known? Use the Corner-Edge Mean Law:

Every corner cell equals the arithmetic mean of the two non-adjacent edge midpoints (the two edge cells that do not share a row or column with that corner):

a1,1=a3,2+a2,32,a1,3=a3,2+a2,12,a3,1=a1,2+a2,32,a3,3=a1,2+a2,12a_{1,1} = \frac{a_{3,2} + a_{2,3}}{2}, \quad a_{1,3} = \frac{a_{3,2} + a_{2,1}}{2}, \quad a_{3,1} = \frac{a_{1,2} + a_{2,3}}{2}, \quad a_{3,3} = \frac{a_{1,2} + a_{2,1}}{2}
  • Quick Proof: In Row 3 and Column 3, a3,1+a3,2+a3,3=Ma_{3,1} + a_{3,2} + a_{3,3} = M and a1,3+a2,3+a3,3=Ma_{1,3} + a_{2,3} + a_{3,3} = M. Adding these gives (a3,1+a1,3)+a3,2+a2,3+2a3,3=2M(a_{3,1} + a_{1,3}) + a_{3,2} + a_{2,3} + 2a_{3,3} = 2M. Since the anti-diagonal gives a3,1+a1,3=2ca_{3,1} + a_{1,3} = 2c and a1,1+a3,3=2c  ⟹  a3,3=2c−a1,1a_{1,1} + a_{3,3} = 2c \implies a_{3,3} = 2c - a_{1,1}, substituting and using 2M=6c2M = 6c yields:
2c+a3,2+a2,3+4c−2a1,1=6c  ⟹  2a1,1=a3,2+a2,32c + a_{3,2} + a_{2,3} + 4c - 2a_{1,1} = 6c \implies 2a_{1,1} = a_{3,2} + a_{2,3}

Skyscraper (Apartmanlar) & Marginal Sum-Clue Grids

In a Skyscraper (Apartmanlar) puzzle, an N×NN \times N Latin square contains building heights {1,2,…,N}\{1, 2, \dots, N\} in every row and column. Numbers placed outside the border indicate how many buildings are visible when looking along that row or column from that side (taller buildings hide all shorter buildings behind them).

  • Clue =1= 1: The tallest building NN must stand in the very first cell immediately adjacent to the clue (blocking all N−1N - 1 buildings behind it).
  • Clue =N= N: Every single building is visible, forcing the strictly ascending sequence (1,2,3,…,N)(1, 2, 3, \dots, N) starting from the clue.
  • Clue =2= 2 with NN at the Far End: If building NN is in the last cell of a row, then whichever building stands in the first cell must hide every intermediate building before NN, forcing N−1N - 1 into the first cell.
  • Extreme Pair (1,2)(1, 2) Across a Row: If the left clue is 11 and the right clue is 22, then NN is in the leftmost cell and N−1N - 1 is in the rightmost cell!

In Marginal Sum-Clue / Mine-Count Grids, numbers along the top and left borders specify either the sum of values inside shaded cells or the count of black squares/stars in that row or column. Always start with rows/columns whose clue is 00 (cross out the entire line) or equals the full line capacity, then propagate forced cells into intersecting lines.


Grid Constraint & Magic Square Reference Table

Grid Puzzle TypeCore Algebraic / Logical RuleInstant Shortcut FormulaPrimary Exam Application
n×nn \times n Latin / SudokuEach symbol {1,…,n}\{1,\dots,n\} once per row, col, (and box)Line sum Sn=n(n+1)2S_n = \frac{n(n+1)}{2}Cross out row/col/box peers of target cell XX
3×33 \times 3 Magic Square (Center)All rows, cols, and diagonals sum to MMM=3cM = 3c and Total=9c\text{Total} = 9cFind MM from center cc, or cc from MM
3×33 \times 3 Magic Square (Pairs)Opposite cells across center are symmetricaopp1+aopp2=2ca_{\text{opp1}} + a_{\text{opp2}} = 2cFind opposite cell when center cc is known
3×33 \times 3 Magic Square (Corner)Corner relates to the 2 non-adjacent edgesCorner=Edge1+Edge22\text{Corner} = \frac{\text{Edge}_1 + \text{Edge}_2}{2}Solve sparse grids when MM and cc are unknown
N×NN \times N Skyscraper GridTaller numbers hide shorter ones behind themClue 1  ⟹  N1 \implies N first; Clue N  ⟹  (1,…,N)N \implies (1,\dots,N)Place NN and N−1N-1 first, then finish as Latin square

Worked Examples

Worked Example 1: Solving a Sparse 3×33 \times 3 Magic Square in 10 Seconds

Problem: In a 3×33 \times 3 arithmetic magic square where every row, column, and main diagonal has the same sum MM, only three entries are given:

  • Top-Middle Edge a1,2=19a_{1,2} = 19
  • Middle-Left Edge a2,1=17a_{2,1} = 17
  • Bottom-Left Corner a3,1=16a_{3,1} = 16

Find the Bottom-Right Corner a3,3a_{3,3}, the Center Cell c=a2,2c = a_{2,2}, and the Magic Constant MM.

Step-by-Step Solution:

  1. Find Bottom-Right Corner a3,3a_{3,3} via the Corner-Edge Mean Law: The two non-adjacent edge midpoints opposite to a3,3a_{3,3} are a1,2=19a_{1,2} = 19 and a2,1=17a_{2,1} = 17:
a3,3=a1,2+a2,12=19+172=18a_{3,3} = \frac{a_{1,2} + a_{2,1}}{2} = \frac{19 + 17}{2} = 18
  1. Find Middle-Right Edge a2,3a_{2,3} via the Corner-Edge Mean Law on a3,1a_{3,1}: The corner a3,1=16a_{3,1} = 16 is the average of its two non-adjacent edges a1,2=19a_{1,2} = 19 and a2,3a_{2,3}:
16=19+a2,32  ⟹  19+a2,3=32  ⟹  a2,3=1316 = \frac{19 + a_{2,3}}{2} \implies 19 + a_{2,3} = 32 \implies a_{2,3} = 13
  1. Find Center cc and Magic Constant MM: Since a2,1=17a_{2,1} = 17 and a2,3=13a_{2,3} = 13 are opposite across the center:
2c=a2,1+a2,3=17+13=30  ⟹  c=15,M=3c=452c = a_{2,1} + a_{2,3} = 17 + 13 = 30 \implies c = 15, \quad M = 3c = 45

(Indeed, the complete magic square of consecutive integers 11…1911 \dots 19 is [12,19,14;  17,15,13;  16,11,18][12, 19, 14;\; 17, 15, 13;\; 16, 11, 18].)

Worked Example 2: 4×44 \times 4 Skyscraper & Latin Square Deduction

Problem: A 4×44 \times 4 Skyscraper grid uses building heights {1,2,3,4}\{1, 2, 3, 4\} in each row and column.

  • The Top clues (looking down Columns 1 to 4) are: Col 1=4,  Col 2=1,  Col 3=2,  Col 4=2\text{Col 1} = 4,\; \text{Col 2} = 1,\; \text{Col 3} = 2,\; \text{Col 4} = 2.
  • The Right clue looking left along Row 2 is 11.

Determine the exact building height in cell (2,3)(2, 3) (Row 2, Column 3).

Step-by-Step Solution:

  1. Apply the Top Clue 44 on Column 1: A clue of 44 forces Column 1 from top to bottom to be (1,2,3,4)T(1, 2, 3, 4)^T, so a1,1=1,  a2,1=2,  a3,1=3,  a4,1=4a_{1,1} = 1,\; a_{2,1} = 2,\; a_{3,1} = 3,\; a_{4,1} = 4.
  2. Apply the Clue 11s to Place All Four 44s:
    • Top clue Col 2=1  ⟹  a1,2=4\text{Col 2} = 1 \implies a_{1,2} = 4.
    • Right clue on Row 2 =1  ⟹  a2,4=4= 1 \implies a_{2,4} = 4.
    • Since 44 is already placed in Columns 1, 2, and 4 (at a4,1,a1,2,a2,4a_{4,1}, a_{1,2}, a_{2,4}), the remaining 44 in Column 3 must sit in Row 3: a3,3=4a_{3,3} = 4.
  3. Solve Row 2: In Row 2, we already have a2,1=2a_{2,1} = 2 and a2,4=4a_{2,4} = 4, leaving {1,3}\{1, 3\} for a2,2a_{2,2} and a2,3a_{2,3}. In Row 1, since a1,1=1a_{1,1} = 1 and a1,2=4a_{1,2} = 4, the remaining cells a1,3a_{1,3} and a1,4a_{1,4} must be {2,3}\{2, 3\}. Because the Top clue for Column 3 is 22 and a3,3=4a_{3,3} = 4, cell a2,3a_{2,3} cannot be taller than a1,3a_{1,3} (otherwise a1,3,a2,3,4a_{1,3}, a_{2,3}, 4 would all be visible from the top of Column 3, giving 3 visible buildings instead of 2). Choosing a2,3=3a_{2,3} = 3 would force a1,3=2<3<4a_{1,3} = 2 < 3 < 4, which violates the clue of 22. Therefore, a2,3=1a_{2,3} = 1!

Review the Method

In N×NN \times N Skyscraper ('Apartmanlar') grids, a marginal clue of 11 forces the tallest building NN into the immediately adjacent border cell, while a clue of NN forces the ascending sequence (1,2,…,N)(1, 2, \dots, N) along that line

Test Your Knowledge

In a 3x3 arithmetic magic square (Sihirli Kare), every row, column, and main diagonal sums to the magic constant M. You are given only two cells: the top-middle edge cell a(1,2) = 14 and the middle-right edge cell a(2,3) = 22. What is the exact value of the bottom-left corner cell a(3,1)?

A

16

B

36

C

8

D

18

Test Your Knowledge

In a 3x3 arithmetic magic square, the sum of all nine numbers in the grid is 135, and the top-left corner cell is a(1,1) = 11. What are the values of the center cell c = a(2,2) and the bottom-right corner cell a(3,3)?

A

Center c = 45 and bottom-right corner a(3,3) = 34

B

Center c = 15 and bottom-right corner a(3,3) = 19

C

Center c = 15 and bottom-right corner a(3,3) = 34

D

Center c = 27 and bottom-right corner a(3,3) = 16

Test Your Knowledge

A 5x5 Latin Square is filled with the five integers {1, 2, 3, 4, 5} so that each integer appears exactly once in every row and every column. Looking at target cell (4, 2) (Row 4, Column 2), you observe that Row 4 already contains {2, 5} and Column 2 already contains {1, 2, 4}. What value must be placed in cell (4, 2), and what is the sum of all five numbers in any complete row?

A

Cell (4, 2) = 3, and each row sums to 10

B

Cell (4, 2) = 4, and each row sums to 15

C

Cell (4, 2) = 3, and each row sums to 15

D

Cell (4, 2) = 1, and each row sums to 25

Test Your Knowledge

In a 4x4 Skyscraper ('Apartmanlar') grid where each row contains buildings of heights {1, 2, 3, 4}, the clue on the Left side of Row 1 is 1, and the clue on the Right side of Row 1 is 2. Which building heights are forced into the leftmost cell a(1,1) and the rightmost cell a(1,4) of Row 1?

A

a(1,1) = 4 and a(1,4) = 3

B

a(1,1) = 1 and a(1,4) = 4

C

a(1,1) = 4 and a(1,4) = 2

D

a(1,1) = 3 and a(1,4) = 4

Sections you finish are checked off in the contents.