What is an X-Wing?
An X-Wing is an intermediate Sudoku solving technique that creates a rectangular pattern between two rows and two columns. When a candidate number appears in exactly two positions in each of two rows (or columns), and these positions align perfectly, you can eliminate that candidate from the intersecting columns (or rows).
The name "X-Wing" comes from the X-shaped pattern that forms when you draw lines connecting the four corner positions – reminiscent of the famous starfighter from Star Wars!
The Core Principle
The X-Wing is based on a simple but powerful logical insight: if a candidate appears in exactly two cells in each of two rows, and these cells are aligned in the same two columns, then that candidate must occupy exactly two of those four corner cells – one in each row and one in each column.
Visualising the X-Wing Pattern
Red corners (X) form the X-Wing pattern in rows 1 and 3, columns 1 and 3.
Green cells (x) show where candidates can be eliminated in those columns.
Identifying an X-Wing
Step-by-Step Process:
- Select a candidate number to analyse (e.g., any number from 1-9)
- Find two rows where this candidate appears in exactly two cells each
- Check alignment – do these four cells align in exactly two columns? If yes, you've found a row-based X-Wing!
- Mark the pattern – these four cells form the "corners" of your X-Wing rectangle
- Eliminate candidates – remove the candidate from all other cells in those two columns (except the four corners)
- Alternative search – you can also find column-based X-Wings by starting with columns instead of rows
- Exactly TWO occurrences of the candidate in each of TWO rows (or columns)
- These four cells must align to form a perfect rectangle
- The pattern uses either two rows OR two columns – not mixed
Analysing the Example
Understanding the X-Wing Pattern
In the displayed puzzle, we can observe several elements that demonstrate how X-Wing patterns work:
Red Circled Numbers: The candidates marked with red circles (including 6, 8, 5, 3, 7, 9, 2, 1) indicate the numbers being analysed. When examining these marked positions, we're looking for the rectangular pattern that defines an X-Wing. The red circles help identify potential X-Wing corners.
Green Check Marks (✓): The four green check marks at specific positions are crucial – they mark the locations where candidates can be eliminated as a result of identifying the X-Wing pattern. Notice how they appear in strategic positions:
- Row 3, Column 3 (✓)
- Row 3, Column 9 (✓)
- Row 6, Column 3 (✓)
- Row 6, Column 9 (✓)
These check marks indicate cells where a particular candidate has been eliminated because of the X-Wing pattern in those columns.
The Blue Cell: The blue-highlighted 4 in row 2, column 9 represents a confirmed placement or a key cell in the analysis. This might be a cell that becomes solvable after the X-Wing eliminates other candidates.
Green Background Cells: Several cells with green backgrounds (containing 4s in various positions) show cells that are influenced by or related to the X-Wing pattern, helping to establish the logical chain that makes the elimination valid.
How the Pattern Works
To identify the X-Wing in this puzzle:
- A candidate number appears in exactly two positions in two separate rows
- These four positions form a perfect rectangle when you consider their row and column coordinates
- Because of the rectangle, the candidate must occupy two diagonal corners
- This means the candidate cannot appear anywhere else in those two columns
- The green check marks show where these eliminations occur
Row-Based vs Column-Based X-Wing
Row-Based X-Wing
Pattern: Find two rows where a candidate appears in exactly two cells, and these cells align in the same two columns.
Elimination: Remove the candidate from all other cells in those two columns (outside the two defining rows).
Column-Based X-Wing
Pattern: Find two columns where a candidate appears in exactly two cells, and these cells align in the same two rows.
Elimination: Remove the candidate from all other cells in those two rows (outside the two defining columns).
The Logic Behind X-Wing
The power of X-Wing comes from a simple truth: each row and each column must contain each number exactly once. Consider a row-based X-Wing:
- Row A has candidate X in columns 2 and 5 (only two possibilities)
- Row B has candidate X in columns 2 and 5 (only two possibilities)
- Row A must place X in either column 2 OR column 5
- Row B must place X in the other column (if A uses column 2, B must use column 5)
- Therefore, columns 2 and 5 are "occupied" by X from rows A and B
- This means X cannot appear anywhere else in columns 2 or 5
This creates a "locked" pattern where the two rows "claim" the two columns for that candidate, eliminating all other occurrences in those columns.
Finding X-Wings Efficiently
Scanning Strategy
To find X-Wings systematically:
- Choose a candidate that appears frequently but not everywhere (typically 8-12 times in the grid)
- Scan rows looking for rows with exactly two occurrences of the candidate
- Mark these rows mentally or with notation
- Check for alignment – do any two marked rows align in exactly two columns?
- Repeat for columns to find column-based X-Wings
When to Look for X-Wings
X-Wing patterns become more visible when:
- You've eliminated many candidates through basic techniques
- Several rows or columns have exactly two candidates for a number
- The puzzle is at intermediate difficulty or higher
- You've exhausted simpler techniques like naked pairs and pointing pairs
Common Mistakes to Avoid
- More than two cells: If a row/column has three or more candidates, it cannot form an X-Wing
- Misalignment: All four corners must form a perfect rectangle – no exceptions
- Wrong elimination area: For row-based X-Wings, eliminate from the columns; for column-based, eliminate from the rows
- Eliminating corners: Never eliminate candidates from the four corner cells themselves
- Mixing rows and columns: An X-Wing is either row-based OR column-based, never mixed
X-Wing in Action
Worked Example
Setup: Candidate 7 appears in:
- Row 2: columns 3 and 8 only
- Row 6: columns 3 and 8 only
Analysis: These four cells form a perfect rectangle in rows 2 and 6, columns 3 and 8.
Logic: Row 2 must place 7 in either column 3 or column 8. Row 6 must place 7 in the other column. Therefore, columns 3 and 8 are "claimed" for 7 by these two rows.
Elimination: Remove all 7 candidates from columns 3 and 8, except for the four corner cells (row 2 column 3, row 2 column 8, row 6 column 3, row 6 column 8).
Result: This often creates naked singles or other simpler patterns that can be immediately solved.
Relationship to Other Techniques
X-Wing vs Swordfish
X-Wing is actually a specific case of the more general "Fish" family of techniques:
- X-Wing: 2 rows × 2 columns (or vice versa)
- Swordfish: 3 rows × 3 columns (or vice versa)
- Jellyfish: 4 rows × 4 columns (rare and complex)
X-Wing is the simplest and most common fish pattern, making it an essential technique to master before moving on to Swordfish.
Building on Simpler Techniques
X-Wing often becomes visible after applying:
- Naked and hidden singles
- Naked and hidden pairs
- Pointing pairs and box/line reduction
These techniques eliminate candidates and create the exact-two-per-row/column conditions that X-Wings require.
Practice Tips
Developing X-Wing Recognition:
- Start with pencil marks – ensure all candidates are clearly marked
- Highlight strategically – use colours to mark rows/columns with exactly two candidates
- Practice with one number – analyse the entire grid for one candidate at a time
- Draw the rectangle – lightly sketch lines connecting potential X-Wing corners
- Verify before eliminating – double-check alignment and candidate counts
- Look for results – X-Wings often create immediate solving opportunities
Why X-Wing Matters
The X-Wing is often called a "breakthrough technique" because:
- It's learnable: Unlike very advanced techniques, X-Wing has clear, simple rules
- It's powerful: A single X-Wing can eliminate multiple candidates
- It's common: Most intermediate puzzles contain at least one X-Wing opportunity
- It builds intuition: Understanding X-Wing helps with more advanced fish patterns
- It's satisfying: Finding your first X-Wing is a memorable moment in your Sudoku journey!
Conclusion
The X-Wing is an elegant technique that demonstrates the beauty of Sudoku logic. By recognising a simple rectangular pattern and applying basic reasoning about rows and columns, you can eliminate candidates that would otherwise be difficult to remove.
The key to mastering X-Wing is pattern recognition. With practice, you'll develop an eye for rows and columns with exactly two candidates, and you'll quickly spot when these align into the characteristic X-Wing rectangle. Once spotted, the eliminations follow automatically from the logic.
As you progress in your Sudoku solving, X-Wing becomes an essential tool – bridging the gap between basic techniques and advanced strategies. It opens the door to understanding the entire "fish" family of techniques whilst remaining accessible and practical for everyday solving.