Hard

Unique Rectangle

Four cells forming a rectangle across two boxes. Preventing a deadly pattern that would allow two solutions.

In short

Look for four cells forming a rectangle over two rows, two columns and exactly two boxes, all four sharing the same two candidates. Because those two digits alone in all four corners could be swapped for a second solution, you can eliminate whatever would complete that deadly pattern. Four common types differ in where the extra candidates sit.

What Is It?

A Unique Rectangle (UR) is a pattern involving four cells that form a rectangle, two rows, two columns, spanning exactly two boxes. If all four cells contained only the same two digits, you could swap those digits in all four cells and still have a valid solution. This is called a "deadly pattern" and violates the uniqueness of a proper Sudoku.

Since a valid Sudoku must have exactly one solution, we know this deadly pattern cannot occur. This lets us eliminate candidates that would create or complete the deadly pattern. There are several types of Unique Rectangles, each exploiting this principle in a different way.

Unique Rectangles are among the most commonly used advanced techniques. They're powerful because they leverage a meta-property of the puzzle (uniqueness) rather than pure constraint logic.

How It Works

Identify four cells forming a rectangle across two boxes, where two digits appear as candidates in all four corners. These are the "UR digits." If all four cells were bivalue with only these two digits, swapping would create two solutions.

Type 1: Three corners are bivalue (only the UR digits). The fourth has extra candidates. Remove the UR digits from that fourth corner, it must resolve to one of its extra candidates to prevent the deadly pattern.

Type 2: Two corners are bivalue. The other two (the "roof" cells) share the same single extra candidate C and are in the same row, column, or box. Since at least one roof cell must be C to break the pattern, C is locked between them — eliminate C from all other cells in their shared unit. If further constraints force C into one specific roof cell, the UR digits can also be eliminated from that cell.

Type 3: Two corners are bivalue. The other two have extra candidates. The combined extras from the roof cells form a naked subset (pair, triple) with another cell in their shared unit. Digits in that subset can be eliminated from other cells in the unit.

Type 4: Two corners are bivalue. The other two have different extras, but one UR digit forms a strong link between them (appears only in those two cells within their shared row or column). That digit must go in one of them, so the other UR digit can be eliminated from both.

Worked Example

Example 1: Unique Rectangle Type 1

Look at cells R5C2, R5C3, R9C2, R9C3, a rectangle spanning rows 5 and 9, columns 2 and 3, across boxes 4 and 7. The UR digits are {1, 3}.

Three corners (R5C2 {1, 3}, R5C3 {1, 3}, and R9C3 {1, 3}) are bivalue. The fourth corner R9C2 has {1, 3, 9}. If R9C2 were also bivalue {1, 3}, the deadly pattern would form. Therefore, remove 1 and 3 from R9C2.

R9C2 is reduced to just {9} and is immediately solved. The deadly pattern is prevented.

Example 2: Unique Rectangle Type 2

Now look at R4C3, R4C6, R6C3, R6C6 — a rectangle across rows 4 and 6, columns 3 and 6, spanning boxes 3 and 4. The UR digits are {3, 8}. The floor corners R6C3 and R6C6 are bivalue {3, 8}; the roof corners R4C3 and R4C6 both add the same extra candidate: 6.

To avoid the deadly {3, 8} pattern, at least one roof must take its extra 6 instead of a UR digit. Both roofs lie in row 4, so exactly one of them is 6. Cell R4C4 also lies in row 4, seeing both roofs — so whichever roof becomes 6, R4C4 cannot also be 6.

Eliminate 6 from R4C4, leaving {1, 3}. The shared extra candidate, locked into the two roof cells, is what prevents the deadly pattern.

Example 3: Unique Rectangle Type 3

Look at R1C8, R1C9, R8C8, R8C9 with UR digits {3, 8}. The floor cells R1C8 and R1C9 are bivalue {3, 8}. The roof cells R8C8 has {3, 4, 7, 8} and R8C9 has {3, 7, 8}.

To avoid the deadly pattern, at least one roof cell must resolve to a non-UR digit. Strip the UR digits from the roof cells: R8C8 has extras {4, 7} and R8C9 has extra {7}. The combined extras are {4, 7}.

In box 9, R7C7 also has candidates {4, 7}. The roof cells' extras together with R7C7 form a naked pair on {4, 7} in box 9. Therefore, eliminate 4 and 7 from all other cells in box 9: R7C8 loses {4, 7}, R7C9 loses {7}, R9C8 loses {4}.

Example 4: Unique Rectangle Type 4

Look at R3C5, R3C6, R8C5, R8C6 with UR digits {2, 7}. Corners R3C5 and R8C5 are bivalue {2, 7}. Corner R3C6 has {2, 6, 7} and R8C6 has {2, 7, 8}, different extra candidates.

In column 6, digit 7 appears only in R3C6 and R8C6, a strong link. One of these cells must be 7 to satisfy column 6. Since 7 is guaranteed in one of them, digit 2 can safely be eliminated from both.

Eliminate 2 from R3C6 and R8C6. R3C6 becomes {6, 7} and R8C6 becomes {7, 8}. The strong link on digit 7 prevents the deadly pattern.

Frequently Asked Questions

What is a deadly pattern in Sudoku?

A deadly pattern is a set of cells that could be filled in two different ways, both valid. The classic case is four rectangle corners holding only the same two digits: swap those digits at all four corners and the grid still works, so the puzzle would have two solutions, which a proper Sudoku cannot.

Why must the rectangle span exactly two boxes?

Because the digit swap has to leave every row, column and box still valid. With the corners confined to two boxes, each box holds two corners — one of each digit — so exchanging them keeps both digits present everywhere. A rectangle spread across four boxes would not survive the swap, so it is not deadly.

How does a Unique Rectangle Type 1 work?

In Type 1, three corners hold only the two shared digits and the fourth holds those two plus extras. Were the fourth also limited to the shared pair, the deadly pattern would form — so remove both shared digits from it. When it has exactly one extra candidate, that cell is solved immediately.

What is the difference between Unique Rectangle Types 1, 2, 3 and 4?

Type 1 has three corners holding only the two shared digits and eliminates those digits from the fourth. Types 2, 3 and 4 each have two such corners and differ in the other pair: Type 2's two share one identical extra candidate, Type 3's extras form a naked subset with another cell, Type 4's carry a strong link.

What is a strong link in a Unique Rectangle Type 4?

A strong link means one of the two shared digits appears in only those two roof cells within their common row or column, so one roof must take it. With that digit guaranteed a home, the other shared digit can be eliminated from both roofs, since placing it there would complete the deadly rectangle.

How do I spot a Unique Rectangle while solving?

Scan for two cells in the same row holding the identical two candidates, then look down their two columns for another row where both cells still carry those digits. Check that the four cells cover only two boxes. Type 1 is the most common, so look first for three corners with nothing but the shared pair.

Key Points

Related Techniques

All Sudoku Techniques

Explore all 28 solving techniques in our complete technique guide.