A unique rectangle is four unsolved cells in two rows, two columns and two boxes that all hold the same two candidates. If those four cells could only ever be those two digits, you could swap them and get a second solution, so a proper puzzle (one with exactly one solution) never lets that happen, and you can remove whatever candidates would create it.
To spot one, look for two cells in the same row or column with an identical pair, say {1, 4}, then check the matching cells in a second row (or column) that sits in the same band of boxes. If they also contain 1 and 4, you have a rectangle, and the extra candidates in those cells decide which of the four types it is.
- The pair 1 and 4
- Removed from R8C5
The deadly pattern behind every unique rectangle
Picture four cells at the corners of a rectangle: two rows, two columns, and only two boxes between them. If each corner could only be 1 or 4, you could fill them as 1, 4 / 4, 1 or as 4, 1 / 1, 4. Every row, column and box would still contain the same digits either way, so nothing else in the grid could tell the two fillings apart. The puzzle would have two solutions. Solvers call this the deadly pattern.
A published puzzle has exactly one solution, so the deadly pattern cannot be the final state. At least one corner must end up as something other than the pair. Every unique rectangle technique is a way of cashing in that fact. Three conditions must hold:
- Two rows, two columns, two boxes. The four cells sit in exactly two boxes. If they spread over four boxes, the swap would break a box, and nothing follows.
- No givens. All four cells must be unsolved at the start. A given cannot be swapped, so a rectangle containing a clue is not deadly.
- One solution. The logic assumes the puzzle is valid. Every puzzle in a good app or newspaper is, but a puzzle you typed in with a mistake may not be.
The two corners that hold only the pair are called the floor. The corners with extra candidates are the roof. The type depends on what the roof looks like.
Unique rectangle type 1
Type 1 is the simplest: three corners hold only the pair and the fourth has extras. The fourth corner cannot be either digit of the pair, so both are removed from it.
In the diagram above, from a real puzzle in our library, R7C5, R7C7 and R8C7 each hold exactly 1 and 4. R8C5 holds 1, 4 and 9. The cells sit in rows 7 and 8, columns 5 and 7, and boxes 8 and 9. If R8C5 were 1 or 4, all four corners would be locked to 1 and 4 and the pattern would be deadly. So R8C5 loses 1 and 4, which leaves 9. A type 1 gives you a placement straight away.
Unique rectangle type 2
In type 2 the two roof cells share one extra candidate, and only that one. One of the roofs must be that extra digit, so it can be removed from every cell that sees both roofs.
- The pair 3 and 5
- Shared extra 6 in the roof
- 6 removed
The floor is R8C3 and R9C3, both {3, 5}. The roof is R8C7 and R9C7, both {3, 5, 6}. The rectangle covers rows 8 and 9, columns 3 and 7, and boxes 7 and 9. If neither roof were 6, all four corners would be 3 or 5: the deadly pattern. So at least one roof cell is 6.
The roofs share column 7 and box 9. R1C7 sees both through column 7. R9C9 sees R9C7 along row 9 and R8C7 in box 9. Both lose their 6.
Unique rectangle type 3
Type 3 is for roofs with different or several extras. Treat the two roofs together as one imaginary cell holding just their extra candidates. One roof must take an extra, so that imaginary cell behaves like a real cell in any house the roofs share. If it forms a naked pair (or triple) with other cells there, you can use it.
- The pair 4 and 8
- 1 and 2: roof extras plus R1C5
- 1 removed
The floor is R6C7 and R6C9, both {4, 8}. The roof is R1C7 and R1C9, both {1, 2, 4, 8}. The corners sit in rows 1 and 6, columns 7 and 9, and boxes 3 and 6. To avoid the deadly pattern, at least one roof must be 1 or 2.
Now look at row 1, which contains both roofs. R1C5 holds exactly {1, 2}. Between them, the roof pair and R1C5 need two spots for the digits 1 and 2: one of the roofs takes one of them and R1C5 takes the other. That is a naked pair on 1 and 2 across row 1, so no other cell in row 1 can be 1 or 2. R1C4 has {1, 8} and loses its 1, leaving 8.
Unique rectangle type 4
Type 4 uses a strong link. If one digit of the pair can only go in the two roof cells within a house they share, one roof must be that digit. The other roof then cannot be the second digit of the pair, or the rectangle would be deadly. So the second digit comes out of both roofs.
- The pair 7 and 8
- 8 locked into the roof
- 7 removed
This example comes from the same position as type 1. The floor is R2C2 and R3C2, both {7, 8}. The roof is R2C6 {1, 3, 7, 8} and R3C6 {5, 7, 8}. The corners sit in rows 2 and 3, columns 2 and 6, and boxes 1 and 2.
In column 6, the 8 can only go in R2C6 or R3C6, so one of them is 8. If the other were 7, the roofs would be 7 and 8, the floor would have to be the reverse, and the four cells would form the deadly pattern. So neither roof can be 7. Both R2C6 and R3C6 lose their 7.
How to find unique rectangles in a real solve
- Start from bivalue cells. List the cells with exactly two candidates. A floor needs two of them with the same pair, in the same row or column.
- Stay inside a band. From a floor in one row, only check the other rows of the same band (for a column floor, the same stack). That keeps the rectangle in two boxes.
- Check the roof. Both roof cells must contain the pair. Then read the extras: none on three corners is type 1, one shared extra is type 2, extras that complete a subset in a shared house are type 3, and a pair digit locked into the roof is type 4.
- Confirm no givens. A clue in any corner cancels the pattern.
Unique rectangles are fast to see once you know the shape, and they often clear the way when the grid is full of two-candidate cells. If nearly every cell is down to two candidates, also check for BUG+1, the other uniqueness technique, or chain the pairs with an XY-Wing.
For the full ladder of techniques, see our list of sudoku techniques in learning order and the overview of advanced sudoku strategies.
Try Sudoku Royale
The classic sudoku you know, without the ads, the pop-ups, or the clutter. A fresh Daily Challenge, unlimited practice with no timer, and technique drills. When you want a rush, race 2 to 18 players on one shared grid.
Download Sudoku Royale: Free on iOSFrequently Asked Questions
What is a unique rectangle in sudoku?
A unique rectangle is four unsolved cells in two rows, two columns and two boxes that share the same two candidates. If all four could only be those two digits, the puzzle would have two solutions. Since a valid puzzle has one solution, you can remove candidates that would lead to that pattern.
What are the types of unique rectangle?
Type 1: three corners hold only the pair, so the pair is removed from the fourth. Type 2: both roof cells share one extra digit, which is removed from cells seeing both roofs. Type 3: the roof extras form a naked subset with other cells in a shared house. Type 4: one pair digit is locked into the roof, so the other pair digit is removed from both roof cells.
Is using unique rectangles cheating?
No. It relies on the rule that a proper sudoku has exactly one solution, which every published puzzle follows. Some purists avoid it because it assumes uniqueness instead of proving it, but it never gives a wrong answer on a valid puzzle.
Why must a unique rectangle span exactly two boxes?
The swap that creates a second solution only works if each box contains both digits of the pair in both fillings. With the corners in two boxes, swapping keeps every box valid. Spread over four boxes, a swap would change the digits in a box, so there is no deadly pattern.
Can a unique rectangle include a given?
No. Givens are fixed and cannot be swapped, so a rectangle with a clue in any corner is not a deadly pattern and gives no elimination.