XY-Wing
An XY-Wing is a three-cell Sudoku pattern built from bivalue cells — cells with exactly two candidates left. One cell acts as the pivot, holding candidates {X, Y}, and two pincer cells each see the pivot: one carries {X, Z}, the other {Y, Z}. Because the pivot must resolve to either X or Y, one pincer is always forced to Z. Any cell that sees both pincers can't be Z, so Z gets eliminated from it.
What is an XY-Wing?
An XY-Wing is a single-digit elimination built on three bivalue cells. The pivot has two candidates, say X and Y. Two pincer cells each share a unit with the pivot: the first pincer has {X, Z}, the second has {Y, Z}. The pivot can only be X or Y. If it's X, the first pincer can't be X (it sees the pivot), so it must be Z. If it's Y, the second pincer can't be Y, so it must be Z. Either way, one of the two pincers ends up holding Z. That means any cell that sees both pincers — shares a row, column, or block with each — can't be Z, because it would clash with whichever pincer actually gets it. Unlike fish patterns, an XY-Wing doesn't need a digit restricted to a fixed number of cells per house; it just needs three bivalue cells in the right visibility relationships.
How to spot it
XY-Wings are easy to miss because they don't follow the row-and-column geometry of fish patterns. The practical way in is to scan bivalue cells — cells with exactly two pencil marks — and pick one as a candidate pivot. For each pivot with candidates {X, Y}, look for two other bivalue cells that both see the pivot: one sharing X with it (so it has {X, Z}) and one sharing Y (so it has {Y, Z}), where Z is the same digit in both. If you find that trio, check whether any cell sees both pincers — if so, Z can be removed from it. Bivalue cells become common once the grid is partly solved and candidates have been narrowed down, so XY-Wings tend to appear in the middle-to-late game.
The logic
Each bivalue cell has exactly two candidates, so it must take one of them. The pivot, with {X, Y}, is either X or Y. A pincer that sees the pivot and shares one of those candidates can't take that candidate (the pivot already occupies it in their shared unit), so the pincer is forced to its other candidate. When one pincer shares X with the pivot and the other shares Y, and both pincers share the same third candidate Z, the pivot's two cases force a different pincer to Z each time — but always one of them. Any cell visible to both pincers therefore can't be Z, since it would conflict with the pincer that holds it. It's a compact forcing chain that needs only bivalue cells and mutual visibility, no strong links required.