Z Zeloku

Advanced technique · also called x wing sudoku

X-Wing

Also known as: x wing sudoku · x-wing technique

An X-Wing is a rectangle of four cells where a single candidate digit appears in exactly two cells of two different rows — and those four positions line up in the same two columns. That candidate can then be eliminated from those two columns everywhere else.

The intuition

Treat the two rows as forcing pairs: each row will place the candidate in exactly one of its two columns. Whichever way the first row chooses, the second row must take the opposite column — because if both rows took the same column you'd have two of the same digit in that column. The only solutions are the two diagonals of the rectangle, and either way both columns are exhausted. So the digit cannot appear in those columns anywhere else.

When you'll use it

X-Wing is the gateway to advanced Sudoku. It shows up in Expert puzzles and serious newspaper-grade boards, and is the first technique that requires you to think across the whole grid rather than inside one unit.

How to spot a X-Wing

  1. Pick a candidate digit, e.g. 6.
  2. Find two rows in which the digit is a candidate in exactly two cells.
  3. Check whether the four cells across those two rows share the same two columns.
  4. If yes, eliminate the digit from those two columns in every other row.
  5. The same pattern also works with rows and columns swapped — two columns whose candidate sits in only two rows that match up.

Why the X-Wing logic works

Each row needs exactly one 6. Inside the X-Wing pattern, row A's two candidates are at columns X and Y, and row B's two candidates are also at columns X and Y. Whatever way row A picks its 6, row B is forced into the opposite column (otherwise both rows would put their 6 in the same column, which violates the column constraint). So the two columns X and Y have their 6 quota fully booked by the X-Wing rectangle — no other cell on those columns can carry a 6.

A worked X-Wing example

If row 2 has the digit 6 as a candidate only in C3 and C7, and row 8 has 6 only in C3 and C7, then the 6s of those two rows must take opposite corners of the (R2/R8, C3/C7) rectangle. Therefore 6 cannot appear in C3 or C7 in any other row.

12345784589123 6 96 96 76 7
Rows 2 and 8 each restrict candidate 6 to columns 3 and 7 — the four cells form an X-Wing. Remove 6 from C3 and C7 in every other row.

Walkthrough

Row 2 has digits 1, 2, 3, 4, 5, 7 and 8 placed, leaving only C3 and C7 empty. Working with what's left, 6 ends up a candidate in just those two cells.

Row 8 mirrors the situation: with 1, 2, 3, 4, 5, 8 and 9 placed, only C3 and C7 are empty, and 6 is a candidate in both.

Now consider column 3. Either R2C3 = 6 (in which case R8C3 ≠ 6) or R2C3 ≠ 6 (in which case the 6 of row 2 lands at R2C7, forcing R8 to place its 6 at R8C3). Either way one of R2C3 and R8C3 is a 6 — so no other cell of column 3 can be.

By the same argument no other cell of column 7 can be 6 either. The X-Wing is the smallest fish — Swordfish and Jellyfish generalise the same logic to 3 and 4 lines respectively.

How to drill this technique

Filter for Expert puzzles and pencil-mark fully. For each digit, list the rows where that digit has exactly two candidates. Scan that short list for matching column pairs. Twenty minutes a day of this for a week makes the pattern feel obvious instead of obscure.

Common mistakes

  • Trying to apply X-Wing without first thinning candidates with simpler techniques like Hidden Singles and Naked Pairs.
  • Counting three-cell candidate rows as X-Wing rows — the technique requires exactly two candidates in each of the two rows.
  • Forgetting that the same X-Wing rule works rotated 90°: two columns with two-candidate rows can eliminate candidates in two rows instead.

FAQ

What is an X-Wing in Sudoku, in plain English?

It's a four-cell rectangle that locks one digit into the diagonals of the rectangle. The digit is forced to take opposite corners of the rectangle, so it cannot appear elsewhere in the two columns (or two rows) that the rectangle spans.

Is X-Wing the same as Swordfish?

No, but they're cousins. X-Wing is a 2-row × 2-column fish. Swordfish is 3×3 and Jellyfish is 4×4. They all use the same logic: N rows whose candidate sits in the same N columns force the digit into a permutation of those columns.

How often does X-Wing actually appear?

Roughly one in three Expert puzzles has at least one X-Wing on the solving path. They're rare in Medium and Hard puzzles — if you find one in a Medium board, you've almost certainly missed an earlier Hidden Single.

Why is it called X-Wing?

The 'X' comes from the visual: the digit must take one of two diagonal pairs of corners in a rectangle, and those two diagonals together form an X. The 'Wing' label is a Sudoku-community convention shared with related patterns like XY-Wing and XYZ-Wing.

Is X-Wing a guess?

Absolutely not. X-Wing is pure deductive logic: a counting argument that shows the digit must sit in one of two diagonals, and therefore cannot appear in those columns anywhere else. No guessing or trial-and-error is involved at any step.

What technique comes after X-Wing?

Once X-Wing feels natural, Swordfish is the direct next step — same logic, three rows instead of two. From there XY-Wing introduces chained logic, and Coloring formalises it. Together those four techniques cover essentially every Expert puzzle published in mainstream newspapers.

What to learn next

Once X-Wing feels natural, move on to Swordfish — it builds directly on the candidate-tracking habits you've just developed. Or revisit the full Sudoku techniques library to see the full progression from beginner to advanced.