Puzzle PicnicBlog

Naked and Hidden Pairs in Sudoku, Explained With Examples

How naked and hidden pairs and triples work in sudoku, why they are safe, how to spot them fast, and worked examples you can check yourself.

A naked pair in sudoku is two squares in the same row, column or box whose only candidates are the same two digits: those digits can then be removed from every other square in that unit. A hidden pair is two digits that, within a unit, fit only the same two squares: every other candidate in those squares can be removed. Triples follow the same logic with three. This guide is for solvers who already take notes and want the next step up from singles.

The idea behind every pair and triple

Pairs and triples in sudoku all rest on one counting fact: if a group of squares in a unit can hold only as many different digits as there are squares, those digits are used up inside the group. Two squares that can only be 3 or 7 will hold the 3 and the 7 between them, in some order. No other square in that unit can have either digit.

The hidden version counts the other way. If two digits can only go in the same two squares of a unit, those squares are reserved for them, so they cannot hold anything else.

A few terms used below. A unit is a row, a column or a box. Candidates are the digits still possible in a square, which you track as notes. R5C8 means row 5, column 8. In the tables, bold digits are already placed and the other entries are candidates. Each example is one unit of a puzzle in progress, and you can check every removal by trying each way of filling that unit.

TechniqueSquaresDigitsWhat you remove
Naked pair2 squares holding only the same 2 digits2Those digits from the rest of the unit
Hidden pairThe only 2 squares where 2 digits fit2Every other digit from those 2 squares
Naked triple3 squares holding only 3 digits between them3Those digits from the rest of the unit
Hidden tripleThe only 3 squares where 3 digits fit3Every other digit from those 3 squares

Naked pairs: two squares, two digits

A naked pair is the easiest of the four to see, because the two squares look alike: each has exactly two notes, and they are the same two. HoDoKu's definition: if two cells in the same house have only the same two candidates left, you can eliminate those candidates from all other cells in that house (HoDoKu: naked subsets).

Here is column 3 of a puzzle in progress, read from top to bottom.

SquareBeforeAfter the pairAfter placing the 5
R1C3282828
R2C35855
R3C324684646
R4C335635636
R5C32345834534
R6C3282828
R7C3777
R8C3999
R9C3111

R1C3 and R6C3 both hold only 2 and 8. One of them is the column's 2 and the other its 8, so:

  1. R2C3 loses its 8 and is left with 5 alone, a naked single.
  2. R3C3 loses 2 and 8 and drops to 4 or 6.
  3. R5C3 loses 2 and 8 and drops to 3, 4 or 5.
  4. Placing the 5 in R2C3 then removes 5 from R4C3 and R5C3.

One pair, five removals and a placed digit. That cascade is typical: a pair never places a digit itself, but it often leaves a single behind.

Locked pairs

If the two squares of a naked pair share a box as well as a row or column, the pair works in both units at once. HoDoKu notes these are sometimes called locked pairs, and candidates can be eliminated from both houses. Whenever you find a pair, check whether its squares share a second unit.

Hidden pairs: two digits, two squares

A hidden pair is harder to see than a naked one, because the two squares are usually full of other notes. The pattern is in the digits: two digits that each have only two possible squares in a unit, and the same two squares. HoDoKu puts it as two candidates that appear nowhere outside two cells of a house, so they must be placed in those two cells (HoDoKu: hidden subsets).

Column 9 of another puzzle:

SquareBeforeAfter
R1C934567939
R2C91456714567
R3C988
R4C914571457
R5C9135939
R6C95757
R7C922
R8C9167167
R9C9167167

Column 9 still needs a 3 and a 9. Look down the column: 3 appears only in R1C9 and R5C9, and so does 9. Those two squares must hold the 3 and the 9, so they cannot hold anything else. R1C9 drops from six candidates to two, and R5C9 from four to two. The hidden pair has become a naked pair.

The way to find hidden pairs is to count by digit rather than by square: for each unit, note how many places each missing digit has. Two digits with the same two places are a hidden pair.

Naked triples: three squares, three digits

A naked triple is three squares in a unit that hold only three different digits between them. The squares do not need all three digits each. SudokuWiki lists the possible shapes: 123, 123 and 123; 123, 123 and 12; 123, 12 and 23; and 12, 23 and 13 (SudokuWiki: naked candidates). The last one, with no square holding all three digits, is the easiest to miss.

Row 2 of a third puzzle:

SquareC1C2C3C4C5C6C7C8C9
Before2451245812358724562534593489
After24518138724562539389

R2C1, R2C5 and R2C7 hold 245, 245 and 25: three squares, and only the digits 2, 4 and 5 between them. Those three digits are used up there, so they leave the other four empty squares. R2C2 drops to 1 or 8, R2C3 to 1, 3 or 8, R2C8 to 3 or 9, and R2C9 to 3, 8 or 9. Eight candidates go in one step.

