S
Back to Blog
Strategy

How to Solve X-Wing in Sudoku

MySudokuWorld TeamJune 15, 20258 min read

X-Wing is one of the most satisfying techniques to master once you understand its elegant logic.

What is X-Wing?

The X-Wing technique is an intermediate-to-advanced Sudoku solving method used to eliminate candidates from rows and columns. It's named after the iconic Star Wars starfighter because of its distinctive X-shaped pattern across the grid.

When to Use X-Wing

X-Wing applies when a specific candidate digit appears exactly twice in each of two separate rows — and those two occurrences lie in the same two columns in both rows. This creates a rectangle (or "X") across the grid, and the four cells form the corners of that rectangle.

Step-by-Step Explanation

Step 1 — Identify the candidate. Choose a digit you're working with (let's say the digit 5).

Step 2 — Scan rows for the digit appearing exactly twice. Look through each row and find rows where the digit 5 appears as a candidate in exactly two cells.

Step 3 — Check column alignment. If you find two rows where the digit appears twice, check whether those pairs are in the same two columns. For example:

  • Row 2: digit 5 in columns 3 and 7
  • Row 8: digit 5 in columns 3 and 7
  • This is an X-Wing!

    Step 4 — Eliminate from the columns. Since 5 must appear in columns 3 and 7 within those two rows, you can eliminate 5 from all other cells in columns 3 and 7 (except the four X-Wing cells).

    Why It Works

    In a valid Sudoku solution, each row must contain each digit exactly once. With the X-Wing pattern, the digit must go into either:

  • Row 2, Col 3 AND Row 8, Col 7, or
  • Row 2, Col 7 AND Row 8, Col 3
  • In either case, columns 3 and 7 are "used up" for that digit within those rows, meaning no other cell in those columns can hold that digit.

    Column X-Wing

    The same logic applies column-wise. If a digit appears exactly twice in two columns, and those pairs share the same two rows, you can eliminate that digit from the rest of those rows.

    Real Example Walkthrough

    Imagine a puzzle where digit 3 appears as a candidate in:

  • Row 1: columns 2 and 8
  • Row 6: columns 2 and 8
  • This means digit 3 in column 2 is confined to rows 1 and 6. Every other cell in column 2 that has 3 as a candidate can have it removed. The same applies to column 8.

    This elimination might reveal naked singles or other patterns that let you crack the puzzle open.

    Common Mistakes

  • Misidentifying the count — The digit must appear *exactly* twice in each row/column, not "at most twice."
  • Wrong column alignment — Both rows must share the *exact same two columns*. If the columns differ, it's not an X-Wing.
  • Applying elimination to wrong cells — Only eliminate from the two columns involved, not elsewhere in the grid.
  • Practice Tips

  • X-Wing is easier to spot if you use pencil marks consistently
  • Start with common digits like 1, 2, and 3 that appear frequently as candidates
  • Use color-coding in your puzzle app to highlight candidate pairs
  • After mastering X-Wing, explore its larger cousin: Swordfish (3 rows/columns instead of 2)
  • Conclusion

    X-Wing is a gateway technique into advanced Sudoku solving. Once you recognize the pattern, you'll start seeing it regularly in harder puzzles. Practice with medium and hard difficulty puzzles on MySudokuWorld to sharpen your X-Wing detection skills and level up your solving game.

    Related Articles