X-Wing
expertThe X-Wing strategy involves finding two rows (or columns) where a candidate appears in exactly two cells, and these cells align in the same columns (or rows). If this pattern is found, the candidate can be eliminated from other cells in those columns (or rows). The strategy can be extended to additional type of Regions like Diagonal.
X-Wing is an advanced Sudoku strategy used to remove candidates from cells. It occurs when two rows (or columns) each have exactly two cells where a specific digit can be placed, and this digit appears in the same columns (or rows) in both cases. The strategy focuses on a single digit, making it relatively easy to spot.
What is X-Wing?
Look at the image below. The digit 8 appears only twice in Column 2 and twice in Column 7, in the same rows B and I. This setup forms an X-Wing. The name comes from the X shape formed when connecting the diagonally opposite cells containing the candidate digit.
In an X-Wing, one of the pairs of digits on the diagonals must be correct. Consider the image below:
- If B2 = 8 → B7 ≠ 8 and I2 ≠ 8 → I7 must be 8.
- If I2 = 8 → B2 ≠ 8 and I7 ≠ 8 → B7 must be 8.
Since one diagonal pair must be correct, we can eliminate the candidate digit from the remaining cells in the intersecting columns (or rows).
In the image below, the 8 in I8 can be eliminated because 8 must be in either I2 or I7.

Example 2
In Columns 6 and 7, the digit 2 appears only in rows B and F, forming an X-Wing (highlighted in purple). As a result, the 2’s in rows B and F (highlighted in red) can be eliminated.

Generalization of X-Wing
X-Wing can be generalized beyond 2 rows and 2 columns if the following conditions are met:
- Two Regions each have exactly two candidates for the same digit.
- Each candidate in one region sees a different candidate in the other region.
In such cases, candidates that see both possibilities in these regions can be eliminated.
Example 3
This example demonstrates the generalization of X-Wing. The board includes multiple Sudoku variants, but the relevant variant here is Diagonal Sudoku, where each main diagonal must contain all digits from 1 to 9, making each diagonal a Region.
Column 6 has two candidates for the digit 2 (H6, I6). The diagonal from top-left to bottom-right also has two candidates for 2 (H8, I9). H6 sees H8, and I6 sees I9, meeting the generalized X-Wing criteria. Therefore, 2 must be in either H6 and I9 or I6 and H8. All 2’s that see these candidates in both regions (highlighted in red) can be eliminated.

Example 4
In this example, the board features Classic and Diagonal Sudoku. Each of Columns 1 and 9 has two 9’s (highlighted in purple).
The correct placements for the 9’s in Columns 1 and 9 are either A1 and E9, or E1 and I9. Since A1 sees both E1 and I9 (due to the diagonal constraint), the 9 in Column 9 must be in E9. Similarly, E1 sees both A1 and E9, so the 9 in Column 9 must be in I9. All other 9’s that see these solutions (highlighted in red) can be eliminated.

Practise this strategy with built-in step-by-step hints inside our apps.