Solving Tips

Sudoku Unique Rectangle Guide: Complete Types 1/2/3/4 Tutorial

2025-06-11 · 15 min read
Knowledge Base / Techniques Index / Unique Rectangle

Unique Rectangle (UR) is one of the most important advanced Sudoku techniques. It leverages the rule that a valid Sudoku must have exactly one solution. When the grid shows a rectangular pattern that could form a "Deadly Pattern," we can use this to eliminate certain candidates and ensure the puzzle has a unique solution.

Core Principle:
If four cells (at the intersection of two rows and two columns, distributed across exactly two boxes) all contain only the same two candidates {a, b}, then these four cells would have two valid ways to be filled (forming a Deadly Pattern), resulting in multiple solutions. Since a proper Sudoku must have a unique solution, this pattern cannot occur, and we can use this to eliminate candidates.
Unique Rectangle Principle Diagram

The Unique Rectangle technique has several types based on the candidate distribution in the rectangle cells. This article explains the four most common types: Type 1 (Basic), Type 2 (Same Extra Candidate), Type 3 (Subset), and Type 4 (Strong Link).

Terminology

  • Floor Cells: Cells in the rectangle containing only the two candidates {a, b}. If all cells were floor cells, they would form a Deadly Pattern
  • Roof Cells: Cells in the rectangle containing {a, b} plus additional candidates. These extra candidates are key to breaking the Deadly Pattern
  • UR Pair: The two candidates {a, b} that form the Unique Rectangle

Before reading this article, we recommend mastering the Sudoku naming conventions and basic candidate techniques.

Type 1: Basic

Type 1 is the simplest and most intuitive Unique Rectangle type. It is characterized by: three floor cells (containing only {a, b}) and one roof cell (containing {a, b} plus other candidates).

Type 1 Rule

If three of the four UR cells contain only {a, b} and one contains {a, b, x...},
Then that roof cell must be filled with one of x... (not a or b), so we can eliminate a and b from the roof cell.

Example Analysis

Unique Rectangle Type 1 Example
Figure: Unique Rectangle Type 1 - R1C4, R1C8, R3C4, R3C8 form a UR with candidates 4, 5
Open this example in solver

Observe the grid. We find the following four cells forming a rectangular structure:

  • R1C4: Candidates {4, 5} (floor cell)
  • R1C8: Candidates {4, 5} (floor cell)
  • R3C4: Candidates {4, 5} (floor cell)
  • R3C8: Candidates {1, 4, 5, 8} (roof cell, with extra candidates 1, 8)

These four cells are at the intersection of rows 1, 3 and columns 4, 8, distributed across boxes 2 and 3, satisfying the Unique Rectangle conditions.

1 Identify Deadly Pattern: If R3C8 were also reduced to only {4, 5}, all four cells would contain only {4, 5}. Then R1C4=4, R1C8=5, R3C4=5, R3C8=4 AND R1C4=5, R1C8=4, R3C4=4, R3C8=5 would both be valid, causing multiple solutions.
2 Conclusion: To avoid multiple solutions, R3C8 cannot be left with only {4, 5}. It must be filled with 1 or 8. Therefore, we can eliminate candidates 4 and 5 from R3C8.
Result:
Unique Rectangle Type 1: R1C4, R1C8, R3C4, R3C8 contain {4, 5}
Eliminate candidates 4 and 5 from R3C8, leaving {1, 8}

Type 2: Same Extra Candidate

Type 2 is characterized by: two floor cells (containing only {a, b}) and two roof cells, where both roof cells contain the same extra candidate x.

Type 2 Rule

If a UR has two floor cells {a, b} and two roof cells {a, b, x} (same extra candidate),
Then at least one roof cell must contain x (otherwise a Deadly Pattern forms), so other cells that see both roof cells can have candidate x eliminated.

Example Analysis

Unique Rectangle Type 2 Example
Figure: Unique Rectangle Type 2 - R2C4, R2C7, R3C4, R3C7 form a UR with {6, 8}, extra candidate 9
Open this example in solver

Observe the Unique Rectangle structure:

  • R2C4: Candidates {6, 8, 9} (roof cell)
  • R2C7: Candidates {6, 8} (floor cell)
  • R3C4: Candidates {6, 8, 9} (roof cell)
  • R3C7: Candidates {6, 8} (floor cell)

Both roof cells R2C4 and R3C4 have extra candidate 9, and they are in the same column (column 4).

1 Logic: To avoid the Deadly Pattern, at least one of R2C4 and R3C4 must be filled with 9. This means candidate 9 is "locked" in R2C4 and R3C4 within column 4.
2 Execute Elimination: Other cells in column 4, and cells that can see both R2C4 and R3C4, cannot contain 9. Specifically:
  • R2C6 (row 2 sees R2C4): Eliminate candidate 9
  • R3C5 (row 3 sees R3C4, box 2 sees R2C4): Eliminate candidate 9
  • R7C4 (column 4): Eliminate candidate 9
  • R9C4 (column 4): Eliminate candidate 9
Result:
Unique Rectangle Type 2: R2C4, R2C7, R3C4, R3C7 contain {6, 8}, extra candidate 9
Eliminate candidate 9 from R2C6, R3C5, R7C4, R9C4

Type 3: Subset

Type 3 combines Unique Rectangle with hidden/naked subset techniques. The two roof cells have different extra candidates, and these extra candidates form a subset relationship with other cells in the same unit.

Type 3 Rule

If two roof cells contain {a, b, x} and {a, b, y} (or {a, b, x, y} combinations),
And these extra candidates {x, y...} form a naked subset with other cells in the same row/column/box,
Then other cells in that unit can have the corresponding candidates eliminated according to subset rules.

