What is X-Wing in Sudoku?
X-Wing is the first truly advanced technique most solvers encounter. It looks intimidating at first but once you understand the underlying logic it becomes a reliable tool for Hard and Expert puzzles.
When X-Wing Applies
X-Wing applies to a specific digit when it appears as a candidate in exactly two cells in one row, and those two cells are in the same two columns as exactly two candidates for the same digit in another row. The four candidate cells form the corners of a rectangle - The shape that gives the technique its name.
The Logic
If digit D can only go in columns C1 and C2 in row R1, then D must occupy one of those two cells. The same applies to row R2. Together the two rows will place D in columns C1 and C2 - One each, in some order. This means D cannot appear anywhere else in columns C1 or C2. Remove it from all other cells in those two columns.
Worked Example
Digit 6 is a candidate in exactly two cells in row 2: columns 3 and 7. Digit 6 is also a candidate in exactly two cells in row 8: columns 3 and 7. The four cells form corners at R2C3, R2C7, R8C3, R8C7.
No matter how the solution assigns 6 in rows 2 and 8, column 3 will receive a 6 in one of those rows and column 7 will receive it in the other. Therefore eliminate 6 from all other cells in columns 3 and 7.
Column-First X-Wing
The pattern works starting from columns too. If digit D appears as a candidate in exactly two cells in column C1, and those cells share the same two rows as exactly two candidates for D in column C2, eliminate D from all other cells in those two rows. Same logic, same result, different orientation.
What Comes After X-Wing
Swordfish extends X-Wing to three rows (or columns). Beyond that lie Jellyfish (four rows/columns), XY-Wings, and multi-step chains. X-Wing is the entry point to this entire family of advanced patterns - Master it first.