Advanced technique

X-Wing

An X-Wing uses one digit in two parallel rows (or columns). If the digit has exactly two possible squares in each, and they line up in the same two columns, the digit can be removed from the rest of those columns.

What is a x-wing?

Find two rows where a digit has exactly two candidates, in the same two columns. The four squares form a rectangle. The digit must occupy two opposite corners, so it fills both columns, and it can be removed from every other square in those columns. The same works with columns and rows swapped.

Example

Digit 3 can only go in columns 6 and 9 in both row 1 and row 2. Those four squares form an X-Wing, so 3 can be removed from row 4, column 9, which is outside the rectangle.

Sudoku practice board. Rows and columns are numbered from the top left.
Row 1, column 1: empty
Row 1, column 2: empty
Row 1, column 3: empty
Row 1, column 4: empty
Row 1, column 5: empty
Row 1, column 6: candidates 2, 3, 7, 9
Row 1, column 7: 4
Row 1, column 8: empty
Row 1, column 9: candidates 1, 2, 3
Row 2, column 1: empty
Row 2, column 2: 6
Row 2, column 3: 8
Row 2, column 4: empty
Row 2, column 5: empty
Row 2, column 6: candidates 2, 3, 4, 9
Row 2, column 7: 5
Row 2, column 8: 7
Row 2, column 9: candidates 1, 2, 3
Row 3, column 1: empty
Row 3, column 2: 3
Row 3, column 3: empty
Row 3, column 4: empty
Row 3, column 5: 1
Row 3, column 6: empty
Row 3, column 7: empty
Row 3, column 8: 9
Row 3, column 9: 8
Row 4, column 1: 9
Row 4, column 2: 4
Row 4, column 3: empty
Row 4, column 4: empty
Row 4, column 5: empty
Row 4, column 6: 6
Row 4, column 7: empty
Row 4, column 8: empty
Row 4, column 9: candidates 1, 2, 3, 5, 7
Row 5, column 1: empty
Row 5, column 2: 8
Row 5, column 3: 5
Row 5, column 4: 3
Row 5, column 5: 4
Row 5, column 6: empty
Row 5, column 7: empty
Row 5, column 8: empty
Row 5, column 9: empty
Row 6, column 1: empty
Row 6, column 2: empty
Row 6, column 3: empty
Row 6, column 4: empty
Row 6, column 5: 9
Row 6, column 6: empty
Row 6, column 7: 8
Row 6, column 8: empty
Row 6, column 9: 4
Row 7, column 1: empty
Row 7, column 2: empty
Row 7, column 3: 3
Row 7, column 4: empty
Row 7, column 5: empty
Row 7, column 6: 8
Row 7, column 7: empty
Row 7, column 8: empty
Row 7, column 9: 6
Row 8, column 1: empty
Row 8, column 2: 1
Row 8, column 3: empty
Row 8, column 4: empty
Row 8, column 5: empty
Row 8, column 6: 5
Row 8, column 7: empty
Row 8, column 8: 3
Row 8, column 9: empty
Row 9, column 1: empty
Row 9, column 2: 9
Row 9, column 3: empty
Row 9, column 4: empty
Row 9, column 5: 3
Row 9, column 6: empty
Row 9, column 7: empty
Row 9, column 8: empty
Row 9, column 9: empty

Target square: row 4, column 9. Remove candidate 3.

Pattern squares: row 1, column 6; row 1, column 9; row 2, column 6; row 2, column 9.

3 has exactly two positions in each of two parallel units, forming the rectangle r1c6, r1c9, r2c6, r2c9. Those placements use both crossing units, so remove 3 from r4c9 outside the rectangle.

Small numbers are the candidates of the squares used in this step.

How to find it, step by step

  1. Choose a digit and fill in its candidates across the grid.
  2. Find rows where that digit has exactly two possible squares.
  3. Look for two such rows whose squares are in the same two columns.
  4. Remove the digit from all other squares in those two columns.
  5. Try the same search with columns, looking for matching rows.

Why it works

In the first row the digit is in one of the two columns; in the second row it must be in the other. Either way both columns get the digit inside the rectangle, so no other square in those columns can hold it.

Common mistakes

  • Using a row where the digit has three possible squares.
  • Removing the digit from the rows instead of the columns (or the other way round).
  • Mixing two different digits in one rectangle.

Questions

Why is it called an X-Wing?

The two possible solutions sit on opposite corners of the rectangle, forming an X shape, like the wings of a starfighter.

What is a Swordfish?

A Swordfish is a larger X-Wing that uses three rows and three columns instead of two. Jellyfish uses four.

Try it yourself

Work through guided exercises built around this technique, or use it in today's daily Sudoku.

All Sudoku techniques