X Wing Sudoku: Find the Rectangle That Clears Candidates

An X Wing pattern in Sudoku and the X-Wing technique in Sudoku explained through a candidate elimination example.

You have filled the easy cells, but a 7 still seems possible in several places. An X Wing pattern in Sudoku can turn those scattered pencil marks into a reason to erase some of them. The X-Wing technique in Sudoku works with one digit at a time, so start by looking only at your 7s.

A candidate is a digit that could still go in an empty cell under the deductions you have made so far. Before hunting, update your pencil marks: a missing candidate can make a false rectangle look convincing. In x wing sudoku, the four corners identify possible positions, not four cells you immediately fill.

X-Wing Sudoku: A worked example

Imagine a partially solved puzzle in which the candidate 7 occurs in these positions:

  • Row 2: only column 3 and column 8.
  • Row 6: only column 3 and column 8.
  • Elsewhere: candidate 7 also appears in row 4, column 3, and row 9, column 8.

Write a cell as r2c3 for row 2, column 3. The four corners are r2c3, r2c8, r6c3, and r6c8. These form a rectangle; it need not be a square. The other two listed cells are outside the corners of this Sudoku X Wing. For this teaching example, assume the candidate notes are complete and consistent with the puzzle.

In x-wing sudoku, the logic follows two possible arrangements. Row 2 must place its 7 in either c3 or c8. If it goes in c3, row 6 cannot also put a 7 in c3, so row 6 must use c8. If row 2 uses c8 instead, row 6 must use c3. Either way, the two rows supply a 7 to each of those columns.

That is the X-Wing in a Sudoku grid: you do not know which diagonal contains the 7s, but both columns are accounted for. Remove 7 from r4c3 and r9c8, as well as any other non-corner cells in columns 3 and 8 that list 7. Keep all four corner candidates until another deduction settles them.

What the pattern does next

An X Wing in a Sudoku puzzle eliminates candidates; it may not immediately place a digit. If r4c3 had only 7 and 4 penciled in, removing 7 leaves 4 as its only candidate. If it also had 1, both 1 and 4 remain possible. After applying the X Wing to your Sudoku, check the affected cells, rows, columns, and boxes for new deductions.

The same reasoning works sideways. In a column-based X-Wing for Sudoku, find two columns where the chosen digit has exactly two candidate positions each, aligned in the same two rows. Then remove that digit from the other cells in those rows. The base lines are the two columns; the elimination lines are the two rows.

An X Wing Sudoku pattern can be valid even when there is nothing to erase on its elimination lines. That is a correct observation with no immediate payoff, so move on and return after the grid changes. A pencil-mark rectangle is a tool, not a command to guess.

A convincing look-alike

Suppose row 2 has candidate 7 in columns 3 and 8, but row 6 has it in columns 3, 5, and 8. Four marks still sit at the corners, yet row 6 has a third option. If row 2 takes c3, row 6 might take c5, leaving c8 available elsewhere. The proposed column elimination therefore does not follow.

For the Sudoku X Wing test, scan the entire two base rows, not just the corners. Other candidates may appear in the two cover columns; those are the potential eliminations. Other digits can also remain in the four corner cells. The restriction concerns only the selected digit in the base rows.

Quick check before erasing

  • Pick one digit and two base rows or two base columns.
  • Confirm exactly two candidates for that digit in each base line, aligned in the same two crossing lines.
  • Erase that digit only from other cells on those crossing lines; keep the four corners.
  • Recheck affected cells for a single remaining candidate, then continue solving.