X-Wing Sudoku Technique Explained

Your first pattern-based elimination technique

X-Wing example in Sudoku

What is an X-Wing?

An X-Wing is a pattern where a candidate appears in exactly two cells in each of two different rows, and these four cells form a rectangle (sharing the same two columns). This creates a logical constraint that allows eliminations.

The name comes from the X shape formed when you draw lines connecting the diagonal corners of the rectangle.

The X-Wing Principle: If a candidate appears in exactly two cells in each of two rows, and those cells align in the same two columns, the candidate can be eliminated from all other cells in those two columns.

Understanding the Pattern

Imagine a rectangle formed by four cells at positions:

If candidate 5 appears ONLY in these positions within rows 2 and 6, we have an X-Wing on 5.

Why X-Wing Works

The Logic

In each row, the candidate must go in one of the two cells. There are only two possibilities:

  1. Option A: Row 2 has the candidate in Column 3, Row 6 has it in Column 7
  2. Option B: Row 2 has the candidate in Column 7, Row 6 has it in Column 3

In BOTH cases, each column gets exactly one instance of the candidate from these rows. Therefore, no other cell in columns 3 or 7 can contain this candidate.

How to Find X-Wings

Step-by-Step Process:

  1. Choose a candidate: Pick a number to search for
  2. Scan rows: Find rows where this candidate appears in exactly two cells
  3. Check alignment: Do any two such rows share the same two columns?
  4. Verify the rectangle: Confirm all four corner cells contain the candidate
  5. Make eliminations: Remove the candidate from other cells in those two columns

Row-Based vs Column-Based X-Wing

Row-Based X-Wing

Candidate in exactly 2 cells per row

Two rows share the same two columns

Eliminate from: Other cells in those columns

Column-Based X-Wing

Candidate in exactly 2 cells per column

Two columns share the same two rows

Eliminate from: Other cells in those rows

Example Analysis

Finding an X-Wing

Searching for candidate 7:

  • Row 3: 7 appears only in columns 2 and 8
  • Row 7: 7 appears only in columns 2 and 8

X-Wing found! The four cells form a rectangle.

Elimination: Remove 7 from all other cells in columns 2 and 8.

Common Mistakes

  • More than two cells: Each row/column must have EXACTLY two cells with the candidate
  • Misaligned columns: The two rows must share the SAME two columns
  • Wrong elimination direction: Row-based X-Wings eliminate from columns, not rows
  • Missing candidates: All four corner cells must contain the candidate
Pro Tip: X-Wings are easier to find when you focus on one candidate at a time. Scan through candidates 1-9, checking each for the X-Wing pattern. Candidates that appear frequently but aren't yet placed are good targets.

X-Wing in the Fish Family

X-Wing is the simplest member of the "fish" family of techniques:

Mastering X-Wing prepares you for these more complex patterns.