Latin Square — Definition, Formula & Examples
A Latin square is an grid filled with distinct symbols, arranged so that each symbol appears exactly once in every row and exactly once in every column.
A Latin square of order is an array over a set of symbols such that for each , the map is a bijection from to , and for each , the map is a bijection from to .
How It Works
To construct a Latin square, start by placing the symbols in any order across the first row. For each subsequent row, rearrange the symbols so that no column repeats a symbol already used above it. One simple method is cyclic shifting: rotate the previous row one position to the left. Not all Latin squares can be generated this way, but it guarantees a valid result.
Worked Example
Problem: Construct a Latin square of order 3 using the symbols {1, 2, 3}.
Row 1: Place the symbols in their natural order.
Row 2: Shift Row 1 one position to the left (cyclically).
Row 3: Shift Row 2 one position to the left. Verify every column also contains each symbol exactly once.
Answer: The completed Latin square is: Each of the symbols 1, 2, 3 appears exactly once in every row and every column.
Why It Matters
Latin squares are the mathematical foundation of Sudoku puzzles (a Sudoku is a Latin square with additional block constraints). In statistics, they form the basis of Latin square experimental designs, which let researchers control for two sources of variability simultaneously. They also appear in coding theory, cryptography, and the study of quasigroups in abstract algebra.
Common Mistakes
Mistake: Confusing a Latin square with a magic square.
Correction: A magic square requires rows, columns, and diagonals to sum to the same value. A Latin square requires each symbol to appear exactly once per row and column — there is no summation condition and no diagonal constraint.
