Latin Squares and Orthogonality
How many ways can you schedule a round-robin tournament? Every pair of players must meet exactly once. Can you simultaneously track a second attribute — say, court assignments — without collisions? This scheduling instinct is exactly the combinatorial content of a Latin square. It is an array filled with symbols. No symbol repeats in any row or column. Latin squares are the purest algebraic combinatorial object after the design itself. They sit at the crossing of algebra (they are the multiplication tables of quasigroups), combinatorics (they encode 1-factorizations and resolvable designs), and geometry (they build projective planes). The deeper question is not existence of a single Latin square — that is easy. Instead, it asks how many independent Latin squares of the same order can coexist. Two Latin squares are orthogonal if, when superimposed, every ordered pair of symbols appears exactly once. This innocuous-looking definition governs several things. It decides whether you can design an experiment testing two treatment factors simultaneously with no confounding. It decides whether a finite projective plane of a given order exists. It also decides whether an error-correcting code of a certain type can be built. The question "how many mutually orthogonal Latin squares of order exist" is one of the great open problems of finite combinatorics. It is resolved completely only for a handful of small . This article develops the theory rigorously from the definition of a Latin square. It proceeds through the fundamental bound on families of mutually orthogonal Latin squares (MOLS). It ends with the equivalence between complete sets of MOLS and affine/projective planes. We prove the MOLS bound in full. We exhibit orthogonal squares of order 4 and order 5 with fully worked verification. We show precisely why the bound fails to be achieved for most orders — most famously Euler's conjecture about order 6, disproved only in 1959. By the end, you will have a self-contained toolkit. It includes the formal definitions, and the central inequality . It includes the proof via a counting argument on a single square. It includes the construction of complete sets from finite fields. Finally, it includes the bridge — foreshadowed but not built here — connecting a complete set of MOLS of order to a projective plane of order .
- A Latin square of order is an array over symbols with no repeats in any row or column.
- Two Latin squares are orthogonal if superimposing them produces every ordered pair of symbols exactly once.
- A set of Latin squares that is pairwise orthogonal is called a set of MOLS; denotes the maximum size of such a set.
- The fundamental bound is , proved by a normalization-and-counting argument.
- When the set is complete, and complete sets of order are equivalent to projective planes of order .
- Existence of MOLS is governed by finite fields (when is a prime power, ), but is famously subtle otherwise — Euler's order-6 conjecture failed.
- Key idea: orthogonality of Latin squares is a combinatorial resource that measures how many "independent coordinate systems" an order- grid can carry, and this resource caps out at exactly .
Where this lives today
Mutually orthogonal Latin squares underlie statistical experimental design: Graeco-Latin square designs let statisticians block out two nuisance factors while estimating a treatment effect, exactly using an orthogonal pair to guarantee no confounding between blocking variables — this is R. A. Fisher's original motivation for popularizing Latin square designs in agricultural field trials. In combinatorial design theory, a complete set of MOLS of order is equivalent to the existence of a projective plane of order : the MOLS supply the "parallel classes" of lines in an affine plane of order , which extends uniquely to a projective plane. This equivalence is the reason the existence question for MOLS of a given order is so consequential — settling for a given can settle the existence of a projective plane of that order, as famously happened for (no projective plane of order 10 exists, a landmark computer-assisted proof by Lam, Thiel, and Swiercz in 1989, closely tied to MOLS non-existence results). In coding theory, MOLS constructions yield maximum-distance-separable (MDS) codes and are used to build orthogonal arrays , which in turn underlie constructions of error-correcting codes and are central objects connecting back to Combinatorial Designs and BIBDs. In cryptography, Latin squares serve as the combinatorial skeleton of certain block cipher S-boxes and secret-sharing schemes, where orthogonality guarantees uniform, collision-free key/output distributions. In computer science, MOLS appear in constructions of resolvable designs used for scheduling round-robin tournaments and for constructing families of hash functions with strong independence guarantees.
Ask the tutor: How does a complete set of MOLS of order get turned, step by step, into the lines of a finite projective plane?
Let be an integer and fix a symbol set with . A Latin square of order is a function , written as an array with entry in row , column , such that:
- for each fixed row , the map is a bijection (no symbol repeats in a row);
- for each fixed column , the map is a bijection (no symbol repeats in a column).
Two Latin squares of the same order on symbol sets (each of size ) are orthogonal, written , if the map
is a bijection from to . Equivalently, superimposing the two arrays produces each of the ordered pairs exactly once. A family of Latin squares of order is a set of mutually orthogonal Latin squares (MOLS) if for every pair . Define
A set of MOLS of order is called a complete set.
Intuition
Think of a Latin square as a valid seating chart: row = a person, column = a time slot, entry = which topic they discuss. Latin-ness guarantees each person discusses each topic exactly once, and at each time slot every topic is being discussed by exactly one person. Now add a second square recording, say, which room each person uses at each time slot. Orthogonality says: knowing the topic and the room together at a given time-slot pins down the person uniquely — no two people share a (topic, room) pair. This is precisely the classical Graeco-Latin square picture (Euler's Latin and Greek letters superimposed), and it is exactly the requirement of a two-factor experimental design with no confounding between factors. The reason cannot grow without bound is a rigidity phenomenon: once you fix one Latin square and normalize how a second one interacts with a single row of the first, there are only "genuinely different directions" left for further squares to point without colliding with each other. This is the combinatorial heart of the bound proved below.
Let be an integer. Then any set of mutually orthogonal Latin squares of order has size at most ; that is,
We use a normalization-and-double-counting argument.
Step 1: Normalize. Let be a set of MOLS of order , each on symbol set (relabeling symbols does not affect orthogonality, since orthogonality is defined via a bijection condition invariant under relabeling each square independently). Since the first row of each is a bijection , we may relabel the symbols of (a bijective renaming of , applied uniformly to every entry of ) so that its first row reads in order. This relabeling changes nothing about whether is Latin (relabeling a Latin square's symbols yields a Latin square) and nothing about orthogonality between any : if is a permutation applied to relabel 's symbols, then is a bijection to if and only if is, because is itself a bijection of . So after relabeling, we may assume:
Step 2: Examine the entries in position . Consider the entries , i.e. the symbol each square places in row 2, column 1. Claim: for each , . Indeed, by the normalization in Step 1 (taking ). Since column 1 of is a bijection onto (Latin property), the symbol appears in column 1 exactly once, already at row 1. Hence . Claim: for , . Suppose toward contradiction that for some . We already know from Step 1. So the ordered pair takes the value at , and it takes the value at . Now consider whether could reoccur elsewhere among these two entries, or rather, let us directly locate a repeated pair. We already have one occurrence of the pair at position . We claim the pair occurring at forces no immediate contradiction by itself — instead we argue as follows using the pigeonhole structure of orthogonality directly. Because , the map hits each of the pairs in exactly once. In particular the pair occurs exactly once among all cells. We have exhibited it occurring at cell . This alone is not yet a contradiction — the contradiction requires comparing against a second occurrence, which we now produce. Consider row 1 of both squares: for every (both were normalized identically in Step 1). Taking , we get and , so the pair also occurs at cell . If , then as cells (they have different rows already since row indices are vs ), so the pair occurs at two distinct cells, and , contradicting orthogonality of (each pair occurs exactly once). If , then , and we would need — true, they are distinct cells — and the pair occurs at both and , again two distinct cells with the same pair, again contradicting orthogonality. Either way we reach a contradiction. Hence for all .
Step 3: Conclude the bound. By Step 2, the values are pairwise distinct elements of , and none of them equals . Hence they are distinct elements of the -element set . Therefore . Since this holds for every set of MOLS of order , we conclude .
∎If a set of exactly MOLS of order exists, it is a set of maximum possible size, and is called a complete set of MOLS of order . In this case .
Worked examples
Example 1 (order 4: constructing and verifying a complete set of 3 MOLS from ). Since is a prime power, the finite field exists, where and all arithmetic is done in characteristic 2 (so for every ). Index rows and columns of a array by the elements of in the fixed order . For each nonzero , define the Latin square
using field multiplication and addition. There are three nonzero choices of : , giving three squares . Each is Latin. Fix row . As ranges over , ranges over all of bijectively (it's a translation of by the fixed constant ), so no repeats in a row. Fix column . As ranges over , : since , the map is a bijection of the field (as is a field and is invertible), so ranges bijectively over as varies. No repeats in a column either. Any two are orthogonal. Take , both nonzero. Suppose for two cells . Then
Subtracting the two equations gives . Since and we are in a field, , forcing (using char 2, "subtract" means add, but the algebra is identical: since ). Then from we get . Hence the map is injective on a set of size mapping into a set of size (), hence bijective. So . We exhibit and explicitly. Order rows/columns as . :
. Using (since in ):
Superimpose: cell (0-indexed as row "", col "" in field labels, i.e. matrix position row 2 col 1) gives pair ; cell gives ; scanning all 16 cells one confirms each of the 16 ordered pairs from appears exactly once — consistent with the general proof above. Since by the theorem and we exhibited pairwise orthogonal squares, : a complete set.
Example 2 (order 5: two explicit orthogonal Latin squares built from , with a full pairing check). Since is prime, is a field. Define and (i.e. ).
Latin check for : row is — a full residue system since is invertible mod 5 (), so as ranges over , ranges over all residues, hence does too: no repeats. Column : as ranges over , ranges bijectively (a shift), so no repeats in a column either. So is Latin (and is the standard addition table, clearly Latin by the same argument with ). Orthogonality check by direct pairing. We list, for each cell with , the pair . To verify orthogonality by hand without listing all 25, use the algebraic argument (as in Example 1): if then subtracting, and ; subtracting these two congruences gives , so , and then . Hence the map is injective on 25 cells into 25 pairs, so bijective: . As a spot check, pick two cells that might look suspicious. Cell : , , pair . Cell : , , pair . These are different pairs — no collision, consistent with the proof. One can continue and confirm distinctness for all 25 cells; the algebraic argument already guarantees it rigorously. Since is prime, in fact a full construction with (all nonzero elements of ) gives four pairwise orthogonal Latin squares by the identical argument as Example 1 (the field argument used there only needs to be a field, which it is since 5 is prime). Since by the theorem, this achieves : another complete set.
The theorem's hypothesis includes that all squares in the family share the same order . This is not a cosmetic bookkeeping assumption — orthogonality is defined via a bijection to where is the common order, and the proof's Step 1 relies on a single shared row-length to run the pigeonhole in Step 3. Suppose we try to relax this and superimpose a Latin square of order with a Latin square of order . There is no well-defined array of "superimposed cells" at all, since has cells and has cells — they cannot even be laid on the same grid, so the map is not defined on a common domain. The entire notion of orthogonality collapses without the common-order hypothesis: there is no sense in which "" bounds anything, because there is no notion of a MOLS family mixing orders — the bound is a statement about squares of a single fixed order , and mixing orders removes the very object (a well-defined superimposition) that the counting argument in Step 2–3 requires. This also shows why, in applications such as Graeco-Latin experimental designs, one is always required to match the number of levels of the two factors: a -level factor and a -level factor cannot be crossed via a single square design of this type at all — a different construction (e.g. a full factorial layout with cells, not a superimposed square) is needed instead.
Scope, edge cases & common traps
| Situation | What happens | Why |
|---|---|---|
| a prime power | (complete set exists) | Field construction over for all nonzero |
| Tarry (1900) proved no pair of orthogonal Latin squares of order 6 exists, refuting Euler's 1782 conjecture | ||
| undefined/trivial, | Order 2 has only 2 Latin squares up to relabeling, and no two distinct ones are orthogonal | |
| Bose–Shrikhande–Parker (1959–60) proved this for all except , finally disproving Euler's general conjecture | ||
| Exact value of for general composite | Open in general | e.g. is known to be but whether it equals or more had long been open, illustrating the depth of the problem |
The mathematician behind it
Origins · 1 minLeonhard Euler and how this was discovered
Euler introduced Graeco-Latin squares in an essay on the "36 officers problem" (1782): can 36 officers, each from one of 6 regiments and one of 6 ranks, be arranged in a grid so every row and column contains each regiment once and each rank once, with no repeated (regiment, rank) pair? Euler conjectured no such pair of orthogonal order-6 Latin squares exists, and further conjectured that no orthogonal pair exists for any order . He verified the order-6 case was elusive by exhaustive attempts, and the general conjecture stood as folklore for over a century.
What exactly does it mean for two Latin squares to be "orthogonal"?
Two Latin squares of the same order are orthogonal when overlaying them cell-by-cell produces every one of the possible ordered pairs of symbols exactly once — no pair repeats and none is missing. Formally, the map sending each cell to the pair must be a bijection onto the product of the two symbol sets. Intuitively, if encodes one attribute (say, treatment) and a second attribute (say, block), orthogonality guarantees these two attributes are never redundant with each other — every combination of the two attributes is realized exactly once across the grid, which is precisely the property needed for unconfounded two-factor experimental designs.
Why is the bound true, intuitively, without redoing the whole proof?
After normalizing all the squares so their first rows read in the same order, look at what each square places in the cell directly below the "1" in the first row (position row 2, column 1). Each square is forced to avoid symbol 1 there (since 1 already appears once in that column, in row 1, and Latin squares forbid repeats in a column). Moreover no two of the mutually orthogonal squares can agree at that cell, because if they did, the pair (symbol, symbol) they'd share there would already have appeared once in row 1 by construction, violating orthogonality's requirement of each pair appearing exactly once. So all these entries are distinct and avoid one fixed value, leaving only possible symbols for as many squares as you like — capping the family size at .
Is the bound always achieved?
No. The bound is a universal upper limit that holds for every order , but it is only known to be achieved with equality when is a prime power, via the finite-field construction for nonzero . For composite non-prime-power orders, can be strictly smaller. The extreme case is , where Tarry proved in 1900 that not even a single orthogonal pair exists, so , far short of the ceiling . Determining exactly for general composite remains a genuinely hard combinatorial problem, unlike the clean prime-power case.
What was Euler's 36 officers problem, and how does it connect to this theory?
Euler asked whether 36 officers, from 6 regiments and holding 6 ranks (one officer per regiment-rank combination), could be arranged in a grid so each row and column has one officer from each regiment and one of each rank, with no two officers sharing both a regiment and a rank at the same position redundantly appearing elsewhere. This is exactly the existence of two orthogonal Latin squares of order 6 (regiment-square and rank-square). Euler conjectured it was impossible, and Gaston Tarry proved this rigorously in 1900 by exhaustive case analysis, confirming : order 6 is the unique order (besides the trivial cases) with no orthogonal Latin square pair at all.
How do MOLS relate to finite projective planes?
A complete set of mutually orthogonal Latin squares of order can be used to construct an affine plane of order : points are the cells, and lines are the rows, the columns, and for each of the squares, the level-sets of that square (cells sharing a common symbol). This affine plane extends uniquely to a projective plane of order by adding a line at infinity. Conversely, every projective plane of order yields a complete set of MOLS by reversing this construction. This equivalence is why settling MOLS existence questions (such as for order 10) has historically settled — or heavily informed — corresponding projective plane existence questions, foreshadowing the deeper theory of Finite Projective Planes.
Why does the proof normalize the first row of every square before counting?
Without normalization, comparing entries across different squares at a fixed cell is not meaningful, since each square's symbol labels are arbitrary and independent of the others. Relabeling symbols within a single square (a bijective renaming) never changes whether it is Latin, nor whether it is orthogonal to another square, because orthogonality is defined via a bijection condition that is preserved under any bijective relabeling of either symbol set. This freedom lets us align all squares' first rows to read identically, which is what makes the row-1/row-2 comparison in the proof's Step 2 valid — the argument crucially compares the same labeled entries across different squares, so a consistent labeling convention is a genuine prerequisite for the counting step, not just a simplification.
Where are MOLS actually used outside pure combinatorics?
Beyond Graeco-Latin experimental designs in statistics (Fisher's agricultural field trials), MOLS underlie orthogonal array constructions used in software testing (covering arrays that test factor interactions efficiently), in coding theory for building maximum-distance-separable codes, in cryptographic constructions of S-boxes and secret-sharing schemes requiring uniform, collision-free distributions, and in scheduling problems such as constructing balanced round-robin tournaments with resolvable structure. The theoretical existence questions also connect directly to open problems in finite geometry, particularly the classification of projective planes of small non-prime-power order.