← Back to Blog

sudoku · 7 min read

Sudoku Technique: The X-Wing

Master the grid through the absolute placement of non-repeating digits.

The X-Wing is the gateway to advanced Sudoku. It's the first technique you'll meet that operates on a single digit across multiple rows simultaneously — and once you see it, many puzzles labeled “diabolical” become tractable.

The pattern earns its name from the four candidate cells it forms: an X (rectangle) painted across two rows and two columns.

The X-Wing Rule

The same rule, mirrored

The pattern is symmetric. If you find an X-Wing across two columns (digit X has only two candidate rows in each of two columns, and those rows are the same), you can eliminate X from the other cells in those two rows.

Example

Suppose we're working on a partially solved Sudoku. We've pencil-marked candidates everywhere. Focus on the digit 6. We notice this candidate landscape (showing only where 6 can still go in two specific rows and a few other cells):

6666666
Candidate 6 across the grid. Row 2 and row 8 (highlighted) each have only two candidate cells for 6 — and those cells fall in the same two columns (4 and 7).

Look at row 2 and row 8 more carefully. Row 2 has 6 only in cols 4 and 7. Row 8 also has 6 only in cols 4 and 7. The four cells form a rectangle:

6666666
The X-Wing rectangle (blue) plus highlighted cols 4 and 7. Other 6-candidates inside those columns (red strikethrough) can be eliminated.

Why does it work?

The argument uses the row constraint, then the column constraint:

  • Row 2 must contain a 6 somewhere. The only candidate cells are (2, 4) and (2, 7). So one of those two cells will be 6.
  • Row 8 must contain a 6 somewhere. Only candidates are (8, 4) and (8, 7). One of those two will be 6.
  • If (2, 4) = 6, then col 4 already has its 6. So in row 8, the 6 cannot be at (8, 4) — it must be at (8, 7).
  • If (2, 7) = 6, then col 7 already has its 6. So in row 8, the 6 must be at (8, 4).
  • Either way, both columns 4 and 7 receive a 6 from these four cells alone. So no other cell in cols 4 or 7 can hold a 6.

That's the elimination. Any other cell in col 4 or col 7 with 6 as a candidate can have 6 erased.

How to spot an X-Wing in practice

  • Scan one digit at a time. X-Wing is a single-digit pattern. Pick a digit that's tricky to place, and look at where it can still go.
  • Find two rows where the digit is restricted to exactly two cells. If those cells share the same two columns, you have an X-Wing.
  • Verify the columns are aligned. A common mistake is to spot two rows with two candidates each but in different columns. That's not an X-Wing.
  • Apply eliminations. Erase the digit from every other cell in those two columns.
  • Try the dual. Repeat the search for two columns aligned across two rows — eliminations land on the rows.

What's next?

X-Wing has natural extensions:

  • Swordfish — three rows × three columns
  • Jellyfish — four rows × four columns (rare)
  • Skyscraper, kite, and other “single-digit chain” patterns that relax the strict rectangle requirement