How to Solve Mathdoku Puzzles, With Two Original Grids

Last edited Oct 14, 2026 · 4 min read

A Mathdoku looks like a small sudoku with sums and products scribbled on it. NRICH, the mathematics enrichment project at the University of Cambridge, calls these grids Mathematical Sudokus and credits Tetsuya Miyamoto, a Japanese maths teacher, whose puzzles inspired its versions. NRICH offers them in 3 by 3, 4 by 4, 5 by 5, and 6 by 6 sizes.

You rarely need much arithmetic: most cages allow only one or two digit combinations, and once you list them, the grid behaves like a sudoku. Below are the rules, four solving moves, and two original puzzles, each checked against every possible filling and each with exactly one solution.

1. The rules

NRICH's 4 by 4 version spells them out:

  • Fill the grid so that each digit from 1 to 4 appears once in every row and once in every column. (A 3 by 3 grid uses 1 to 3.)
  • Thick outlines group cells into cages.
  • Each cage shows a target number and an operation. NRICH's example: a three-cell cage marked 8 with a multiplication sign means the three digits multiply to 8.
  • A cage of one cell with a number and no operation simply tells you that cell's digit.

Two conventions used in the puzzles below:

  • For subtraction and division cages (always two cells), take the larger digit first. "Subtract 3" means the two digits differ by 3.
  • A digit may repeat inside a cage, as long as the repeats are not in the same row or column.

Unlike a standard sudoku, there are no boxes.

2. Four solving moves

1. List every combination for small cages. A two-cell cage marked "multiply 6" in a 4 by 4 grid can only be 2 and 3. "Add 3" can only be 1 and 2. Write the options in pencil.

2. Use the row or column a cage sits in. If a two-cell cage lies entirely within one row, its two digits must be different. That rules out options like 2 and 2 for "multiply 4", leaving only 1 and 4.

3. Finish lines by elimination. Once three digits of a row or column are known or narrowed down, the missing one is forced, just like a sudoku.

4. Use the sum of a line. Every line of a 4 by 4 grid adds up to 10, and every line of a 3 by 3 grid adds up to 6.

NRICH asks a good question to keep in mind: how would you convince someone that a number you wrote must be correct?

3. Puzzle 1: a 3 by 3 warm-up

Use the digits 1 to 3. Each letter marks a cage.

Row C1 C2 C3
1 A A B
2 C D B
3 C E E
  • A: add, 3
  • B: multiply, 6
  • C: subtract, 1
  • D: the single digit 1
  • E: subtract, 2

4. Puzzle 2: a 4 by 4 grid

Use the digits 1 to 4.

Row C1 C2 C3 C4
1 A B B C
2 A D D C
3 E E D G
4 F F G G
  • A: multiply, 8
  • B: subtract, 3
  • C: divide, 3
  • D: add, 8
  • E: multiply, 4
  • F: multiply, 6
  • G: multiply, 8

5. Solutions

Puzzle 1.

Row C1 C2 C3
1 1 2 3
2 3 1 2
3 2 3 1

Cage D gives the 1 in the center. Cage A adds to 3 with two different digits in one row, so it holds 1 and 2, which leaves 3 for the top-right cell. Cage B multiplies to 6, so the cell below that 3 is 2. Row 2 now has 1 and 2, so its first cell is 3. Cage C differs by 1 from that 3, and 4 does not exist, so the bottom-left cell is 2. Column 1 then needs a 1 at the top, which makes the top-middle cell 2. Column 2 finishes with 3 in row 3, and row 3 ends with 1. Cage E checks out: 3 minus 1 is 2.

Puzzle 2.

Row C1 C2 C3 C4
1 2 1 4 3
2 4 3 2 1
3 1 4 3 2
4 3 2 1 4

Cage E multiplies to 4 inside row 3, so it is 1 and 4. Cage F multiplies to 6 inside row 4, so it is 2 and 3. Cage A multiplies to 8 inside column 1, so it is 2 and 4. Column 1 therefore needs 1 and 3 in rows 3 and 4: the 1 comes from cage E and the 3 from cage F. That makes row 3 start with 1, 4 and row 4 start with 3, 2.

Cage B (difference 3) is 1 and 4, but column 2 already holds 4 and 2, so the top of column 2 is 1 and the cell beside it is 4. Cage C (divide 3) is 1 and 3. Row 1 already has 1 and 4, so the top-right cell is 3, the top-left is 2, and the cells below them are 1 and 4. Row 2 then needs 3 and 2 in the middle, and column 2 forces the 3 first. Cage D adds to 8: 3 + 2 + 3. Rows 3 and 4 finish by elimination, and cage G checks out: 2 times 1 times 4 is 8.

6. Key takeaways

  • Mathdoku uses each digit once per row and column, with no boxes, plus arithmetic cages.
  • List the possible digit pairs for every small cage first; many cages allow only one pair.
  • A two-cell cage inside one row or column cannot repeat a digit, which removes options like 2 and 2.
  • Every line of a 4 by 4 grid sums to 10, and every line of a 3 by 3 grid sums to 6.

Sources

  1. NRICH, University of Cambridge Millennium Mathematics Project, Mathdoku
  2. NRICH, University of Cambridge Millennium Mathematics Project, 3 by 3 Mathdokus
  3. NRICH, University of Cambridge Millennium Mathematics Project, Sudokus
CategoriesPuzzle Breakmathdokunumber puzzleslogic puzzles