X-Wing Walkthrough

An X-Wing forms when a candidate is restricted to the same two columns in two different rows (or two rows in two columns). The digit must occupy opposite corners of that rectangle, so it can be eliminated elsewhere in those lines.

Sudoku board with pencil-mark candidates before applying the X-Wing technique
Before — candidates pencilled in. There is an X-Wing with the number 2.

There is an X-Wing with the number 2. Applying the X-Wing eliminates 1 candidate and solves 1 cell (struck out in red below; any solved cells shown in green).

The same Sudoku board after the X-Wing technique eliminates 1 candidate and solves 1 cell
After applying the X-Wing.

Reading this board

The pattern on this puzzle involves the candidate 2. Work from the before-image above: find the x-wing for yourself before scrolling to the after-image, since the point of a worked example is the search, not the answer. The eliminations here immediately resolve a cell, so this move both cleans the grid and produces a placement you can build on.

Why the deduction is valid

Take a digit that appears as a candidate in exactly two cells of one row, and exactly two cells of another row, with all four cells lining up in the same two columns. Those four cells form a rectangle. Each of the two rows must place the digit in one of its two corners, and because the corners share columns, the two placements are forced onto opposite corners — either the two on one diagonal or the two on the other. Whichever diagonal it is, both columns end up containing the digit inside the rectangle, so it can be eliminated from every other cell of those two columns. The same argument works with the roles of rows and columns swapped.

How to spot a X-Wing on your own board

  • Choose one digit and mark every cell that could still hold it across the whole grid. Then read the rows: you want two rows in which that digit has exactly two possible homes.
  • Check whether those two pairs sit in the same pair of columns. If they do, the rectangle is real; if the columns differ, move on.
  • Repeat reading the columns instead of the rows. An X-Wing found column-wise eliminates along rows.
  • Digits that are already placed five or six times are the most productive to test, because their remaining candidates are sparse enough to line up.

Common mistakes

  • Accepting a row where the digit has three possible cells. Exactly two per line is the requirement — with three, the digit could escape the rectangle.
  • Eliminating along the wrong axis. A row-based X-Wing clears the two columns, not the two rows. The rows are already fully accounted for and contain nothing to remove.
  • Deleting the corners themselves. The four corners are the only cells that keep the candidate.

What to do next

X-Wing eliminations often unlock a Hidden Single further down one of the cleared columns, since removing the digit from several cells can leave it exactly one home elsewhere. Follow the cleared lines first, then re-scan normally.