Computation

A field's worth of squares

Two orthogonal squares of order five are easy to stumble on. Four of them, every pair orthogonal, is not a stumble — it is one line of arithmetic over a field, and the field supplies as many as the order allows.
15 min read 6 figures Decided by exhaustionSmall cases lie

Worth reading first: The thirty-six officers · The field with four elements.

Euler’s officers leave a question behind that the failure at order six rather hides. Two Latin squares are orthogonal when laying one on the other produces every ordered pair of symbols exactly once. At order six there is no such pair at all. At order five there are pairs, and the obvious next question is how many squares can be put together so that every pair among them is orthogonal — three squares, four, as many as the order will bear.

Stumbling on one pair is luck. A family of four, checked in all six of its pairings, is not something to stumble on, and the construction that produces it is a single line of arithmetic.

The 3 mutually orthogonal squares of order 4. Every Latin square built from the field of order 4 as a·i + j, one for each non-zero multiplier, with every pair checked orthogonal.
Fig. 1 The three squares of order four, drawn over the field with four elements: one square for each non-zero multiplier. Every one of the three pairings was superimposed and produced all sixteen ordered pairs; a square laid over itself produces four, which is what the same measurement says when there is nothing to find.

One line of arithmetic

Number the rows and the columns by the elements of a field with qq elements, and fill the cell in row ii and column jj of the square belonging to the multiplier aa with

La(i,j)=ai+j.L_a(i, j) = a \cdot i + j.

That is the whole construction. There is one square for each non-zero aa, so there are q1q - 1 of them, and the claim is that every pair among them is orthogonal.

Each square is Latin before anything else is asked of it. Fix a row — fix ii — and the map jai+jj \mapsto a i + j adds a constant to every symbol, which shuffles the field without repeating anything. Fix a column instead and the map iai+ji \mapsto a i + j multiplies by aa and then adds a constant; multiplying by a non-zero element of a field is invertible, so again nothing repeats. The multiplier has to be non-zero or the row index does nothing at all and every row of the square comes out the same.

The 2 mutually orthogonal squares of order 3. Every Latin square built from the field of order 3 as a·i + j, one for each non-zero multiplier, with every pair checked orthogonal.
Fig. 2 The smallest complete family: two squares of order three, from the field with three elements. The nine ordered pairs of symbols each occur once across the pair — which is the whole of what orthogonality asks, at the smallest size where it can be asked.

Why the pairs come out right

Take two of the squares, belonging to multipliers aa and bb with aba \neq b, and pick any ordered pair of symbols (u,v)(u, v). The question is whether some cell carries uu in the first square and vv in the second, and whether it is the only one. That is two equations in two unknowns:

ai+j=u,bi+j=v.a i + j = u, \qquad b i + j = v.

Subtract the second from the first. The jj cancels, and what is left is (ab)i=uv(a - b) \, i = u - v. Because aba \neq b, the coefficient aba - b is not zero; because the arithmetic is a field’s, a non-zero element can be divided by; so ii is determined, and then j=uaij = u - a i is determined too. One solution, always, and never two.

That is the entire proof, and it is worth noticing what it used. It used that a non-zero difference can be inverted. Everything else — commutativity, distributivity, the existence of a zero — is scaffolding around that one step, and the step is exactly the property that separates a field from an arithmetic that merely wraps.

Where wrapping is not enough

The clock arithmetics — the integers modulo nn — look like fields and mostly are not. Modulo six, the multiplier 22 has no reciprocal, because two threes make six, which is zero on a dial of six, and a number that multiplies something non-zero down to zero can have no inverse. Those are the zero divisors, and they are what a composite modulus has and a field does not.

Follow the construction anyway, modulo six, and watch it fail twice over. The square LaL_a is Latin only when aa has an inverse, so only a=1a = 1 and a=5a = 5 are available at all. Those two squares are then orthogonal only if 51=45 - 1 = 4 can be inverted modulo six, and 44 shares the factor 22 with 66. The construction supplies no pair at order six, which is the right answer, arrived at by the wrong reasoning — the true statement, that no pair of orthogonal squares of order six exists by any construction, needed Tarry’s year of exhaustion and not this paragraph.

The arithmetic of GF(4), and of the integers mod 6. Addition and multiplication tables of a finite field, optionally beside the table of a ring of the same kind of size.
Fig. 3 The field with four elements beside the integers modulo six. On the left every non-zero row of the multiplication table is a permutation of the elements; on the right two non-zero entries multiply to zero, and the row belonging to such an element repeats itself. That difference is the one the construction above rests on.

