X-Wing in Sudoku - The Definitive Advanced Elimination Technique
X-Wing is an advanced technique where, if a specific digit's candidates appear in only the same two columns across two rows (or vice versa), that digit can be eliminated from other cells in those columns. This article explains the logic needed for Master-level puzzles.
The Logical Structure of X-Wing
An X-Wing is established under the following conditions. For a specific digit (say, 4), in both Row A and Row B, the candidates for 4 exist in only Column X and Column Y. In this case, 4 must go in either Column X or Column Y in Row A, and likewise in Row B. Furthermore, due to column constraints, if Row A places 4 in Column X, then Row B must place it in Column Y, and vice versa. In either case, Columns X and Y are guaranteed to have 4 placed in them, so 4 can be eliminated from all other cells in Columns X and Y (those not in Rows A or B).
Origin of the Name and Visual Understanding
The name X-Wing comes from the X shape formed when you draw diagonal lines connecting the four candidate cells. The cells at Row A-Column X, Row A-Column Y, Row B-Column X, and Row B-Column Y form a rectangle, and its diagonals draw an X. The digit will be placed in two cells along one of these diagonals (which diagonal is undetermined). Once you can visually recognize this pattern, your discovery speed improves dramatically.
Step-by-Step Discovery Process
To systematically find X-Wings: (1) For a specific digit, list all rows where that digit's candidates appear in exactly 2 cells. (2) Among those rows, look for a pair where the candidate column positions match. (3) If such a pair is found, the X-Wing is established, and you can eliminate candidates from the corresponding columns' other cells. Column-based X-Wings work the same way (just swap rows and columns). Accurate pencil mark maintenance is essential - missed updates cause X-Wings to go undetected.
Extension to Swordfish
X-Wing is a 2-row by 2-column pattern, but extending it to 3 rows by 3 columns gives you the Swordfish. If a digit's candidates across three rows are contained within a total of 3 columns, that digit can be eliminated from other cells in those 3 columns. Further extending to 4 rows by 4 columns yields the Jellyfish. These are generalizations of X-Wing with the same logical basis, but the increased pattern complexity makes them significantly harder to spot.
Finned X-Wing
A pure X-Wing requires the candidates in two rows to line up in exactly two columns each, but in practice an extra candidate (a fin) often spoils that clean condition. When a fin is present, the pattern is called a Finned X-Wing. You cannot make the full elimination, but you can still safely remove the target candidate only from cells that share a block with the fin. Many players give up on the X-Wing the moment a fin appears, yet by focusing on the fin's location a partial elimination becomes possible. This idea carries over to Swordfish and Jellyfish, and on real boards the finned form appears more frequently than the pure form.
Common Mistakes and How to Verify
A common X-Wing mistake is confusing a row with exactly two candidates and a row with three or more. An X-Wing only holds for a pair of rows in which the target number's candidates exist in exactly two columns. If candidates appear in three or more columns, it is not an X-Wing but the territory of another technique such as Swordfish. Before performing any elimination, always confirm 'do these two rows really share the same two columns' and 'are the cells I am about to eliminate outside rows A and B.' A missed pencil-mark update can make you misread a pattern that does not hold and corrupt the board.
Boards Where X-Wings Tend to Appear
You should look for an X-Wing in the midgame and beyond, after you have advanced as far as naked singles, hidden singles, pairs, and triples allow and still find no forced cells. In particular, when a number's candidates are concentrated in just a few rows or columns across the board, it is a strong X-Wing candidate. Consciously counting, for each number, the rows and columns that have exactly two candidate cells speeds up discovery. The further the board progresses and the fewer candidates remain, the more readily X-Wings appear, so it is more efficient to scan systematically once you feel stuck than to hunt for them too early.
Where X-Wing Sits Among Advanced Techniques
The X-Wing sits at the entrance to the Fish family of techniques, which focus on a single number and eliminate candidates from the relationships between cells. Swordfish and Jellyfish generalize the X-Wing by increasing the number of rows and columns, and their logical skeleton is exactly the same. Meanwhile, XY-Wing and W-Wing are a separate family that chains across multiple numbers, exploiting connections between two-candidate cells. These rise in difficulty but are all based on definite logic, never guessing. A solid grasp of the X-Wing gives you a foothold for advancing to more complex fish and chain techniques. Conversely, reaching for higher techniques before you can see the X-Wing makes them hard to master, because the foundation is missing. Keeping to the order of building logic one step at a time is, though it looks like a detour, the surest path to improvement.