SudokuHint

X-Wing Sudoku Examples: See the Pattern in Action

An X-Wing is an advanced Sudoku solving pattern that uses four cells in a rectangular formation to eliminate candidate numbers from entire rows or columns. It is a foundational fish pattern that helps clear multiple possibilities at once, making it a powerful tool for breaking into harder puzzles. When basic techniques like [Pointing Pairs](/techniques/pointing-pairs) and [Box-Line Reduction](/techniques/box-line-reduction) are exhausted, an X-Wing can provide the critical next step. This guide uses detailed, text-based examples to show you exactly how to find and apply this pattern.

By SudokuHint TeamLast updated

What is the X-Wing Pattern?

The X-Wing pattern involves four cells that form the corners of a rectangle on the grid. These four cells must share the same candidate digit and be aligned in exactly two rows and two columns. The logic is powerful: the candidate digit must occupy the two opposite corners of this rectangle. This means it cannot appear elsewhere in the two rows (or columns) that form the rectangle, allowing you to eliminate it from all other cells in those lines.

Key insight: Think of it as locking a candidate into two possible positions in two separate rows. Because the rows are paired, the candidate is forced into a diagonal configuration, which clears it from the rest of the involved rows and columns.

X-Wing Examples and Q&A

Let’s look at practical questions and use text-based diagrams to illustrate the answers. Each example grid shows only the relevant candidate (e.g., the number 7) for the X-Wing pattern.

Q1: When and where does an X-Wing appear?

An X-Wing appears when you have scanned the grid for a specific candidate and found it limited to only two possible cells in two different rows. These rows must align so that the candidate cells also share the same two columns. Here is a text-based example of a candidate '7' X-Wing in rows 2 and 5:

```

Cols: 3 7

Row 2: [7] [7]

Row 5: [7] [7]

```

In this diagram, the digit 7 can only go in columns 3 and 7 for both row 2 and row 5. This forms the four corners of the rectangle (R2C3, R2C7, R5C3, R5C7).

Q2: Which candidates can you eliminate with an X-Wing?

Once you identify the X-Wing, you eliminate the shared candidate from all other cells in the two columns that define the rectangle. In the example above, because the 7 must be in either R2C3 & R5C7 OR R2C7 & R5C3, it cannot be in any other cell in columns 3 and 7. Let's add context:

```

Col 3 cells with candidate 7: R2C3, R5C3, R8C3

Col 7 cells with candidate 7: R2C7, R5C7, R9C7

After applying the X-Wing (Rows 2 & 5), we remove 7 from R8C3 and R9C7.

```

This elimination often reveals other basic techniques like singles or pairs in the affected columns.

Q3: What’s the difference between an X-Wing and a Swordfish?

An X-Wing operates on two rows/columns, while a Swordfish is its larger counterpart involving three rows/columns. If an X-Wing is a 2x2 pattern, a Swordfish is a 3x3 pattern. Both are part of the 'fish' family of techniques. The logic scales: a Swordfish uses three rows where a candidate is confined to three columns, allowing eliminations in those columns. Mastering the X-Wing is the essential first step to understanding these more complex patterns.

Practical Tips for Finding X-Wings

Scan systematically. Pick a candidate number (1 through 9) and go through each row, noting which columns it could be in. Look for two rows where that candidate appears in exactly the same two columns. Then, check the corresponding columns to ensure the candidate isn't elsewhere in those rows, confirming the rectangle. This process is similar to the systematic search used for Hidden Pairs.

  • Start with the most frequent candidate on the board; it's more likely to form patterns.
  • Use pencil marks! An X-Wing is nearly impossible to spot without full candidate notation.
  • If you find two rows that almost work but have an extra candidate in a third column, it might be part of a Swordfish, not an X-Wing.

How an X-Wing Fits into Your Solving Strategy

The X-Wing is a bridge technique. After exhausting basic intersection and subset methods like Naked Pairs, you look for X-Wings. Successfully applying one clears several candidates, which often simplifies the puzzle enough to revert to simpler techniques. It’s a cyclical process: use advanced patterns to create opportunities for basic ones. Recognizing an X-Wing also builds the visual skill needed for even more advanced tactics like the Y-Wing.

Key Facts

  • An X-Wing is a Sudoku pattern where a single candidate occupies four cells forming the corners of a rectangle.
  • The four cells must lie in exactly two rows and two columns, with two cells in each row and each column.
  • The core logic states the candidate must be placed on one of the two diagonals of the rectangle.
  • This allows you to eliminate that candidate from all other cells in the two columns (or rows) forming the rectangle.
  • X-Wings are a type of 'fish' pattern, with Swordfish and Jellyfish being larger extensions of the same concept.
  • You must use full pencil marks (candidate notation) to reliably spot an X-Wing pattern.
  • An X-Wing is considered an intermediate to advanced technique, typically used after basic methods are exhausted.
  • Finding one X-Wing elimination often unlocks simpler techniques like hidden singles or pairs elsewhere on the grid.
  • The pattern can be searched for by scanning individual candidate numbers across rows or columns systematically.
  • It is distinct from chaining techniques like Y-Wing, which use three cells and three different candidates.

Frequently Asked Questions

Can an X-Wing be found in columns instead of rows?

Yes. The pattern is symmetric. You can find a candidate confined to two rows in two columns (row-based X-Wing) or confined to two columns in two rows (column-based X-Wing). The elimination then occurs in the opposite direction.

Do the four cells of an X-Wing have to be in different boxes?

No. The cells can be in any combination of the nine 3x3 boxes. The pattern is defined solely by the alignment across the entire puzzle's rows and columns, not by box boundaries.

What if I see the rectangle but there's an extra candidate in one row?

Then it is not an X-Wing. For the pattern to work, the candidate must be limited to exactly two cells in each of the two involved rows (or columns). An extra possibility breaks the logical lock.

How often does an X-Wing appear in puzzles?

In standard hard-rated puzzles, one or more X-Wings are common. In extreme or diabolical puzzles, they are frequently required alongside other advanced fish patterns and chains.

Is finding an X-Wing necessary to solve all Sudoku puzzles?

No. Many hard puzzles can be solved without it, using other methods. However, it is a highly efficient and common technique for tackling the majority of puzzles classified as hard or expert level.