Row 2 after the naked triple (one row of a puzzle). Single digits are placed; the highlighted squares are the triple, the others show their remaining candidates.

Hidden triples: three digits, three squares

A hidden triple is three digits that, within a unit, can only go in the same three squares. As with naked triples, each digit need not appear in all three squares; what matters is that the three digits together are confined to three squares.

Column 3 of a fourth puzzle:

SquareBeforeAfter
R1C312591259
R2C3129129
R3C3259259
R4C388
R5C31367367
R6C313737
R7C3126767
R8C3129129
R9C344

The column needs 3, 6 and 7. The 3 can go in R5C3 or R6C3; the 6 in R5C3 or R7C3; the 7 in R5C3, R6C3 or R7C3. All three digits live in the same three squares, so those squares hold nothing else. R5C3 and R6C3 lose their 1, and R7C3 loses its 1 and 2.

Naked and hidden sets are two sides of one coin

In any unit, a naked set and a hidden set always come together: if k squares hold only k digits, then the remaining empty squares hold the remaining digits and nothing else, which is a hidden set of the other size. The removals are the same either way. That is useful, because you can look for whichever side is smaller.

The four examples show it:

ExampleEmpty squaresThe set you seeThe same deduction from the other side
Column 3, naked pair {2,8}6Naked pair in R1C3 and R6C3Hidden four {3,4,5,6} in the other four squares
Column 9, hidden pair {3,9}7Hidden pair in R1C9 and R5C9Naked five {1,4,5,6,7} in the other five squares
Row 2, naked triple {2,4,5}7Naked triple in C1, C5 and C7Hidden four {1,3,8,9} in the other four squares
Column 3, hidden triple {3,6,7}7Hidden triple in R5C3 to R7C3Naked four {1,2,5,9} in the other four squares

You would never hunt for a naked five: the hidden pair is the same deduction and far easier to see. Because a unit has at most nine squares, one side of every set has four squares or fewer. So pairs, triples and the occasional quad cover every case, and you never need to look for anything bigger.

How to spot pairs and triples quickly

Spotting pairs and triples is a scanning habit, and it only works once your notes are complete and up to date. A routine that covers all four:

  1. Bivalue squares first. Scan the grid for squares with exactly two candidates. For each, check its row, column and box for a twin. That finds every naked pair.
  2. Digits with two spots. In each unit, find the digits that have exactly two possible squares. Two such digits with the same two squares are a hidden pair. Notes in the two-square style, where you mark a digit only when it has two spots in a box, show these directly: see sudoku notes and pencil marks.
  3. Crowded units for triples. Triples hide in units with five or more empty squares. Look for three squares with two or three candidates each, drawn from the same three digits.
  4. Check the second unit. When you find a pair or triple, ask whether its squares also share a box or a line. If they do, remove in both.
  5. Go back to singles. After the removals, look at the squares that changed. A naked or hidden single is often waiting.

Three mistakes to avoid: squares that do not share a unit are never a pair, however alike their notes; three squares with four digits between them (12, 23, 34) are not a triple; and a pattern built on stale notes is not real, so erase placed digits from neighbours' notes as you go.

Frequently asked questions

What is the difference between a naked pair and a hidden pair?

A naked pair is defined by squares: two squares in a unit that hold only the same two digits, which you then remove from the rest of the unit. A hidden pair is defined by digits: two digits that fit only the same two squares of a unit, so you remove every other candidate from those squares. Every naked pair has a hidden partner in the rest of the unit, and the other way round.

Do the squares of a naked triple all need three candidates?

No. Three squares holding 12, 23 and 13 are a naked triple, because between them they hold only the digits 1, 2 and 3. What matters is the total count of different digits across the three squares, not how many each square has.

Can a naked pair be in a box?

Yes. Any unit works: row, column or box. If the two squares share a box and a row (or a column), the pair works in both units, so you can remove its digits from both.

Are there naked and hidden quads?

Yes: four squares holding four digits, or four digits confined to four squares. They work exactly like pairs and triples but are rare, and one side of any set is always four squares or fewer, so you never need to look beyond quads.

Where to go next

Pairs and triples sit in the middle of the technique ladder. Below them are pointing and claiming; above them are the patterns that work across several units at once, starting with X-Wing and Swordfish. The whole ladder, from singles to colouring, is in sudoku strategies. If you are not yet taking notes, start with how to play sudoku.

To practise, play the Hard and Expert levels of Puzzle Picnic's sudoku. They are classic 9x9 grids, and the app's solver, which checks every puzzle, knows naked and hidden pairs and triples. More guides are on the sudoku topic page.

Sources