X-Wing
An X-Wing is a single-digit pattern. If, in two different rows, a digit can only go in the same two columns, then those two columns each have their copy of the digit inside those two rows. So the digit can be removed from every other cell of the two columns. The same works with rows and columns swapped.
Level: first needed at Expert · Technique 8 of 12 in our grading order
Real position from our expert pool (puzzle #8). Press Next step to see how x-wing applies.
Why it works
Take digit 6. In row 2, a 6 can only go in columns 3 and 8. In row 7, a 6 can also only go in columns 3 and 8. The four cells form the corners of a rectangle. Row 2’s 6 is in column 3 or column 8; row 7’s 6 must then be in the other one, since two 6s cannot share a column. Either way, the 6 of column 3 and the 6 of column 8 are both in rows 2 and 7.
Therefore no other cell of column 3 or column 8 can be 6. The two diagonals of the rectangle are the two possible solutions — that crossed shape gives the technique its name.
How to spot it
Work one digit at a time with full notes. For each row, count how many cells can hold the digit. Note every row where it can go in exactly two places. If two of those rows use the same two columns, you have an X-Wing — check the two columns for other candidates of the digit to find the eliminations. Then repeat with columns as the base, looking at rows.
Digits that are already placed six or seven times are the best candidates: few positions remain, so “exactly two” is common. The example board, from our Expert pool, is a position where every easier technique had been exhausted. Step through to see the four corners and the candidate the X-Wing clears.
Generalising: fish
The X-Wing is the size-2 member of a family called fish. With three rows whose candidates for a digit fall into the same three columns, you get a Swordfish; with four, a Jellyfish. The logic is identical: n base rows covering n columns means those columns’ copies of the digit are used up by the base rows.
Seen another way, the X-Wing is also the simplest case of simple coloring: each base row is a strong link (the digit is in one of two cells), and the rectangle is a closed loop.
Common mistakes
Each base row must have the digit in exactly two cells, and they must be the same two columns. A row with three candidates breaks a simple X-Wing (though it may be part of a Swordfish). The eliminations are in the cover lines — the columns if you started from rows — and never in the base rows themselves. Finally, make sure your notes for the digit are complete: a single missing candidate can create a fake X-Wing.
Where it sits in our grading
X-Wing is tier 4 alongside naked and hidden triples. Puzzles that need one and nothing harder make up our Expert pool, and the X-Wing is the most frequent tier-4 move in it. Our hint engine reports the digit, the base lines and the cells cleared.
Practice
Take an Expert puzzle to the point where pairs and locked candidates run out. Then for each digit, write down its candidate columns per row on a scrap of paper — nine short lists. X-Wings jump out from the lists instantly. After a while you will be able to do it by eye, starting with the most-placed digits.
Quick checklist
- Pick one digit and list, row by row, the columns where it can go.
- Keep only rows with exactly two positions.
- Two rows with the same two columns form the X-Wing: clear the digit from the rest of both columns.
- Repeat with columns as the base lines, then move to the next digit.
About the example board
The board comes from puzzle #8 of our Expert pool. It started with 28 givens; at this point 59 cells are filled and the remaining 22 empty cells hold 50 pencil-mark candidates. Our grader tried every easier technique first and none of them applied — x-wing was the simplest way forward. The move removes 1 candidate: X-Wing on 2: in row 3, row 7 the 2s are locked into the same 2 columns, so remove 2 from R9C5.
After applying it, the next step the grader finds is a hidden single: In row 9, 2 can only go in R9C9. That is typical: one harder move usually unlocks a run of easier ones.
Related techniques
Written by Nina Patel. Example board generated by the Sudokua grader from our own puzzle pool. See all techniques.