X-Wing
Master advanced rectangular elimination patterns to solve complex puzzles through sophisticated candidate elimination.
What is an X-Wing?
The X-Wing is an advanced Sudoku solving technique that uses rectangular patterns to eliminate candidates. It occurs when a candidate number appears in exactly two positions in each of two rows (or columns), and these positions form a rectangle. This pattern allows you to eliminate the candidate from other cells in the affected columns (or rows).
The name "X-Wing" comes from the X-shaped pattern formed by drawing lines between the four corners of the rectangle.
How X-Wing Works
Find two rows with identical patterns
Look for a candidate that appears in exactly two positions in two different rows.
Check column alignment
Verify that the candidate positions are in the same two columns across both rows.
Form the rectangle
The four positions should form the corners of a rectangle on the grid.
Eliminate candidates
Remove the candidate from all other cells in the two affected columns.
X-Wing Pattern Diagram
Row B: [ ][ ][ ][ ][ ][ ][ ][ ][ ]
Row C: [ ][ ][ ][ ][ ][ ][ ][ ][ ]
Row D: [ ][ ][X ][ ][ ][X ][ ][ ][ ]
Col: 3 6
Eliminate candidate from all other cells in columns 3 and 6
The X pattern is formed by the four corner positions. Since the candidate must appear once in each row and column, it can be eliminated from other positions in the affected columns.
Example: X-Wing in Action
Here's a practical example of an X-Wing pattern with the number 5:
Before: Identifying the X-Wing
Analysis: The number 5 appears in exactly two positions in row 1 (columns 3 and 6) and exactly two positions in row 5 (columns 3 and 6). These four cells form the corners of a rectangle - our X-Wing pattern.
Logic: Since each row must contain exactly one 5, and row 1 can only place 5 in columns 3 or 6, and row 5 can only place 5 in columns 3 or 6, no other row can have 5 in columns 3 or 6.
Elimination: All 5s in columns 3 and 6 (except the X-Wing corners) can be eliminated.
Column-Based X-Wing
X-Wings can also work with columns instead of rows. The logic is identical:
- Find two columns where a candidate appears in exactly two positions each
- Verify these positions are in the same two rows across both columns
- Eliminate the candidate from other cells in those two rows
Step-by-Step Application
- Choose a candidate number: Select a number that appears in multiple cells
- Scan rows systematically: Look for rows where the candidate appears in exactly two positions
- Compare row pairs: Find two rows with candidates in the same two columns
- Verify the rectangle: Confirm the four positions form a rectangle pattern
- Eliminate candidates: Remove the number from all other cells in the affected columns
- Repeat for columns: Apply the same process looking for column-based X-Wings
🧠 Advanced Insight
The X-Wing technique relies on the principle of locked sets. The four corner cells form a locked set where the candidate must appear exactly twice - once in each row and once in each column. This constraint forces the eliminations in the rest of the affected lines.
X-Wings are part of a larger family called "Fish" patterns, which includes Swordfish (3×3) and Jellyfish (4×4) configurations.
⚠️ Common Mistakes
- Incomplete patterns: Make sure the candidate appears in exactly two positions in each line
- Wrong eliminations: Only eliminate from the affected columns (or rows), not from the X-Wing pattern itself
- Missing column X-Wings: Don't forget to check for column-based patterns after checking rows
- Overlooking simpler techniques: Apply basic techniques first - X-Wings are for advanced situations
🎯 Practice Exercise
To develop X-Wing recognition skills:
- Choose a difficult Sudoku puzzle with many candidates
- Pick a number that appears frequently as a candidate
- Systematically examine each row to find pairs of candidates
- Look for matching patterns in other rows
- Draw lines to visualize the rectangular pattern
- Practice the elimination step carefully
Tip: X-Wings are most commonly found with numbers 4, 5, 6, and 7, as these tend to have multiple placement options in advanced puzzles.
When to Use X-Wing
- When intermediate techniques (pairs, pointing pairs, box/line reduction) are exhausted
- In challenging puzzles with many remaining candidates
- When you notice potential rectangular patterns in candidate placement
- Before attempting even more complex techniques like Y-Wing or Swordfish
Related Techniques
- Pointing Pairs - Simpler line-box interactions
- Box/Line Reduction - Foundational elimination technique
- Y-Wing - Advanced elimination using chain logic
- Swordfish - Extended fish pattern using 3×3 rectangles