Example Analysis

Unique Rectangle Type 3 Example
Figure: Unique Rectangle Type 3 - R4C1, R4C2, R8C1, R8C2 form a UR with {7, 8}
Open this example in solver

Observe the Unique Rectangle structure:

  • R4C1: Candidates {7, 8} (floor cell)
  • R4C2: Candidates {2, 7, 8} (roof cell, extra candidate 2)
  • R8C1: Candidates {7, 8} (floor cell)
  • R8C2: Candidates {2, 6, 7, 8} (roof cell, extra candidates 2, 6)
1 Analyze Roof Cells: Both roof cells R4C2 and R8C2 are in column 2. To avoid the Deadly Pattern, at least one must be filled with an extra candidate (2 or 6). In other words, R4C2 and R8C2 "together" must include at least one of {2, 6}.
2 Find Subset Relationship: Observe R9C2 in column 2, which has candidates {2, 6}. Since R4C2 and R8C2 must occupy numbers from {2, 6}, together with R9C2, these three cells "lock" {2, 6} in column 2.
3 Execute Elimination: Other cells in column 2 cannot contain 2 or 6:
  • R5C2: Eliminate candidate 2
  • R7C2: Eliminate candidates 2 and 6
Result:
Unique Rectangle Type 3: R4C1, R4C2, R8C1, R8C2 contain {7, 8}
Roof cells must keep at least one of {2, 6}, forming a subset with R9C2, locking {2, 6} in column 2
Eliminate 2 from R5C2, eliminate 2 and 6 from R7C2

Type 4: Strong Link

Type 4 utilizes the concept of strong links. When two roof cells are in the same row/column/box, and one of the UR pair candidates appears only in these two roof cells within that unit, a special elimination can be made.

Type 4 Rule

If two roof cells are in the same unit (row/column/box) and UR pair candidate a appears only in these two roof cells within that unit,
Then one of these roof cells must contain a (strong link), so they cannot both contain b. Therefore, we can eliminate the other UR pair candidate b from both roof cells.

Example Analysis

Unique Rectangle Type 4 Example
Figure: Unique Rectangle Type 4 - R5C1, R5C7, R6C1, R6C7 form a UR with {3, 6}
Open this example in solver

Observe the Unique Rectangle structure:

  • R5C1: Candidates {3, 6} (floor cell)
  • R5C7: Contains {3, 6} plus extras (roof cell)
  • R6C1: Candidates {3, 6} (floor cell)
  • R6C7: Contains {3, 6} plus extras (roof cell)

The two roof cells R5C7 and R6C7 are both in column 7 and both contain candidates 3 and 6.

1 Check Strong Link Condition: In column 7, candidate 3 appears only in R5C7 and R6C7. This means the 3 in column 7 must be placed in one of these two cells (forming a strong link).
2 Logic: Since one of R5C7 and R6C7 must be filled with 3, they cannot both be filled with 6. If both were 6, column 7 would have no place for 3.
3 Execute Elimination: Since the two roof cells cannot both be 6, and to avoid the Deadly Pattern they must "break" the state of containing only {3, 6}, we can eliminate candidate 6 from both roof cells:
  • R5C7: Eliminate candidate 6
  • R6C7: Eliminate candidate 6
Result:
Unique Rectangle Type 4: R5C1, R5C7, R6C1, R6C7 contain {3, 6}
R5C7, R6C7 must have 3 in column 7 (strong link), cannot both be 6
Eliminate candidate 6 from R5C7, R6C7

Comparison of Four Types

Type Floor Cells Roof Cells Characteristic Elimination Target
Type 1 3 1 Single roof cell has extra candidates Eliminate UR pair from roof cell
Type 2 2 2 Both roof cells have same extra candidate x Eliminate x from cells seeing both roof cells
Type 3 2 2 Extra candidates form subset with other cells Eliminate by subset rules from same unit
Type 4 2 2 One UR pair candidate forms strong link in roof cells' unit Eliminate other UR pair candidate from roof cells

How to Find Unique Rectangles?

1 Find Bivalue Cells: First, find cells with only two candidates (bivalue cells).
2 Check Rectangular Structure: See if two bivalue cells with the same candidates {a, b} can form a rectangle with two other cells (two rows, two columns, spanning two boxes).
3 Verify Other Two Cells: Check if the other two rectangle cells both contain {a, b} as candidates (may have other candidates too).
4 Determine Type and Execute: Based on floor/roof cell counts and characteristics, determine the type and execute the appropriate elimination.
Important Conditions:
  • The four UR cells must be distributed across exactly two boxes (not in one box, and not in three or four boxes)
  • The UR pair {a, b} must be common candidates in all four cells
  • The Unique Rectangle technique assumes the Sudoku has a unique solution; it doesn't apply to puzzles that may have multiple solutions

Summary

  • Core Idea: Use the "Sudoku must have a unique solution" rule to avoid Deadly Patterns
  • Identification: Four cells forming a rectangle across two rows, two columns, and two boxes, all containing the same two candidates
  • Type Selection: Choose handling method based on floor/roof cell counts and extra candidate distribution
  • Application: Advanced Sudoku solving, especially when other techniques cannot make progress
Practice Tips:
Unique Rectangle is a powerful advanced technique that requires practice to master. Suggestions:
  • Start practicing with Type 1 - it's easiest to identify and understand
  • Get comfortable with pencil marks - this makes it easier to spot potential rectangular patterns
  • Remember the key criteria: four cells, two rows, two columns, two boxes, same pair
  • Types 3 and 4 require knowledge of other techniques (subsets, strong links) - master those first
Practice Now:
Start a hard difficulty Sudoku game and try to find and apply the Unique Rectangle technique!