Hard technique

XY-Wing

An XY-Wing is a short chain of three cells that work together to force a single digit out of somewhere else on the grid. Each of the three cells holds exactly two candidates, and between them they cover only three digits. Follow the logic through and one conclusion becomes unavoidable: a particular cell can no longer hold a particular digit. No guessing, no colouring — just a tidy three-cell argument.

Pivot r1c8 {1, 7} with pincers r1c6 and r2c9 forces 9 out of every cell that sees both pincers.

The idea

Most techniques you meet early on look at a single unit — a row, a column, a box — and squeeze it until a digit has nowhere left to go. The XY-Wing is different. It stretches across the grid and links three separate cells by their candidates, then uses that link to make a promise about a fourth cell somewhere else.

The building block is the bi-value cell: a cell with exactly two candidates and nothing more. These are quietly useful, because a bi-value cell is a coin flip. It will end up as one of its two digits, and you may not know which yet, but you know it is one or the other. The XY-Wing takes three such coins and arranges them so that, whichever way the first one lands, a second cell is pushed to the same value. That shared value is the thing you get to eliminate.

So the pattern you are hunting for is not the emptiest region of the grid. It is three bi-value cells, sharing three digits between them, sitting in the right geometric relationship. Once you learn to spot the shape, the eliminations follow on their own.

Pivot and pincers

The three cells have names, and the names carry the mechanics. One cell is the pivot. It holds two candidates — call them x and y — and it is the hinge the whole pattern turns on. The other two cells are the pincers. Each pincer must see the pivot, meaning it shares a row, a column, or a box with it.

The candidates are what make it work. One pincer holds {x, z}: it shares the digit x with the pivot, plus a new third digit z. The other pincer holds {y, z}: it shares the digit y with the pivot, plus that same z. Between the three cells you use exactly three digits — x, y, and z — and the crucial one is z, the digit the two pincers have in common but the pivot does not carry at all.

That last detail is the whole trick. The pivot cannot be z, so it acts as a switch: whichever of x or y it takes, it knocks that digit out of the corresponding pincer and leaves the pincer with only z. Notice what the pincers are not required to do: they need not see each other. They can sit in different boxes, different rows, different columns. The only cell that has to see both pincers is the one you are about to eliminate from.

Walk through the example

Look at the grid above. The pivot is r1c8, outlined in blue, holding {1, 7}. So here x is 1 and y is 7. Its two pincers, also outlined in blue, are r1c6 holding {1, 9} and r2c9 holding {7, 9}. The digit the pincers share, and the pivot lacks, is z = 9. Each pincer sees the pivot: r1c6 shares row 1 with it, and r2c9 shares column 8's box, or more precisely sits where it can see r1c8 along the grid's geometry.

Now run the case-split. The pivot r1c8 is either 1 or 7 — those are its only options. Suppose it is 1. Then r1c6, which shares row 1 with the pivot, cannot also be 1, so from {1, 9} it is forced to 9. Now suppose instead the pivot is 7. Then r2c9, which sees the pivot, cannot be 7, so from {7, 9} it is forced to 9. Two branches, and in both of them one of the pincers becomes 9.

That is the promise: at least one pincer is 9, come what may. So any cell that sees both pincers cannot be 9 — if it were, it would clash with whichever pincer turned out to be 9. The cell that qualifies here is r2c6, shaded red above with its 9 struck through. It shares row 2 with the pincer r2c9 and column 6 with the pincer r1c6, so it sees both. Whichever branch the puzzle takes, a 9 lands in one of the cells r2c6 can see, and so 9 comes out of r2c6 for good.

Why it is watertight

It is worth being clear about why this is a proof and not a hopeful guess. The argument rests on a single fact: the pivot must be one of its two candidates. There is no third option to worry about, because a bi-value cell has exactly two. That lets you split the world cleanly into two cases and check them both.

In the first case the pivot takes x, which forces the {x, z} pincer to z. In the second case the pivot takes y, which forces the {y, z} pincer to z. Every possible future of the puzzle falls into one of those two cases, and both of them deliver a z into a pincer. So the statement "one of the two pincers is z" is not likely or probable — it is certain, across every solution the puzzle could have.

From there the elimination is just the ordinary Sudoku rule that a digit appears once per unit. A cell that sees both pincers shares a unit with each. Since one pincer is definitely z, that cell cannot also be z. The conclusion inherits the certainty of the case-split. This is why you can strike the digit out with the same confidence you would use for a naked single, even though the reasoning reaches across three cells to get there.

In practice

To find one at the board, start from the bi-value cells and treat each in turn as a candidate pivot. For a pivot holding {x, y}, look along its row, column, and box for a bi-value cell that shares exactly one of those digits and adds a third — that is your first pincer, {x, z} or {y, z}. Then look for a partner pincer carrying the other pivot digit and the same z. When you have both, ask the only remaining question: is there a cell that sees both pincers? If there is, and it holds z, that z is dead.

A few habits make the search quicker. Keep your pencil-marks honest, because the pattern lives entirely in the candidate lists and a stray mark will hide it. Scan for the shared z early — if two would-be pincers do not agree on a third digit, there is nothing to chase. And remember that the pincers roam free while only the victim cell must see both; that is the reverse of what beginners expect, so let the elimination target, not the pincers, anchor your looking.

The XY-Wing rarely cracks a puzzle on its own. What it does is unstick one that has gone quiet, clearing a single candidate that reopens a naked single or a hidden pair elsewhere. Learn to reach for it when the easy scans dry up, and you will find the grid starts moving again.

Practise this technique

These puzzles from the archive all use xy-wing on the way to the answer. Play one, then reach for the Hint button when you want the solver to name the next move.

Want a full walkthrough of a whole grid? Paste one into the step-by-step solver, or browse all techniques.