Equal Sum Square Puzzles: How to Fill Every Row and Column

This article was written with AI and may contain mistakes. Found one? Tell us.

By Riddle10 Editorial Published 9 min read

To solve an equal sum square puzzle, first pin down the target total, then look for any row or column with exactly one empty cell, because that cell must be the target minus the numbers already in the line. Each cell you fill can leave a crossing line with a single gap, so the grid usually falls one line at a time, and when no line has a single gap you switch to the grand total, the range rule or the centre rule.

This guide explains those moves, compares the main kinds of equal sum square, works through a full four by four puzzle step by step, and ends with a practice puzzle and its answer.

What is an equal sum square puzzle?

It is a square grid of numbers in which every row and every column adds up to the same total. Some versions also ask both long diagonals to reach that total. The puzzle gives you a few numbers and leaves the rest of the cells empty for you to fill.

Each puzzle states which numbers you may use. In the worked puzzles in this guide, the cells take the digits 1 to 9, and a digit may appear more than once. That small rule matters, because it limits what each empty cell can hold.

How do you find the target total?

There are three common routes.

  • It is given. Many puzzles simply tell you the total.
  • A line is already full. Add up any complete row or column, and that sum is the target for every line.
  • The grand total is known. If all the numbers in the grid add up to a known amount, divide it by the number of rows. The rows cover every cell exactly once, so a four by four grid whose numbers add up to 80 has a target of 20.

For three by three grids where the diagonals count too, there is a fourth route. Add the middle row, the middle column and both diagonals. Those four lines cover every cell once, except the centre, which they cover four times. The four lines make four targets, and the whole grid makes three targets, so the extra three copies of the centre must make one target. The centre is always a third of the target.

What are the main solving moves?

MoveWhen to use itWhat it gives you
One gap in a lineA row or column has a single empty cellThat cell is the target minus the rest of the line
Cross and rescanYou have just filled a cellIts crossing row or column may now have a single gap
Range ruleTwo gaps in one line must add to a very large or very small amountWith digits 1 to 9, a pair adding to 17 must be 8 and 9, and a pair adding to 3 must be 1 and 2
Centre ruleA three by three grid with diagonalsThe centre is a third of the target
Grand totalYou know what the whole grid adds up toThe target, once you divide by the number of rows

Most puzzles need only the first two moves. The others are for the moments when you are stuck.

What is the step-by-step method?

  1. Fix the target. Read it from the puzzle, a full line, the grand total or the centre rule.
  2. Scan every line. Check each row and each column, and note any line with exactly one empty cell.
  3. Fill one gap. Subtract the known numbers in that line from the target and write the result in the empty cell.
  4. Rescan the crossing line. The cell you filled also sits in a column or row. That line may now have a single gap of its own.
  5. Use a stuck move when needed. If no line has a single gap, try the range rule or the centre rule.
  6. Check everything. At the end, add up every row, every column and, where they count, both diagonals.

How does the method solve a four by four puzzle?

Here is an original puzzle. Every row and every column must add up to 20. Use digits from 1 to 9, and repeats are allowed. A question mark is an empty cell.

Column 1Column 2Column 3Column 4
Row 1826?
Row 237??
Row 36??9
Row 4??82

Try it before reading on. A computer search through every possible way to fill the seven empty cells confirms that only one filling works.

Step 1: find the lines with one gap. At the start, only two lines qualify: row 1 and column 1.

Step 2: fill them. Row 1 has 8, 2 and 6, which add up to 16, so its last cell is 20 minus 16, which is 4. Column 1 has 8, 3 and 6, which add up to 17, so the bottom cell of column 1 is 3.

Step 3: rescan the crossing lines. The new 4 sits in column 4, which now reads 4, a gap, 9 and 2. Those add up to 15, so the gap in row 2 of column 4 is 5. The new 3 sits in row 4, which now reads 3, a gap, 8 and 2. Those add up to 13, so the gap in column 2 of row 4 is 7.

Step 4: keep going. Row 2 now reads 3, 7, a gap and 5. Those add up to 15, so its last empty cell is 5. Column 2 now reads 2, 7, a gap and 7. Those add up to 16, so the gap in row 3 is 4.

Step 5: the last cell. Row 3 now reads 6, 4, a gap and 9. Those add up to 19, so the final cell is 1.

Column 1Column 2Column 3Column 4
Row 18264
Row 23755
Row 36419
Row 43782

Check every line. The rows add up to 20, 20, 20 and 20. The columns read 8 + 3 + 6 + 3, then 2 + 7 + 4 + 7, then 6 + 5 + 1 + 8, then 4 + 5 + 9 + 2, and each of those is 20 as well. Column 3 was never used to fill a cell, which makes it a fair final test: if it had come out wrong, an earlier step would have been at fault.

Notice the rhythm. Each filled cell opened up exactly one new line, and the puzzle unzipped in pairs.

How do Latin squares give equal sums for free?