At order four the point is sharper still, because there the arithmetic that works is not the clock. In the integers modulo four, two multiplied by itself is zero; the field with four elements is a different object built on the same four symbols, and the three squares in the opening figure come from it. A reader who tries the construction on the clock at order four gets one Latin square and two that are not.

The ceiling nobody can raise

How many mutually orthogonal squares can an order nn carry, whatever the construction? The answer is at most n1n - 1, and the argument is a relabelling and a pigeonhole.

Relabelling the symbols of one square — swapping every 22 for a 55 and so on — cannot make an orthogonal pair stop being orthogonal, since it merely renames the pairs that already occur once each. So assume each square in the family has been relabelled so that its first row reads 0,1,2,,n10, 1, 2, \dots, n-1 in order. Every square now agrees along its top row, which means that every pair of equal symbols has already been used up there: the cell in row 00 and column ss carries ss in every square.

Now look at the cell directly under the top left corner. In any one square its entry cannot be 00, because 00 already stands above it in that column. And two different squares cannot both carry the same symbol tt there, because the pair (t,t)(t, t) was already spent in the top row. So the entries in that one cell are distinct, non-zero, and drawn from nn symbols — leaving at most n1n - 1 squares.

Why order 4 carries no more than 3 orthogonal squares. The orthogonal squares standardised to a common first row, with the one cell that decides how many of them there can be marked in each.
Fig. 4 The three squares of order four after relabelling, so that all three start with the same first row. The marked cell holds 1, 2 and 3 — every symbol a first column can still take. A fourth square of order four would have to repeat one of them, and repeating one is a pair of symbols occurring twice.

The construction over a field produces exactly q1q - 1 squares, so at every prime power it hits this ceiling. That is a satisfying coincidence and it is not a coincidence at all; the next rung of this ladder is about what a family of n1n-1 squares actually is, and the answer explains both halves at once.

The orders where the ceiling is reached

Write N(n)N(n) for the largest number of mutually orthogonal squares of order nn. The construction settles every prime power: N(q)=q1N(q) = q - 1 whenever qq is a prime or a power of one, since the field exists and the ceiling forbids more.

The 4 mutually orthogonal squares of order 5. Every Latin square built from the field of order 5 as a·i + j, one for each non-zero multiplier, with every pair checked orthogonal.
Fig. 5 Order five, at the ceiling: four squares, six pairings, and every pairing produces all twenty-five ordered pairs. The multipliers are 1, 2, 3 and 4, and each square is the previous one with its rows permuted — which is why the family is so much easier to build than to find.

Off the prime powers the picture is thin and stays thin. N(6)=1N(6) = 1, which is Tarry’s exhaustion. N(10)N(10) is known to be at least 22 and at most 88, and the true value has been unknown since the question was asked. N(12)N(12) is at least 55. There is no order n>6n > 6 for which N(n)=1N(n) = 1 — every such order carries at least one orthogonal pair — and that fact is the corpse of Euler’s conjecture, established by Bose, Shrikhande and Parker in 1959 and 1960.

The construction here is old. It appears in work of E. H. Moore in the 1890s and was put in this form by Bose in 1938, a hundred and fifty years after Euler asked about his officers, which is a fair measure of how much easier the positive half of this subject is than the negative half.

Two families multiplied together

There is a second construction, and it is the reason the composite orders are not simply blank. Given a family of squares of order mm and a family of order nn, the cells of an m×mm \times m square can each be replaced by a whole n×nn \times n square, with symbols taken from the pairs. What comes out is a family of order mnmn, and its size is the smaller of the two sizes it was built from:

N(mn)  min(N(m),N(n)).N(mn) \ \geq\ \min(N(m), N(n)).

Applied to 12=4×312 = 4 \times 3 this gives N(12)2N(12) \geq 2, since N(4)=3N(4) = 3 and N(3)=2N(3) = 2. Applied to 10=2×510 = 2 \times 5 it gives min(1,4)=1\min(1, 4) = 1, which says nothing at all, because the factor two contributes nothing and the bound is only as good as its worst factor.

MacNeish conjectured in 1922 that this bound is the whole truth — that N(n)N(n) is exactly the minimum of pe1p^e - 1 over the prime powers in the factorisation of nn. It is a natural guess, it holds at every order small enough to check by hand, and it is false. Order ten is the counterexample: the bound gives 11 and the answer is at least 22. The same pair of squares that killed Euler’s conjecture killed MacNeish’s, which is unusually good value for one counterexample.

