TechniquesIntermediate

X-wing

When a digit's only two cells across two rows form a rectangle in two columns — eliminating that digit from the rest of those columns. Or the same shape rotated 90°.

Published

The X-wing is the first intermediate technique most solvers learn. It's a hidden-single argument applied to two rows or columns at once. When a digit has exactly the same two possible columns in two different rows, those two pairs of cells form a rectangle — and the digit must occupy two corners of that rectangle, one in each row. Every other cell in those two columns can have the digit ruled out.

How to spot one

Pick a digit. Find two rows where the digit's only possible cells fall in exactly the same two columns. The four cells form a rectangle. The digit must occupy two diagonally-opposite corners — we don't know which diagonal yet, but in either case, the digit lives only inside those two columns within those two rows. So the digit can be eliminated from every other cell of both columns outside the two rows.

Worked example: digit 4 is restricted to columns 2 and 7 in row 1, and to columns 2 and 7 in row 6. Those four cells are (1, 2), (1, 7), (6, 2), and (6, 7). The 4s in rows 1 and 6 must occupy two of those four cells in a diagonal pattern. Either way, columns 2 and 7 each have the 4 placed inside one of the two rows — so the 4 can be ruled out from every other cell of columns 2 and 7.

The same logic works rotated 90°: if a digit's only two rows in two columns match up, the row-elimination version fires. Sudoku Mountain's solver tracks the row-based and column-based variants as distinct technique labels because the trace describes which axis was scanned, but the underlying claim is identical.

Why it works

The X-wing is a hidden single in disguise. Each of the two rows individually is a hidden-single argument: the digit has only two possible cells in this row. The X-wing combines two such arguments: because the same two columns appear in both rows, the column can't accommodate the digit anywhere else, even if its constraint within either row alone wouldn't have ruled it out.

When you'll see it

X-wings show up reliably on hard puzzles and many medium ones. They're the gateway move past the singles-pairs-triples-locked-candidates layer. Most solvers stall on their first hard puzzle until they internalise the X-wing's two-rows-at-once perspective, then suddenly the technique appears everywhere.

For a longer take on why the X-wing keeps tripping people up — and the perspective shift that makes it click — see Why the X-wing keeps tripping people up. For a personal-experience walk-through, see The puzzle that taught me the X-wing.

See also

  • Hidden singleA digit with only one possible cell within a unit (row, column, or 3×3 box) — even if that cell could legally hold other digits. The unit-first sibling of the naked single.
  • SwordfishThe X-wing's three-row counterpart. When a digit's possible cells across three rows fall in the same three columns, that digit can be eliminated from those columns elsewhere.
  • Y-wing (XY-wing)Three bivalue cells where the pivot shares one candidate with each wing — eliminating the third candidate from any cell that sees both wings.
  • CandidateA digit (1–9) a cell could still legally hold — one not yet ruled out by anything in its row, column, or 3×3 box. Every empty cell has between one and nine.

Read more