A Latin square of order n is an n by n grid in which each of n symbols appears exactly once in every row and once in every column [3]. Here is the useful link: if the symbols are the numbers 1 to n, every row and every column holds the same set of numbers, so every line has the same sum. That gives puzzle makers a quick way to build an equal sum square.

Column 1Column 2Column 3Column 4
1234
3412
4321
2143

In this grid every row and every column adds up to 10, and so do both diagonals. Shuffling whole rows or whole columns keeps the row and column sums, but it can break the diagonals. Swap the first and third rows, and the diagonals become 14 and 6.

Latin squares are often sorted into classes. Two Latin squares share an isotopy class when one can be turned into the other by rearranging rows, rearranging columns or renaming symbols [3]. A paper published on 1 March 2013 puts the number of such classes for 8 by 8 Latin squares at 1,676,267 [3]. Even counted class by class, that is a lot of starting points for a puzzle maker.

Puzzle makers often add banned entries too, such as a rule that a certain cell may not hold a certain number. A paper published on 12 May 2006 looks at exactly this for Latin squares: when can you build a full Latin square that differs from a given grid of banned entries in every cell [2]? It notes that for a partly filled Latin square of size 4 by 4 or larger, such a square always exists, while some 3 by 3 cases have none [2]. Small grids leave less room to manoeuvre, something you will feel in the three by three practice puzzle below.

Can an equal sum square use negative numbers?

Yes, and one well-known kind does. A paper published on 14 July 2000 describes alternating sign matrices: square grids whose entries are 1, minus 1 or 0, where in every row and every column the nonzero entries alternate in sign and add up to 1 [1]. Every one of them is an equal sum square with a target of 1.

Here is one of size three by three. Its middle row reads 1, minus 1, 1, and its other rows each hold a single 1 in the middle.

Column 1Column 2Column 3
010
1-11
010

According to the same paper, there are exactly seven alternating sign matrices of order 3 [1]. It also reports that a product formula for how many there are of each size was confirmed by earlier work, settling a long-standing open question [1]. For the four by four size, that formula gives 42 [1].

The paper's main result is a hidden symmetry [1]. Each of these grids can be drawn as paths that pair up points around its edge, and the paper builds a matching that turns that ring of points one step while keeping the counts the same, a far richer symmetry than the turns and flips of the square itself [1].

How do the kinds of equal sum square compare?

KindLines that must matchNumbers allowedExample target
Rows and columns onlyEvery row and columnUsually digits, repeats allowed20 in the worked example
With diagonalsRows, columns and both diagonalsUsually digits, repeats allowed18 in the practice puzzle
From a Latin squareRows and columns, diagonals only for some row ordersEach number once per line10 for the numbers 1 to 4
Alternating signEvery row and column1, minus 1 and 0Always 1

The more lines that must match, the fewer grids qualify, and the fewer givens a puzzle needs to have only one answer.

What mistakes trip people up?

  • Guessing the target. Always work it out first, from the puzzle text, a full line, the grand total or the centre rule.
  • Forgetting the rules on digits. If only 1 to 9 are allowed, a gap that would need 10 or 0 means an earlier step went wrong.
  • Not rescanning. Every filled cell sits in two lines, and sometimes three or four when diagonals count.
  • Skipping the final check. One slip of arithmetic spreads through the whole grid.

Can you solve this practice puzzle?

Fill this three by three grid so that every row, every column and both diagonals add up to 18. Use digits from 1 to 9, and repeats are allowed.

Column 1Column 2Column 3
Row 173?
Row 2???
Row 3???

It looks almost empty, but the centre rule opens it up. Try it before reading the answer.

Answer:

Column 1Column 2Column 3
Row 1738
Row 2765
Row 3495

The centre is a third of 18, so it is 6. Row 1 needs 8 in its last cell. The diagonal from the top left reads 7, 6 and a gap, so its corner is 5. The other diagonal reads 8, 6 and a gap, so its corner is 4. Column 1 then needs 7 in the middle, column 2 needs 9 at the bottom, and row 2 needs 5 on the right. Every row, column and diagonal now adds up to 18, and a search through every possible filling confirms there is no other answer.

Ready for a live number riddle?

Equal sum squares train you to see a total and work backwards to the missing part. The same habit helps with a number pyramid, where you work out the missing brick from the ones you can see.

References

  1. Wieland, B. (2000, July 14). Large Dihedral Symmetry of the Set of Alternating Sign Matrices. The Electronic Journal of Combinatorics, 7(1), R37. DOI 10.37236/1515
  2. Cutler, J., & Öhman, L.-D. (2006, May 12). Latin Squares with Forbidden Entries. The Electronic Journal of Combinatorics, 13(1), R47. DOI 10.37236/1073
  3. Abel, R. J. R., Cavenagh, N. J., & Kuhl, J. (2013, March 1). Induced Subarrays of Latin Squares Without Repeated Symbols. The Electronic Journal of Combinatorics, 20(1), P44. DOI 10.37236/2372

equal sum squares number puzzles grid puzzles step by step latin squares math puzzles

More reading