The 6 mutually orthogonal squares of order 7. Every Latin square built from the field of order 7 as a·i + j, one for each non-zero multiplier, with every pair checked orthogonal.
Fig. 6 Order seven at the ceiling: six squares, fifteen pairings, all of them checked. The family grows with the order, so the honest picture of a complete set is one that gets harder to draw rather than one that gets more impressive — and what makes it interesting is not its size but that every pair in it agrees nowhere.

What the counting costs

The figures here decide the orthogonality rather than asserting it, and the arithmetic of that is worth stating, because it is the reason the check is possible at all and the reason it stops.

Checking one pair of squares of order nn means forming n2n^2 ordered pairs and asking whether they are all different — cheap. Checking a whole family means doing that for every pairing, and a family of n1n - 1 squares has (n1)(n2)/2(n-1)(n-2)/2 of them. At order four that is three pairings and forty-eight symbol pairs; at order seven it is fifteen pairings; at order thirty-two it would be four hundred and sixty-five pairings of a thousand cells each, which is still nothing.

What is not nothing is searching for such a family rather than constructing one. The number of Latin squares of order nn grows faster than any exponential, which is the subject of a later rung on this ladder, and the failure at order six was settled by exhaustion only because six is small. Constructions scale; searches do not. The whole reason the field is interesting here is that it replaces a search with an arithmetic.

The same family, wearing three other hats

A complete family of squares turns up in three places that have nothing obvious to do with one another, and the arithmetic above is the whole of what they share.

The oldest is experimental design. To test nn treatments in a field divided into nn rows and nn columns, where the soil varies along both, a Latin square arranges the treatments so that each appears once in every row and once in every column — so any systematic difference between rows, or between columns, is spread evenly over the treatments rather than confounded with one of them. Fisher made this standard in the 1920s. Add a second, orthogonal square and a second factor can be tested at the same time, with every combination of the two occurring exactly once, and the analysis stays as simple as it was for one.

The second is scheduling, and it is the design of triples seen from a different angle: a family of orthogonal squares of order nn is a way of arranging n2n^2 competitors into rounds so that no two ever meet twice. Rows are one round, columns are another, and each square supplies one more. The ceiling of n1n - 1 squares is then the statement that there are at most n+1n + 1 such rounds, which is a fact about tournaments derived from a fact about relabelling.

The third is coding. Read each cell of the plane as a message of two symbols — its row and its column — and each square as one check symbol computed from them. Every square is one more redundant symbol, and orthogonality says exactly that two messages agreeing in any two of their coordinates are the same message. That is a code in which any two coordinates determine the rest, which is the extreme case of the trade between redundancy and distance, and it is the same object a polynomial through the gaps arrives at from the other side — polynomials of low degree over the same field, evaluated at every point of it. The two constructions are one construction: ai+ja i + j is a polynomial of degree one in ii, and the squares are its evaluations.

That last coincidence is the honest reason to care about the ceiling. A bound on how many squares an order can carry is simultaneously a bound on how many check symbols a code of that shape can have, and on how many rounds a tournament can run — and it was proved by looking at one cell.

What the pictures cannot show

Every figure on this page is one order. The claim is about all prime powers, and no drawing settles a claim about infinitely many orders — what the drawings do is check the construction where it can be checked, which is what a figure in this field is for.

The second limit is subtler and matters more. The pictures show families that exist; they can say nothing about the orders where none does, because a drawing of an object that does not exist is a drawing of nothing. The ceiling argument is the exception, and it is the exception precisely because it is a counting argument: it is about the symbols a cell may take, and it applies to families nobody has ever seen as easily as to the three squares at the top of the page. The pigeonhole is the only tool in this essay that says anything about the orders where the answer is unknown.

Where the ladder goes next

A complete set of n1n - 1 squares turns out not to be a lucky collection of squares. It is a geometry — a plane with n2n^2 points, in which every two points lie on exactly one line — and the rows, the columns and each square’s symbol classes are its lines. That correspondence is exact in both directions, and it is what turns a question about arrangements into a question about geometry: seven points and seven lines is the smallest case, a schedule where every pair meets once is the same object doing a different job, and the orders at which no plane exists are the orders at which the ceiling cannot be reached.

That is where order ten’s answer eventually came from, and it is the next rung. Further up, the counting: how many Latin squares of order nn there are, why the exact answer stops at eleven, and why a partial square can always be extended one row at a time even though the total is beyond enumeration. And beyond that, what a Latin square is when nobody is looking for orthogonality — the multiplication table of an algebra with division and, almost never, with associativity.

What links here

Computed from the collection, not written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

BijectionConstructionCounting argumentFinite fieldLatin squareModular arithmeticOrthogonal latin squaresPrime powerProjective planeZero divisor