The X-Wing is the first truly “advanced” Sudoku technique most players learn, and it marks the jump from hard to expert puzzles. Unlike the techniques before it, it does not look inside a single row, column or box. It looks at one digit across two rows and two columns at the same time. That sounds complicated, but the pattern is simple and, once you have seen it, surprisingly easy to spot. This guide explains it step by step on a real expert puzzle.
What is an X-Wing?
An X-Wing is a pattern for a single digit. In two different rows, the digit can go in exactly two cells each, and those cells sit in the same two columns. The four cells form a rectangle. The digit must fill two opposite corners, so it can be removed from every other cell in those two columns.
The logic takes one paragraph. Take the digit 9. Row 4 must contain a 9, and it can only be in column 5 or column 8. Row 9 must also contain a 9, again only in column 5 or column 8. There are just two ways this can work out: either row 4 uses column 5 and row 9 uses column 8, or row 4 uses column 8 and row 9 uses column 5. Those are the two diagonals of the rectangle. In both cases, column 5 gets its 9 from row 4 or row 9, and so does column 8. So no other cell in column 5 or column 8 can be a 9.
An X-Wing step by step
Here is an X-Wing from a real expert-level position. We show only the cells where 9 is still a candidate. Rows 4 and 9 each have exactly two candidates for 9, and both rows use columns 5 and 8. Step through the diagram to see the rectangle form and the eliminations it creates.
Four candidates disappear in one move. With the 9 gone from R1C5, R2C5, R2C8 and R3C8, boxes 2 and 3 have far fewer options for 9, and new singles usually follow within a move or two.
Row-based and column-based X-Wings
Every X-Wing has two orientations, and you should check both. In a row-based X-Wing, the digit’s candidates are confined in two rows, and the eliminations happen in the columns. In a column-based X-Wing, the candidates are confined in two columns, and the eliminations happen in the rows. The logic is identical, just rotated.
A simple rule keeps the direction straight: the eliminations always happen in the lines you did not start from. If you found the pattern by looking at rows, clear the columns. If you found it by looking at columns, clear the rows. Mixing this up is the most common X-Wing error, and it produces eliminations that can break the puzzle. Sudokual’s hints and step-by-step solver always state which lines the pattern uses and which ones lose candidates.
How to find an X-Wing
The trick to finding an X-Wing is to stop looking at the whole grid and focus on a single digit. For that digit, list the rows where it has exactly two possible cells, and note their columns. If two rows share the same pair of columns, you have found an X-Wing. Then repeat the process with columns.
- Make sure candidates are complete. A single missing candidate can create a false X-Wing.
- Pick one digit, ideally one that has been placed several times already, so few candidates remain.
- Write down each row’s column pair for rows with exactly two candidates, such as “row 4: 5 & 8”.
- Look for a repeat. Two rows with the same column pair form an X-Wing.
- Do the same for columns, listing row pairs.
- Eliminate and rescan for singles in the affected columns or rows.
X-Wing, Swordfish and Jellyfish
The X-Wing is the smallest member of a family of techniques called “fish”. A Swordfish uses three rows and three columns, and a Jellyfish uses four. The rule is the same: if a digit’s candidates in N rows all fall within the same N columns, the digit can be removed from the rest of those columns.
A Swordfish is harder to see because its rows can have two or three candidates each, and not every row needs to use all three columns. For example, rows with candidates in columns 5, 9 and 9 still form a Swordfish on columns 2, 5 and 9. Sudokual’s Expert puzzles sometimes require a Swordfish, while Evil puzzles may go further. If you are comfortable with the X-Wing, the Swordfish is a natural next step.
Common X-Wing mistakes
The two most common mistakes are eliminating in the wrong direction and using rows that have more than two candidates. An X-Wing needs each of its two base rows to have exactly two candidates for the digit, in the same two columns. A third candidate in either row breaks the rectangle completely.
- Three candidates in a base row. That row’s 9 could be somewhere else, so the logic fails.
- Columns that do not match. Row 4 on columns 5 and 8, and row 9 on columns 5 and 7, is not an X-Wing.
- Eliminating from the base rows. The base rows keep their candidates; only the cover columns lose them.
- Hunting too early. Exhaust singles, pairs and pointing pairs first. They are far more common.
Practise the X-Wing
The best way to learn the X-Wing is to see it repeatedly on real grids. Play expert puzzles, and whenever you get stuck after the standard techniques, go digit by digit looking for two rows with matching column pairs. When you need help, Sudokual’s Hint will name the X-Wing and highlight all four corners.
Start with an Expert Sudoku: nearly every one needs at least one X-Wing or a similar pattern. You can also load the “Expert example” in our step-by-step solver and press “Show next logical step” until an X-Wing appears. Before you begin, make sure you are confident with pointing pairs and naked pairs, which do most of the work in expert puzzles. The complete technique list is in our Sudoku strategies guide.