X-Wing Sudoku Technique Explained

Master this elegant intermediate technique

X-Wing pattern example in Sudoku

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!

7
Candidates forming the X-Wing pattern
Candidates that can be eliminated
4
Key analysis cell
4
Supporting cells in pattern

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.

The Rectangle Rule: When four candidates form a perfect rectangle, the candidate must appear in two opposite corners. Therefore, it cannot appear anywhere else in those two columns (or rows).
Advertisement

Visualising the X-Wing Pattern

X
X
x
x
X
X
x
x

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:

  1. Select a candidate number to analyse (e.g., any number from 1-9)
  2. Find two rows where this candidate appears in exactly two cells each
  3. Check alignment – do these four cells align in exactly two columns? If yes, you've found a row-based X-Wing!
  4. Mark the pattern – these four cells form the "corners" of your X-Wing rectangle
  5. Eliminate candidates – remove the candidate from all other cells in those two columns (except the four corners)
  6. Alternative search – you can also find column-based X-Wings by starting with columns instead of rows
Key Requirements for X-Wing:
  • 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:

  1. A candidate number appears in exactly two positions in two separate rows
  2. These four positions form a perfect rectangle when you consider their row and column coordinates
  3. Because of the rectangle, the candidate must occupy two diagonal corners
  4. This means the candidate cannot appear anywhere else in those two columns
  5. The green check marks show where these eliminations occur
Advertisement

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:

  1. Row A has candidate X in columns 2 and 5 (only two possibilities)
  2. Row B has candidate X in columns 2 and 5 (only two possibilities)
  3. Row A must place X in either column 2 OR column 5
  4. Row B must place X in the other column (if A uses column 2, B must use column 5)
  5. Therefore, columns 2 and 5 are "occupied" by X from rows A and B
  6. 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.

Important: The X-Wing doesn't tell you which diagonal the candidate will follow – it could be corners A1-B2 OR corners A2-B1. However, you don't need to know which diagonal is correct to make valid eliminations. Both diagonals lead to the same eliminations in the intersecting columns.

Finding X-Wings Efficiently

Scanning Strategy

To find X-Wings systematically:

When to Look for X-Wings

X-Wing patterns become more visible when:

Advertisement

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 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:

These techniques eliminate candidates and create the exact-two-per-row/column conditions that X-Wings require.

Practice Tips

Developing X-Wing Recognition:

  1. Start with pencil marks – ensure all candidates are clearly marked
  2. Highlight strategically – use colours to mark rows/columns with exactly two candidates
  3. Practice with one number – analyse the entire grid for one candidate at a time
  4. Draw the rectangle – lightly sketch lines connecting potential X-Wing corners
  5. Verify before eliminating – double-check alignment and candidate counts
  6. Look for results – X-Wings often create immediate solving opportunities
Pro Tip: After making eliminations with an X-Wing, don't immediately search for another X-Wing. Instead, check for simpler techniques first (naked singles, hidden singles, etc.) that may have been revealed by your eliminations. X-Wings often create breakthrough moments that unlock easier solving paths.

Why X-Wing Matters

The X-Wing is often called a "breakthrough technique" because:

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.