Sudoku AI Coach

Home › Learn › X-Wing

Step 9 · Expert

What is X-Wing? How to Solve Sudoku

In short

When a digit has exactly two possible cells in each of two rows, and those cells line up in the same two columns, you can remove that digit from the other cells of those two columns (and the same works with rows and columns swapped).

What it is

Think about one digit only (say 4).

① In two rows, 4 fits in exactly two cells each.

② Those cells line up in the same two columns, so the four cells form the corners of a rectangle.

Then 4 goes in one diagonal pair of the rectangle: top-left + bottom-right, or top-right + bottom-left.

Either way, the 4s for those two columns are used up inside the rectangle. So no other cell in those two columns can be 4.

How to spot it

Pick one digit and find a row where it has exactly two spots. If another row has its two spots in the same two columns, it's an X-Wing (rows and columns can be swapped).

Example

7892689126781237893789512412368782683127878495126852489124812389618723123825913838186744784684678534789122312331474726895489324584891724562964894848952317172456493245829

Yellow cells are where to look, orange cells are the reason, red digits are candidates you can remove, and the blue digit is the answer.

Think about 9 only. In both row 3 and row 8, 9 can only go in column 2 or column 4 (R3C2, R3C4, R8C2, and R8C4). These four cells are the corners of a rectangle, and 9 goes in one diagonal pair. Either way, the 9s of column 2 and column 4 are used up by these four cells, so the other cells of column 2 and column 4 (R1C2, R1C4, and R7C4) can't be 9.

Practice this technique in your browser