X-Wing
A digit forms a rectangle across two rows and two columns.
An X-Wing is a single-digit elimination pattern that spans two rows and two columns at once: when one candidate is confined to the very same two columns in two separate rows, those four cells form a rectangle whose geometry forces eliminations elsewhere. The X-Wing sudoku technique is usually the first "fish" pattern a solver learns, and it relies purely on where a digit is allowed to sit — no trial cells, no guessing, just the fact that each row and each column holds every digit exactly once.
Worked example
In this grid row 1 is only open at R1C2, R1C6 and R1C9, and row 5 is only open at R5C2, R5C6 and R5C9, so digit 7 has just three homes in each row. The 7 already placed at R9C9 forbids a 7 anywhere in column 9, which knocks out R1C9 and R5C9 and pins the 7 in both rows to columns 2 and 6 — the corners R1C2, R1C6, R5C2 and R5C6. Because row 1's 7 and row 5's 7 are forced onto opposite corners of that rectangle, columns 2 and 6 each receive their 7 from one of these two rows, so every 7 candidate elsewhere in column 2 or column 6 can be eliminated.
When to use it
Reach for an X-Wing once singles, locked candidates and naked or hidden pairs have all stalled and you are staring at a grid full of two- and three-candidate cells. To spot one, fix on a single digit and hunt for two rows in which that digit has exactly two possible cells; if those cells fall in the same pair of columns, you have an X-Wing and can sweep that digit out of the rest of both columns (and the mirror-image version works for two columns aligned on the same pair of rows).
How to use it
- Find two matching rows. Find a digit that appears as a candidate in exactly two cells of two different rows, and those cells line up in the same two columns.
- Form the rectangle. The four cells form a rectangle. The digit must occupy one diagonal pair, so the two columns are spoken for.
- Eliminate down the columns. Remove the digit from every other cell in those two columns (the same logic works swapping rows and columns).
Frequently asked questions
What is an X-Wing in Sudoku?
An X-Wing is a single-digit technique built on four cells forming a rectangle. When one candidate — say 7 — appears in only two cells of a row, and in another row that same digit is restricted to the identical two columns, the digit must occupy one diagonal pair of the rectangle's corners. In the example board, 7 sits only at R1C2/R1C6 in row 1 and only at R5C2/R5C6 in row 5, so 7 can be removed from every other cell in columns 2 and 6.
How do I spot an X-Wing on the grid?
Pick one digit and scan row by row for a row where that digit has exactly two candidate positions. Note the two columns those positions use, then look for a second row where the same digit is again limited to those exact two columns. When you find that match — as rows 1 and 5 both confine 7 to columns 2 and 6 here — the four cells form the X-Wing and you eliminate the digit from the two shared columns.
Does an X-Wing eliminate from the rows or the columns?
It eliminates from the opposite direction to its base lines. A row-based X-Wing (two rows sharing two columns, like the 7 across rows 1 and 5) clears the digit from those two columns; a column-based X-Wing (two columns sharing two rows) clears it from those two rows. You never remove the digit from the base rows themselves — it still has to live in one corner of each — only from the crossing lines.